vex

package
v1.5.30 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BaseURL is the base url for the Red Hat VEX security data.
	//
	//doc:url updater
	BaseURL = "https://security.access.redhat.com/data/csaf/v2/vex/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory creates an Updater to process all of the Red Hat VEX data.

[Configure] must be called before [UpdaterSet].

func (*Factory) Configure

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

Configure implements driver.Configurable

func (*Factory) UpdaterSet

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

UpdaterSet constructs one Updater

type FactoryConfig

type FactoryConfig struct {
	// URL indicates the base URL for the VEX.
	//
	// Must include the trailing slash.
	URL string `json:"url" yaml:"url"`
}

FactoryConfig is the configuration honored by the Factory.

The URL is where the updater expects the VEX data to be published (and must end with a slash).

type Updater

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

Updater is responsible from reading VEX data served at the URL and creating vulnerabilities.

func (*Updater) Configure

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

Configure implements driver.Configurable.

func (*Updater) DeltaParse

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

DeltaParse implements driver.DeltaUpdater.

func (*Updater) Fetch

func (*Updater) Name

func (u *Updater) Name() string

Name returns the name string of the Updater.

func (*Updater) Parse

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

Parse implements driver.Updater.

type UpdaterConfig

type UpdaterConfig struct {
	// URL overrides any discovered URL for the JSON file.
	URL string `json:"url" yaml:"url"`
}

UpdaterConfig is the configuration for the updater.

Jump to

Keyboard shortcuts

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