Documentation
¶
Overview ¶
Package enrich builds the signals a scan ranks its findings with: exploitability, the age a cached feed may reach, and dependency health.
`draugr scan` and the MCP scan both call Load, so a setting the descriptor carries applies from either side. Each entry point assembling its own list is how one of them comes to rank without a signal the descriptor asked for, with nothing in the result saying so.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DepsDevEndpoint string
DepsDevEndpoint overrides where dependency health sends its lookups. Empty means deps.dev; a test in another package points it at its own server, as depsdev.Client.Endpoint does for one in that package.
Functions ¶
func DependencyHealthDetail ¶
func DependencyHealthDetail(cfg *saga.DependencyHealthConfig) string
DependencyHealthDetail says what dependency health sends and to whom, for a consent prompt, or "" when cfg does not enable it.
Types ¶
type Enrichment ¶
type Enrichment struct {
Options []engine.Option
Feeds []report.FeedProvenance
}
Enrichment is what a scan ranks with: the engine options that apply it, and the feeds it read.
func Load ¶
func Load(ctx context.Context, settings exploitdata.Settings, cfg *saga.DependencyHealthConfig, warn io.Writer) (Enrichment, error)
Load reads the exploitability feeds settings names and prepares dependency health when cfg enables it, and sets the age limit every cached feed is held to, including the ones scanners read for themselves.
Diagnostics from dependency health go to warn, because that signal never fails a scan.