allowlist

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 Renewal added in v0.11.3

type Renewal struct {
	ID string
	// ExpiredAt is the lapsed date the previous file carried.
	ExpiredAt string
}

Renewal records a surviving entry whose expiry had already lapsed and was restamped like a new acceptance.

type Stats

type Stats struct {
	Kept    int
	Renewed []Renewal
	Added   int
	Dropped []string
}

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). A surviving entry whose expiry is on or before today (lint's boundary) is renewed to the new-entry expiry instead: it already blocks lint, and the date change surfaces in the upgrade diff for review. Unexpired entries never move, so regeneration cannot roll a live acceptance forward.

Jump to

Keyboard shortcuts

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