ReviewOS

also looking at this

craft-native/craft

fix(security): validate vulnerability scans and pin scanner downloads

#300
Merged glennmichael123 wants to merge codex/failure-safe-vulnerability-scan into main
5 files +192 -56
docs/VULNERABILITY_SCANNING.mdadded+26-0
Changes to docs/VULNERABILITY_SCANNING.md
@@ -0,0 +1,26 @@
1# Vulnerability scan interpretation
2
3The SBOM workflow scans the repository inventory, including development tools,
4benchmark comparison applications and CI dependencies. It is not a runtime-only
5inventory and a match does not by itself establish reachability in a shipped app.
6
7The scanner must complete successfully and produce a populated-inventory report
8with valid database metadata. Missing output, malformed JSON, unexpected report
9shapes and scanner failures fail the job; none are interpreted as zero findings.
10The text report and severity counts are derived from the same JSON scan.
11Artifacts are retained on failure when the scanner produced diagnostic output.
12Each attempt removes previous JSON and text reports before validating its input.
13A failed rerun therefore cannot attach a previous successful summary alongside
14new diagnostics. Keep the input SBOM separate from the scanner's output files.
15
16The existing severity policy is unchanged: Critical findings fail the check;
17High findings emit an explicit warning and remain release-review items. A green
18scan is **not** release approval. Issue [#279](https://github.com/craft-native/craft/issues/279)
19tracks the reviewed High/Critical policy and shipping-scope analysis; issue
20[#276](https://github.com/craft-native/craft/issues/276) tracks locked dependency
21advisories. No baseline or vulnerability exemption is added by this workflow.
22
23Syft and Grype Linux x64 downloads are pinned by release version and SHA-256 in
24`.github/workflows/sbom.yml`. Tool updates must update both the asset URL and its
25digest using the upstream release metadata, then run the scanner regression
26tests and a real workflow scan. Mutable installer scripts are not executed.