ubuntu

package
v0.0.13 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OSReleaseID   = "ubuntu"
	OSReleaseName = "Ubuntu"
)
View Source
const (
	OVALTemplateBzip = "https://people.canonical.com/~ubuntu-security/oval/com.ubuntu.%s.cve.oval.xml.bz2"
	OVALTemplate     = "https://people.canonical.com/~ubuntu-security/oval/com.ubuntu.%s.cve.oval.xml"
)

Variables

View Source
var AllReleases = map[Release]struct{}{
	Artful:  struct{}{},
	Bionic:  struct{}{},
	Cosmic:  struct{}{},
	Disco:   struct{}{},
	Precise: struct{}{},
	Trusty:  struct{}{},
	Xenial:  struct{}{},
}
View Source
var ReleaseToVersionID = map[Release]string{
	Artful:  "17.10",
	Bionic:  "18.04",
	Cosmic:  "18.10",
	Disco:   "19.04",
	Precise: "12.04",
	Trusty:  "14.04",
	Xenial:  "16.04",
}

Functions

func ResolveVersionCodeName

func ResolveVersionCodeName(osrelease map[string]string) string

Resolve iterates over each os-release entry and tries to find a release string. if found we return the found release in string form. if not found empty string is returned

Types

type Matcher

type Matcher struct{}

func (*Matcher) Filter

func (*Matcher) Filter(record *claircore.IndexRecord) bool

func (*Matcher) Name added in v0.0.8

func (*Matcher) Name() string

func (*Matcher) Query

func (*Matcher) Query() []driver.MatchConstraint

func (*Matcher) Vulnerable

func (*Matcher) Vulnerable(record *claircore.IndexRecord, vuln *claircore.Vulnerability) bool

type Release

type Release string
const (
	Artful  Release = "artful"
	Bionic  Release = "bionic"
	Cosmic  Release = "cosmic"
	Disco   Release = "disco"
	Precise Release = "precise"
	Trusty  Release = "trusty"
	Xenial  Release = "xenial"
)

type Updater

type Updater struct {
	// contains filtered or unexported fields
}

Updater implements the claircore.Updater.Fetcher and claircore.Updater.Parser interfaces making it eligible to be used as an Updater.

func NewUpdater

func NewUpdater(release Release) *Updater

func (*Updater) Fetch

func (u *Updater) Fetch(ctx context.Context, fingerprint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error)

func (*Updater) Name

func (u *Updater) Name() string

func (*Updater) Parse

func (u *Updater) Parse(ctx context.Context, contents io.ReadCloser) ([]*claircore.Vulnerability, error)

Jump to

Keyboard shortcuts

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