Documentation ¶
Index ¶
- Constants
- func DBUrl(release Release, repo Repo) string
- func NewEcosystem(ctx context.Context) *indexer.Ecosystem
- func UpdaterSet(_ context.Context) (driver.UpdaterSet, error)
- type Details
- type DistributionScanner
- type Matcher
- type Option
- type Package
- type Release
- type Repo
- type Scanner
- type SecurityDB
- type Updater
Constants ¶
const ( Name = "Alpine Linux" ID = "alpine" )
Common os-release fields applicable for *claircore.Distribution usage.
Variables ¶
This section is empty.
Functions ¶
func NewEcosystem ¶
NewEcosystem provides the set of scanners and coalescers for the alpine ecosystem
func UpdaterSet ¶ added in v0.0.21
func UpdaterSet(_ context.Context) (driver.UpdaterSet, error)
Types ¶
type Details ¶
type Details struct { Name string `json:"name"` // Fixed package version string mapped to an array of CVE ids affecting the // package. Secfixes map[string][]string `json:"secfixes"` }
Details define a package's name and relevant security fixes included in a given version.
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 slice 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(ctx context.Context, record *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)
type Option ¶
Option configures the provided Updater
func WithClient ¶ added in v0.1.15
WithClient allows changing the client used for fetching databases.
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 `json:"distroversion"` Reponame string `json:"reponame"` Urlprefix string `json:"urlprefix"` Apkurl string `json:"apkurl"` Packages []Package `json:"packages"` }
SecurityDB is the 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)