debian

package
v1.4.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2023 License: Apache-2.0 Imports: 31 Imported by: 4

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

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 on either the archive or mirror, and have an OVAL database.

[Configure] must be called before [UpdaterSet].

func NewFactory added in v1.4.5

func NewFactory(ctx context.Context) (*Factory, error)

NewFactory constructs a Factory.

[Configure] must be called before [UpdaterSet].

func (*Factory) Configure added in v1.4.5

func (f *Factory) Configure(ctx context.Context, cf driver.ConfigUnmarshaler, c *http.Client) error

Configure implements driver.Configurable.

func (*Factory) UpdaterSet added in v1.4.5

func (f *Factory) UpdaterSet(ctx context.Context) (driver.UpdaterSet, error)

UpdaterSet implements driver.UpdaterSetFactory.

type FactoryConfig added in v1.4.5

type FactoryConfig struct {
	// ArchiveURL is a URL to a Debian archive.
	ArchiveURL string `json:"archive_url" yaml:"archive_url"`
	// MirrorURL is a URL to an active Debian mirror.
	MirrorURL string `json:"mirror_url" yaml:"mirror_url"`
	// OVALURL is a URL to a collection of OVAL XML documents.
	OVALURL string `json:"oval_url" yaml:"oval_url"`
}

FactoryConfig is the configuration honored by the Factory.

All URLs need trailing slashes.

The "archive" and "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 "OVAL" URL expects to have OVAL XML documents named "oval-definitions-${name}.xml", where "name" is the release's code name (e.g. "wheezy", "buster").

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

func (*Matcher) Name() string

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 UpdaterConfig added in v0.4.2

type UpdaterConfig struct {
	OVALURL  string `json:"url" yaml:"url"`
	DistsURL string `json:"dists_url" yaml:"dists_url"`
}

UpdaterConfig is the configuration for the updater.

By convention, this is in a map called "debian/updater/${RELEASE}", e.g. "debian/updater/buster".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL