Documentation
¶
Overview ¶
Package allowlist derives an entry's security/allowlist.yaml from the blocking findings of a fresh scan. Hand-curating a per-CVE list stops being review and starts being transcription once images bump on their own schedule — so the machine transcribes, and the PR review is where the risk is actually accepted.
Three rules make the regenerated file trustworthy rather than a rubber stamp: findings that no longer appear are DROPPED (a stale accept is indistinguishable from a live one); surviving entries KEEP their original expired_at (regeneration must never roll the clock forward — the expiry is the whole forcing function; new entries get today+newDays); and per-entry notes are preserved verbatim (statements are machine facts, human reachability analysis lives in notes).
Everything here is pure: findings in, entries and rendered bytes out. The wall clock is a parameter, and derivation runs only during upgrade — never validate — because the finding set moves with the vulnerability databases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
func Render(entries []spec.AllowlistEntry, preamble string) []byte
Render produces the generated allowlist file: license header, GENERATED banner, the manifest's preamble as comments, then the entries. expired_at is always double-quoted, matching the hand-written allowlists' style so a chart opting in produces no gratuitous diff.
Types ¶
type Finding ¶
type Finding struct {
// ID is the primary identifier the scanner reported (CVE, GHSA, GO-...).
ID string
// Package is the affected artifact name.
Package string
// Installed is the version the locked image ships.
Installed string
// FixedIn lists the advisory's fixed versions across release branches.
FixedIn []string
}
Finding is one blocking (already severity-filtered) scan finding for one image. The same ID appears once per image reporting it; derivation aggregates them.
type Stats ¶
Stats summarizes one derivation for narration.
func Derive ¶
func Derive(findings []Finding, prev *spec.Allowlist, today time.Time, newDays int) ([]spec.AllowlistEntry, Stats)
Derive regenerates the allowlist entries from findings against the previous file. Entries come out sorted by ID; surviving IDs keep their previous expiry and notes, new IDs expire newDays after today, and previous IDs no longer reported are dropped (returned in Stats).