SP-4's exit criterion was "command line + JSON fixture pinned". The command line was pinned in prose in Phase 0; the fixture never was, so every claim about pip-audit's output in PRD, SECURITY and CODE-HEALTH-SPEC has been unchecked since. It is captured now, from the pinned 2.10.1 against the spike's own `urllib3==2.0.0` environment, and `crates/pipdock-core/src/audit.rs` is written against it rather than against the documents. Four things running it settled, none of which reading could: - **No severity exists, under either service.** The vuln object is exactly `id`, `fix_versions`, `aliases`, `description`; pip-audit's service model has no severity field at all. PRD P1-1's "severity-sorted" and SECURITY §6's "(CVE/GHSA id, severity, fixed-in)" were both written against a field that has never existed. The next commit corrects them; `sort_advisories` orders by package, then by whether anything *fixes* it, then by id — the one distinction that changes what a user can do. Deriving a severity from the id's year or the prose would be a number PipDock invented, shown beside real ones. - **The ids are `PYSEC-*`, so the default service is PyPI**, and the CVE is an alias. Leaving that default is what keeps `legal/PRIVACY-POLICY.md` §3's "exactly one destination" true — and it costs nothing: the same environment under `--vulnerability-service osv` returns the *same eight advisories*, set difference empty in both directions. - **Ids repeat**, so dedup is load-bearing rather than tidy. Ten rows for eight advisories under PyPI; sixteen for the same eight under OSV. Keyed on `(pkg, id)`, because one advisory can legitimately apply to two installed packages. - **stderr carries a `pip-compile` advisory on every run**, so stdout is parsed first and failure classified only if that fails — SP-1's rule for uv, which writes its plan to stderr for the same reason. `advisory_url` builds the OSV link from a **validated** id rather than taking a URL out of the tool's JSON. That is the difference between this and `PdHealthReport`'s `finding.url`, which `capabilities/external-links.json` calls out as the only URL in the application derived from a third party's output: a whitelist of ASCII alphanumerics and `-` cannot produce a `/`, `?`, `#`, `:` or `%`, so nothing that passes can be anything but a path segment under one host. Ten hostile ids are asserted to get no link at all. No wire registration yet — the types derive `JsonSchema` but stay out of `SCHEMA_TYPES` until a command returns one, exactly as P2 held `ToolsManifest` back until P3 had a use for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2.1 KiB
pip-audit capture
SP-4's exit criterion asked for "command line + JSON fixture pinned". The command line was pinned
in prose in spikes/README.md in Phase 0; the fixture never was, and P1-1 needed it.
Captured 2026-08-18 with the ledger's pinned pip-audit 2.10.1, against the spike's own target
environment (spikes/out/target-env, a Python 3.12 venv holding urllib3==2.0.0), by the exact
invocation SECURITY §6 and SP-4 settled on:
pip-audit -r spikes/out/freeze.txt --no-deps -f json
Exit code 1 — findings, not failure.
Not redacted, and it does not need to be: unlike the pip/uv captures there is no path, no
duration, no address and no environment marker in it. The only :// in the file is inside the
advisory prose. spikes/capture.py does not produce this, for the same reason it does not produce
health/sample — reconstructing the seeded environment is the expensive part, not the run.
What it pins, and why each matters
PYSEC-*ids. pip-audit's default vulnerability service is PyPI, not OSV. That is what lets PipDock keeplegal/PRIVACY-POLICY.md§3's "exactly one destination" true.aliasescarries theCVE-*andGHSA-*. PRD P1-1 says "known CVEs"; the CVE is an alias, never the primary id.- Duplicate ids.
PYSEC-2023-192andPYSEC-2023-212each appear twice, so the ten rows here are eight advisories. The same run under--vulnerability-service osvreturns sixteen rows and the same eight — the set difference is empty in both directions, so the service choice costs no coverage and dedup is load-bearing either way. - No severity field, under either service. The keys are exactly
id,fix_versions,aliasesanddescription; pip-audit's own service model has no severity at all. PRD P1-1's "severity-sorted" and SECURITY §6's "(CVE/GHSA id, severity, fixed-in)" were both written against a field that does not exist, and P1-1 corrects them rather than inventing one.
urllib3-2.0.0.stderr.txt is the companion: pip-audit writes a pip-compile/hashes advisory to
stderr on every run, which must never be read as failure.