oracle

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OSReleaseID   = "ol"
	OSReleaseName = "Oracle Linux Server"
)
View Source
const (
	NA        = "N/A"
	Low       = "LOW"
	Moderate  = "MODERATE"
	Important = "IMPORTANT"
	Critical  = "CRITICAL"
)
View Source
const (
	OracleLinux5Platform = "Oracle Linux 5"
	OracleLinux6Platform = "Oracle Linux 6"
	OracleLinux7Platform = "Oracle Linux 7"
	OracleLinux8Platform = "Oracle Linux 8"
)

Variables

This section is empty.

Functions

func NormalizeSeverity

func NormalizeSeverity(severity string) claircore.Severity

func UpdaterSet

func UpdaterSet(_ context.Context) (driver.UpdaterSet, error)

Types

type DistributionScanner

type DistributionScanner struct{}

DistributionScanner attempts to discover if a layer displays characteristics of a Oracle distribution

func (*DistributionScanner) Kind

func (*DistributionScanner) Kind() string

Kind implements scanner.VersionedScanner.

func (*DistributionScanner) Name

func (*DistributionScanner) Name() string

Name implements scanner.VersionedScanner.

func (*DistributionScanner) Scan

Scan will inspect the layer for an os-release or lsb-release file and perform a regex match for keywords indicating the associated Oracle 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

func (*DistributionScanner) Version() string

Version implements scanner.VersionedScanner.

type Matcher

type Matcher struct{}

Matcher implements driver.Matcher

func (*Matcher) Filter

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

Filter implements driver.Matcher

func (*Matcher) Name

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 Option

type Option func(*Updater) error

Option configures the provided Updater.

func WithClient

func WithClient(c *http.Client) Option

WithClient returns an Option that will make the Updater use the specified http.Client, instead of http.DefaultClient.

func WithURL

func WithURL(uri, compression string) Option

WithURL overrides the default URL to fetch an OVAL database.

type Release

type Release string
const (
	Eight Release = "8"
	Seven Release = "7"
	Six   Release = "6"
	Five  Release = "5"
)

type Updater

type Updater struct {
	ovalutil.Fetcher // Fetch method promoted via embed
	// contains filtered or unexported fields
}

Updater implements driver.Updater for Oracle Linux.

func NewUpdater

func NewUpdater(year int, opts ...Option) (*Updater, error)

NewUpdater returns an updater configured according to the provided Options.

If year is -1, the "all" database will be pulled.

func (*Updater) Name

func (u *Updater) Name() string

Name satifies the driver.Updater interface.

func (*Updater) Parse

Jump to

Keyboard shortcuts

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