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 ¶ added in v0.0.14
type DistributionScanner struct{}
DistributionScanner attempts to discover if a layer displays characteristics of a Debian distribution.
func (*DistributionScanner) Kind ¶ added in v0.0.14
func (*DistributionScanner) Kind() string
Kind implements indexer.VersionedScanner.
func (*DistributionScanner) Name ¶ added in v0.0.14
func (*DistributionScanner) Name() string
Name implements indexer.VersionedScanner.
func (*DistributionScanner) Scan ¶ added in v0.0.14
func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Distribution, error)
Scan implements indexer.DistributionScanner.
func (*DistributionScanner) Version ¶ added in v0.0.14
func (*DistributionScanner) Version() string
Version implements indexer.VersionedScanner.
type Factory ¶ added in v1.4.5
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 NewFactory ¶ added in v1.4.5
NewFactory constructs a Factory.
[Configure] must be called before [UpdaterSet].
func (*Factory) Configure ¶ added in v1.4.5
Configure implements driver.Configurable.
func (*Factory) UpdaterSet ¶ added in v1.4.5
UpdaterSet implements driver.UpdaterSetFactory.
type FactoryConfig ¶ added in v1.4.5
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 ¶ added in v1.5.1
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) Name ¶ added in v0.0.8
Name 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 ¶ added in v1.5.1
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 ¶ added in v0.4.2
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 ¶ added in v1.5.1
type Vulnerabilities map[string]*Vulnerability
Vulnerabilities maps vulnerability ID (CVE) -> related data
type Vulnerability ¶ added in v1.5.1
type Vulnerability struct {
Description string `json:"description"`
Releases map[string]ReleaseData `json:"releases"`
}
Vulnerability is data related to a vulnerability