Documentation ¶
Index ¶
Constants ¶
const ( Name = "Alpine Linux" ID = "alpine" )
Common os-release fields applicable for *claircore.Distribution usage.
Variables ¶
var ReleaseToPrettyName = map[Release]string{ V3_10: "Alpine Linux v3.10", V3_9: "Alpine Linux v3.9", V3_8: "Alpine Linux v3.8", V3_7: "Alpine Linux v3.7", V3_6: "Alpine Linux v3.6", V3_5: "Alpine Linux v3.5", V3_4: "Alpine Linux v3.4", V3_3: "Alpine Linux v3.3", }
ReleaseToPrettyName maps a Release to the PrettyName found in alpine's os-release file.
Official Alpine images consistantly have a Pretty_Name field in their os-release files.
Functions ¶
Types ¶
type Details ¶
type Details struct { Name string `yaml:"name"` // fixed package version string mapped to an array of CVE ids affecting the package Secfixes map[string][]string `yaml:"secfixes"` }
Details define a package's name and security fixes for said package
type DistributionScanner ¶ added in v0.0.14
type DistributionScanner struct{}
DistributionScanner attempts to discover if a layer displays characteristics of a alpine distribution
func (*DistributionScanner) Kind ¶ added in v0.0.14
func (*DistributionScanner) Kind() string
Kind implements scanner.VersionedScanner.
func (*DistributionScanner) Name ¶ added in v0.0.14
func (*DistributionScanner) Name() string
Name implements scanner.VersionedScanner.
func (*DistributionScanner) Scan ¶ added in v0.0.14
func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Distribution, error)
Scan will inspect the layer for an os-release or lsb-release file and perform a regex match for keywords indicating the associated alpine release
If neither file is found a (nil,nil) is returned. If the files are found but all regexp fail to match an empty distribution is returned.
func (*DistributionScanner) Version ¶ added in v0.0.14
func (*DistributionScanner) Version() string
Version implements scanner.VersionedScanner.
type Matcher ¶
type Matcher struct{}
func (*Matcher) Query ¶
func (*Matcher) Query() []driver.MatchConstraint
func (*Matcher) Vulnerable ¶
func (*Matcher) Vulnerable(record *claircore.IndexRecord, vuln *claircore.Vulnerability) bool
type Scanner ¶
type Scanner struct{}
Scanner scans for packages in an apk database.
The zero value is ready to use.
type SecurityDB ¶
type SecurityDB struct { Distroversion string `yaml:"distroversion"` Reponame string `yaml:"reponame"` Urlprefix string `yaml:"urlprefix"` Apkurl string `yaml:"apkurl"` Packages []Package `yaml:"packages"` }
SecurityDB is the yaml security database structure
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
func NewUpdater ¶
NewUpdater returns an updater configured according to the provided Options.
func (*Updater) Fetch ¶
func (u *Updater) Fetch(ctx context.Context, hint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error)
func (*Updater) Parse ¶
func (u *Updater) Parse(ctx context.Context, r io.ReadCloser) ([]*claircore.Vulnerability, error)