Add vulnerability scanning on top of the SBOM
The SBOM was generated and installed onto every server, and nothing read it. "Are we exposed to this advisory" was still a person going and looking, which meant it happened when somebody remembered to. scripts/scan_sbom.py queries OSV.dev by purl - no account, no API key, no agent, no vulnerability database to maintain on a box that cannot reach the internet. The SBOM is already the input OSV wants, so this is a lookup against what shipped rather than a second scan of the tree that could disagree with it. Three decisions worth recording: Shipped and build-only findings are both reported, but only shipped ones can fail a build. Two thirds of the components here are build tooling the SBOM already marks scope 'excluded', and the highest-severity match in the whole tree today is a CRITICAL against the test runner. A gate that fails a release over that trains everybody to bypass it, and then it catches nothing. Severity is taken from the advisory, never derived. Where there is only a CVSS vector the report says UNKNOWN, which is shown and never gates. A guessed score is worse than an honest gap because somebody would act on it. The allowlist is a record rather than a mute button: each entry carries the reason, the accepter, the date, and what would invalidate the reasoning. The first entry is a worked example - a PyJWT algorithm-confusion advisory that needs both mixed algorithm families and a raw JSON JWK as the key, and this application configures neither. The report ends with a per-component upgrade rollup, since that is the part somebody acts on. A target on a different major version is labelled rather than listed beside patch bumps as though the two cost the same. Current state: 8 shipped components have fixes available, none of them exploitable through a path this application opens today.
This commit is contained in:
@@ -52,6 +52,13 @@ venv/bin/python scripts/gen_project_map.py --check
|
||||
A new plugin table means updating `PLUGIN_TABLE_OWNERS` and
|
||||
`EXPECTED_HEAD_REVISION` in `tests/test_plugin_migrations.py`.
|
||||
|
||||
Dependencies have their own check. It needs the network, so it is not in the
|
||||
suite - run it before a release, and see `docs/DEPENDENCY-SECURITY.md`:
|
||||
|
||||
```bash
|
||||
venv/bin/python scripts/scan_sbom.py --gate # exit 1 on a SHIPPED finding
|
||||
```
|
||||
|
||||
## Database
|
||||
|
||||
- **Active:** `shopdb_flask` (MySQL, asset-based schema)
|
||||
|
||||
Reference in New Issue
Block a user