Documentation ¶
Index ¶
Constants ¶
const ( None = "None" Low = "Low" Moderate = "Moderate" Important = "Important" Critical = "Critical" )
Variables ¶
var ( OSReleaseIDs = []string{"sles", "opensuse", "opensuse-leap"} OSReleaseNames = []string{"SLES", "openSUSE Leap"} )
Functions ¶
func NormalizeSeverity ¶ added in v0.0.15
func UpdaterSet ¶ added in v0.0.21
func UpdaterSet(_ context.Context) (driver.UpdaterSet, error)
Types ¶
type DistributionScanner ¶ added in v0.0.14
type DistributionScanner struct{}
DistributionScanner attempts to discover if a layer displays characteristics of a Suse 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 Suse 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 ¶ added in v0.1.0
type Matcher struct{}
Matcher implements driver.Matcher
func (*Matcher) Filter ¶ added in v0.1.0
func (*Matcher) Filter(record *claircore.IndexRecord) bool
Filter implements driver.Matcher
func (*Matcher) Query ¶ added in v0.1.0
func (*Matcher) Query() []driver.MatchConstraint
Query implements driver.Matcher
func (*Matcher) Vulnerable ¶ added in v0.1.0
func (*Matcher) Vulnerable(ctx context.Context, record *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)
Vulnerable implements driver.Matcher
type Option ¶
Option configures an Updater.
func WithClient ¶
WithClient sets an http.Client for use with an Updater.
If this Option is not supplied, http.DefaultClient will be used.
type Release ¶
type Release string
Release indicates the SUSE release OVAL database to pull from.
const ( EnterpriseServer15 Release = `suse.linux.enterprise.server.15` EnterpriseServer12 Release = `suse.linux.enterprise.server.12` EnterpriseServer11 Release = `suse.linux.enterprise.server.11` Leap151 Release = `opensuse.leap.15.1` Leap150 Release = `opensuse.leap.15.0` Leap423 Release = `opensuse.leap.42.3` )
These are some known Releases.
type Updater ¶
type Updater struct { ovalutil.Fetcher // promoted Fetch method // contains filtered or unexported fields }
Updater implements driver.Updater for SUSE.
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)