Documentation
¶
Index ¶
- Constants
- func GeneratePURL(ctx context.Context, ir *claircore.IndexRecord) (packageurl.PackageURL, error)
- func NormalizeSeverity(severity string) claircore.Severity
- func ParsePURL(ctx context.Context, purl packageurl.PackageURL) ([]*claircore.IndexRecord, error)
- func UpdaterSet(_ context.Context) (driver.UpdaterSet, error)
- type DistributionScanner
- type Matcher
- type Option
- type Release
- type Updater
Constants ¶
const ( Low = "Low" Moderate = "Moderate" Important = "Important" Critical = "Critical" )
const ( // PURLType is the type of package URL for RPM packages. PURLType = "rpm" // PURLNamespace is the namespace of photon RPMs. PURLNamespace = "photon" )
Variables ¶
This section is empty.
Functions ¶
func GeneratePURL ¶ added in v1.5.49
func GeneratePURL(ctx context.Context, ir *claircore.IndexRecord) (packageurl.PackageURL, error)
GeneratePURL generates an RPM PURL for a given claircore.IndexRecord.
func NormalizeSeverity ¶ added in v0.2.0
func ParsePURL ¶ added in v1.5.49
func ParsePURL(ctx context.Context, purl packageurl.PackageURL) ([]*claircore.IndexRecord, error)
ParsePURL parses an RPM PURL into a list of [claircore.IndexRecord]s.
func UpdaterSet ¶ added in v0.0.21
func UpdaterSet(_ context.Context) (driver.UpdaterSet, error)
Types ¶
type DistributionScanner ¶
type DistributionScanner struct{}
DistributionScanner attempts to discover if a layer displays characteristics of a photon distribution
func (*DistributionScanner) Kind ¶
func (*DistributionScanner) Kind() string
Kind implements scanner.VersionedScanner.
func (*DistributionScanner) Name ¶
func (*DistributionScanner) Name() string
Name implements scanner.VersionedScanner.
func (*DistributionScanner) Scan ¶
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 photon 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 ¶
func (*DistributionScanner) Version() string
Version implements scanner.VersionedScanner.
type Matcher ¶ added in v0.0.24
type Matcher struct{}
Matcher implements driver.Matcher.
func (*Matcher) Filter ¶ added in v0.0.24
func (*Matcher) Filter(record *claircore.IndexRecord) bool
Filter implements driver.Matcher.
func (*Matcher) Query ¶ added in v0.0.24
func (*Matcher) Query() []driver.MatchConstraint
Query implements driver.Matcher.
func (*Matcher) Vulnerable ¶ added in v0.0.24
func (*Matcher) Vulnerable(ctx context.Context, record *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)
Vulnerable implements driver.Matcher.
type Updater ¶
type Updater struct {
ovalutil.Fetcher // promoted Fetch method
// contains filtered or unexported fields
}
Updater implements driver.Updater for Photon.
func NewUpdater ¶
NewUpdater configures an updater to fetch the specified Release.
func (*Updater) Parse ¶
func (u *Updater) Parse(ctx context.Context, r io.ReadCloser) ([]*claircore.Vulnerability, error)