Incremental reporting for pull requests.
- Baselines (
--baseline report.json): findings whose fingerprint is in a previous JSON report are hidden. Fingerprints include the verdict, so an advisory that moves fromunreachabletoreachableis new, and the escalation is reported. - Git diffs (
--diff <ref>): keep findings tied to changed packages or files. Keep every actionable finding unless a baseline establishes that it was already known. A current witness alone cannot establish the verdict at the base revision.
Both fail open: when the baseline or the Git data cannot be read, every finding is kept and a warning explains why.
Summary
Functions
Hides findings present in the baseline. Returns the remaining findings and warnings (escalations, number of hidden findings).
Serializable baseline document of a report.
Scanner post-processing step for --baseline.
Packages added or whose locked identity changed since ref.
Scanner post-processing step for --diff <ref>.
Stable identity of a locked package for baseline comparisons.
Reads a baseline or a full JSON report. Entries without enough evidence to compare the version, severity and policy state cannot hide a finding.
Writes the baseline of a report to path.
Functions
@spec apply_baseline( [VulnCheck.Types.Finding.t()], [map()], VulnCheck.Types.Workspace.t() | nil ) :: {[VulnCheck.Types.Finding.t()], [String.t()]}
Hides findings present in the baseline. Returns the remaining findings and warnings (escalations, number of hidden findings).
@spec baseline_document(VulnCheck.Types.ScanReport.t()) :: map()
Serializable baseline document of a report.
Scanner post-processing step for --baseline.
@spec changed_packages(VulnCheck.Types.Workspace.t(), String.t(), String.t()) :: {:ok, MapSet.t(String.t())} | {:error, term()}
Packages added or whose locked identity changed since ref.
Scanner post-processing step for --diff <ref>.
@spec package_identity(VulnCheck.Types.Workspace.t() | nil, String.t()) :: String.t() | nil
Stable identity of a locked package for baseline comparisons.
Reads a baseline or a full JSON report. Entries without enough evidence to compare the version, severity and policy state cannot hide a finding.
@spec write_baseline(VulnCheck.Types.ScanReport.t(), Path.t()) :: :ok | {:error, term()}
Writes the baseline of a report to path.