ospkg

package
v0.75.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 29 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedOS defines error for unsupported OS
	ErrUnsupportedOS = xerrors.New("unsupported os")
)

Functions

This section is empty.

Types

type Detector

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

Detector detects OS package vulnerabilities.

func NewDetector added in v0.69.4

func NewDetector(target types.ScanTarget, opts ...Option) (*Detector, error)

NewDetector creates a new Detector for the given scan target

func (*Detector) Detect

Detect detects the vulnerabilities

type Option added in v0.71.0

type Option func(*resolver)

Option configures a Detector. Options are provided for extensibility by users of Trivy as a library and are not used within Trivy itself.

func WithDriver added in v0.71.0

func WithDriver(family ftypes.OSType, drv driver.Driver) Option

WithDriver registers a driver for the given OS family, overriding the default one.

func WithSupplier added in v0.73.0

func WithSupplier(supplier driver.Supplier) Option

WithSupplier registers an additional supplier. It takes priority over the built-in suppliers and the standard OS-specific drivers. When called multiple times, the most recently registered supplier is tried first.

Jump to

Keyboard shortcuts

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