Documentation ¶
Overview ¶
Package cvss provides a cvss enricher.
Index ¶
- Constants
- type Config
- type Enricher
- func (e *Enricher) Configure(ctx context.Context, f driver.ConfigUnmarshaler, c *http.Client) error
- func (e *Enricher) Enrich(ctx context.Context, g driver.EnrichmentGetter, ...) (string, []json.RawMessage, error)
- func (e *Enricher) FetchEnrichment(ctx context.Context, hint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error)
- func (*Enricher) Name() string
- func (e *Enricher) ParseEnrichment(ctx context.Context, rc io.ReadCloser) ([]driver.EnrichmentRecord, error)
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. 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) Enrich ¶
func (e *Enricher) Enrich(ctx context.Context, g driver.EnrichmentGetter, r *claircore.VulnerabilityReport) (string, []json.RawMessage, error)
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) ParseEnrichment ¶
func (e *Enricher) ParseEnrichment(ctx context.Context, rc io.ReadCloser) ([]driver.EnrichmentRecord, error)
ParseEnrichment implements driver.EnrichmentUpdater.
Click to show internal directories.
Click to hide internal directories.