Documentation
¶
Overview ¶
Package enrich is the sixth pipeline stage: it derives tier, scopes, org, first_seen, age and dollars at risk per day from verify evidence and the spend registry.
Index ¶
Constants ¶
const Noop = "noop"
Noop is the name of the adapter that changes nothing.
const Spend = "spend"
Spend is the name of the adapter that prices exposure from the spend registry.
Variables ¶
This section is empty.
Functions ¶
func ApplyFirstSeen ¶
ApplyFirstSeen sets FirstSeen and AgeDays on f from its commit Locations. It runs after the barrier, once every Location of the finding has been merged, because an enricher that runs per candidate cannot see them all.
FirstSeen is the earliest commit Location: the smallest date, then the smallest commit id. AgeDays is the whole days from that date to generatedAt, never below 0. A finding with no dated commit Location keeps its FirstSeen and AgeDays as they are (nil for a fresh finding). It sets no other field.
Types ¶
type Enricher ¶
Enricher is the enrich stage interface. Enrich sets only the enrichment fields (Tier, Scopes, Org, FirstSeen, AgeDays and the dollar fields).