suse

package
v1.5.36 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2025 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Overview

Package suse contains an Indexer, Matcher, and Updater for SUSE Linux and OpenSUSE.

Index

Constants

View Source
const (
	None      = "None"
	Low       = "Low"
	Moderate  = "Moderate"
	Important = "Important"
	Critical  = "Critical"
)

Variables

View Source
var (
	SLES suseType = "sles"
	LEAP suseType = "leap"
)
View Source
var (
	OSReleaseIDs   = []string{"sles", "opensuse", "opensuse-leap"}
	OSReleaseNames = []string{"SLES", "openSUSE Leap"}
)

Functions

func NormalizeSeverity added in v0.0.15

func NormalizeSeverity(severity string) claircore.Severity

Types

type DistributionScanner added in v0.0.14

type DistributionScanner struct{}

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

func (*DistributionScanner) Kind added in v0.0.14

func (*DistributionScanner) Kind() string

Kind implements scanner.VersionedScanner.

func (*DistributionScanner) Name added in v0.0.14

func (*DistributionScanner) Name() string

Name implements scanner.VersionedScanner.

func (*DistributionScanner) Scan added in v0.0.14

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

func (*DistributionScanner) Version() string

Version implements scanner.VersionedScanner.

type Factory added in v1.5.33

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

func (*Factory) Configure added in v1.5.33

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

Configure implements driver.Configurable.

func (*Factory) UpdaterSet added in v1.5.33

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

UpdaterSet implements driver.UpdaterSetFactory.

type FactoryConfig added in v1.5.33

type FactoryConfig struct {
	// URL indicates the base URL for the SecDB layout. It should have a trailing slash.
	URL string `json:"url" yaml:"url"`
}

FactoryConfig is the configuration accepted by the Factory.

type Matcher added in v0.1.0

type Matcher struct{}

Matcher implements driver.Matcher

func (*Matcher) Filter added in v0.1.0

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

Filter implements driver.Matcher

func (*Matcher) Name added in v0.1.0

func (*Matcher) Name() string

Name implements driver.Matcher

func (*Matcher) Query added in v0.1.0

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

Query implements driver.Matcher

func (*Matcher) Vulnerable added in v0.1.0

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 an Updater.

func WithURL

func WithURL(uri, compression string) Option

WithURL overrides the default URL to fetch an OVAL database.

type Updater

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

Updater implements driver.Updater for SUSE.

func NewUpdater

func NewUpdater(d *claircore.Distribution, opts ...Option) (*Updater, error)

NewUpdater configures an updater to fetch the specified Release.

func (*Updater) Name

func (u *Updater) Name() string

Name satisfies driver.Updater.

func (*Updater) Parse

Jump to

Keyboard shortcuts

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