Documentation
¶
Overview ¶
Package epss provides a epss enricher.
Index ¶
- Constants
- func NewFactory() driver.UpdaterSetFactory
- type Config
- type EPSSItem
- 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, prevFingerprint 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.epss schema=none` // DefaultBaseURL is the default place to look for EPSS feeds. // epss_scores-YYYY-MM-DD.csv.gz needs to be specified to get all data DefaultBaseURL = `https://epss.cyentia.com/` )
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
func NewFactory() driver.UpdaterSetFactory
NewFactory creates a Factory for the EPSS enricher.
Types ¶
type Config ¶
type Config struct {
URL *string `json:"url" yaml:"url"`
}
Config is the configuration for Enricher.
type EPSSItem ¶
type EPSSItem struct {
ModelVersion string `json:"modelVersion"`
Date string `json:"date"`
CVE string `json:"cve"`
EPSS float64 `json:"epss"`
Percentile float64 `json:"percentile"`
}
EPSSItem represents a single entry in the EPSS feed, containing information about a CVE's Exploit Prediction Scoring System (EPSS) score and percentile.
type Enricher ¶
type Enricher struct {
driver.NoopUpdater
// contains filtered or unexported fields
}
Enricher provides EPSS 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)
func (*Enricher) FetchEnrichment ¶
func (e *Enricher) FetchEnrichment(ctx context.Context, prevFingerprint 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.