Documentation ¶
Overview ¶
Package debian contains an Indexer, Matcher, and Updater for Debian GNU/Linux.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DistributionScanner ¶
type DistributionScanner struct{}
DistributionScanner attempts to discover if a layer displays characteristics of a Debian distribution.
func (*DistributionScanner) Kind ¶
func (*DistributionScanner) Kind() string
Kind implements indexer.VersionedScanner.
func (*DistributionScanner) Name ¶
func (*DistributionScanner) Name() string
Name implements indexer.VersionedScanner.
func (*DistributionScanner) Scan ¶
func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Distribution, error)
Scan implements indexer.DistributionScanner.
func (*DistributionScanner) Version ¶
func (*DistributionScanner) Version() string
Version implements indexer.VersionedScanner.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory creates Updaters for all Debian distributions that exist in the mirror, and have entries in the JSON security tracker.
[Configure] must be called before [UpdaterSet].
func (*Factory) Configure ¶
Configure implements driver.Configurable.
func (*Factory) UpdaterSet ¶
UpdaterSet implements driver.UpdaterSetFactory.
type FactoryConfig ¶
type FactoryConfig struct { // ArchiveURL is a URL to a Debian archive. // // Deprecated: Only MirrorURL should be used. ArchiveURL string `json:"archive_url" yaml:"archive_url"` MirrorURL string `json:"mirror_url" yaml:"mirror_url"` // OVALURL is a URL to a collection of OVAL XML documents. // // Deprecated: Use JSONURL instead. OVALURL string `json:"oval_url" yaml:"oval_url"` // JSONURL is a URL to a JSON vulnerability feed. JSONURL string `json:"json_url" yaml:"json_url"` }
FactoryConfig is the configuration honored by the Factory.
The "mirror" URLs expect to find HTML at "dists/" formatted like the HTML from the Debian project (that is to say, HTML containing relative links to distribution directories).
The "mirror" URL needs a trailing slash.
The "JSON" URL expects to find a JSON array of packages mapped to related vulnerabilities.
type JSONData ¶
type JSONData map[string]Vulnerabilities
JSONData maps source package -> related vulnerabilities
type Matcher ¶
type Matcher struct{}
Matcher is a driver.Matcher for Debian distributions.
func (*Matcher) Filter ¶
func (*Matcher) Filter(record *claircore.IndexRecord) bool
Filter implements driver.Matcher.
func (*Matcher) Query ¶
func (*Matcher) Query() []driver.MatchConstraint
Query implements driver.Matcher.
func (*Matcher) Vulnerable ¶
func (*Matcher) Vulnerable(ctx context.Context, record *claircore.IndexRecord, vuln *claircore.Vulnerability) (bool, error)
Vulnerable implements driver.Matcher.
type ReleaseData ¶
type ReleaseData struct { Status string `json:"status"` FixedVersion string `json:"fixed_version"` Urgency string `json:"urgency"` }
ReleaseData is data related to releases related to a vulnerability
type UpdaterConfig ¶
type UpdaterConfig struct { // Deprecated: Use JSONURL instead. OVALURL string `json:"url" yaml:"url"` JSONURL string `json:"json_url" yaml:"json_url"` // Deprecated: Use DistsURLs instead. DistsURL string `json:"dists_url" yaml:"dists_url"` DistsURLs []sourceURL `json:"dists_urls" yaml:"dists_urls"` }
UpdaterConfig is the configuration for the updater.
type Vulnerabilities ¶
type Vulnerabilities map[string]*Vulnerability
Vulnerabilities maps vulnerability ID (CVE) -> related data
type Vulnerability ¶
type Vulnerability struct { Description string `json:"description"` Releases map[string]ReleaseData `json:"releases"` }
Vulnerability is data related to a vulnerability