cvss

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package cvss provides a cvss enricher.

Index

Constants

View Source
const (
	// Type is the type of data returned from the Enricher's Enrich method.
	Type = `message/vnd.clair.map.vulnerability; enricher=clair.cvss schema=https://csrc.nist.gov/schema/nvd/feed/1.1/cvss-v3.x.json`
	// DefaultFeeds is the default place to look for CVE feeds.
	//
	// The enricher expects the structure to mirror that found here: files
	// organized by year, prefixed with `nvdcve-1.1-` and with `.meta` and
	// `.json.gz` extensions.
	//
	//doc:url updater
	DefaultFeeds = `https://nvd.nist.gov/feeds/json/cve/1.1/`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FeedRoot *string `json:"feed_root" yaml:"feed_root"`
}

Config is the configuration for Enricher.

type Enricher

type Enricher struct {
	driver.NoopUpdater
	// contains filtered or unexported fields
}

Enricher provides CVSS data as enrichments to a VulnerabilityReport.

Configure must be called before any other methods.

func (*Enricher) Configure

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

Configure implements driver.Configurable.

func (*Enricher) Enrich

Enrich implements driver.Enricher.

func (*Enricher) FetchEnrichment

func (e *Enricher) FetchEnrichment(ctx context.Context, hint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error)

FetchEnrichment implements driver.EnrichmentUpdater.

func (*Enricher) Name

func (*Enricher) Name() string

Name implements driver.Enricher and driver.EnrichmentUpdater.

func (*Enricher) ParseEnrichment

func (e *Enricher) ParseEnrichment(ctx context.Context, rc io.ReadCloser) ([]driver.EnrichmentRecord, error)

ParseEnrichment implements driver.EnrichmentUpdater.

Jump to

Keyboard shortcuts

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