Documentation
¶
Overview ¶
Package norn evaluates scan results against policy to produce a verdict (pass/fail) per control and overall. It begins with declarative severity thresholds; a richer policy language (e.g. OPA/Rego) can follow.
The Norns decide fate — here, the fate of a release.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlOutcome ¶
type ControlOutcome struct {
Control string
Verdict Verdict
Highest sarif.Level
HighestPriority string
Counts sarif.Counts
Threshold sarif.Level
}
ControlOutcome is the verdict for a single control.
type Policy ¶
Policy decides verdicts from findings. A control fails when its most severe finding is at least as severe as the applicable threshold. FailOn is the default threshold; PerControl overrides it for named controls. The zero value fails on error.
FailOnPriority adds component-aware gating: when set (e.g. "P1"), a control also fails if any of its findings has a priority band at least that urgent. Because a finding's priority already combines its severity with its component's exposure and criticality, this gates per component without a separate per-component threshold.
type Result ¶
type Result struct {
Verdict Verdict
Controls []ControlOutcome
}
Result is the overall evaluation across all controls.