Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Coalescer ¶
type Coalescer struct {
// contains filtered or unexported fields
}
Coalescer takes individual layer artifacts and coalesces them to form the final image's package results
It is expected to run a coalescer per "ecosystem". For example it would make sense to coalesce results for dpkg, os-release, and apt scanners
func NewCoalescer ¶
NewCoalescer is a constructor for a Coalescer
func (*Coalescer) Coalesce ¶
func (c *Coalescer) Coalesce(ctx context.Context, layers []*claircore.Layer) (*claircore.ScanReport, error)
Coalesce coalesces artifacts found in layers and creates a final ScanReport with the final package details found in the image. This method blocks and when its finished the c.sr field will hold the final ScanReport
type Scanner ¶
type Scanner struct{}
Scanner implements the scanner.PackageScanner interface.
This looks for directories that look like rpm databases and examines the files it finds there.
The zero value is ready to use.
func (*Scanner) ScanContext ¶
func (ps *Scanner) ScanContext(ctx context.Context, layer *claircore.Layer) ([]*claircore.Package, error)
ScanContext attempts to find rpm databases within the layer and enumerate the packages there.
A return of (nil, nil) is expected if there's no rpm database.
The external commands "tar" and "rpm" are used and expected to be in PATH.