Repository navigation
impl(068): qualification requires npm provenance after 0.5.0 (increment 1) - #571
Conversation
f7fc826 to
66956cc
Compare
AI review (findings)ReviewThe PR implements increment 1 of spec 068, adding npm provenance checking to the qualification harness and the Structural observations
Concrete defect
def provenance_required(version):
return tuple(int(part) for part in version.split('.')) > PROVENANCE_AFTERFor a version such as let core = version.split(['-', '+']).next().unwrap_or_default();and defaults to {"head": "66956ccbefff3debbbeb2f6732d2f520b6335667", "verdict": "findings", "findings": [{"path": "tools/rustev-release/qualify/harness.py", "line": 96, "severity": "low", "category": "correctness", "summary": "provenance_required splits on '.' and calls int() without stripping pre-release/build suffixes, so a version like '1.0.0-rc.1' raises an unhandled ValueError and crashes the harness; the Rust counterpart strips such suffixes per spec before comparing."}]}Subject: e457670...66956cc, diff digest 6e5c56a3460edd32c6beb01c797ad11f9d564dfd4757b173a2ef5ab76ae29f7e, 1 call(s). An AI comment is not an approval. |
…nt 1) The npm step of the fresh-consumer harness requires, for every release version after 0.5.0, an SLSA provenance attestation on each installed @rustev/* package, verified by npm and bound to the package's manifest integrity and this repository's release workflow at vX.Y.Z. Versions up to 0.5.0 keep A-74's rule. The step records npm_provenance per package, and rustev-release qualify refuses an npm step after 0.5.0 unless every package records verified.
66956cc to
8a653dd
Compare
AI review (no-findings)Reviewing the diff carefully against the governance documents and the implementation. spec.md: The lifecycle transition from harness.py – harness.py – harness.py – qualification.rs – qualify_harness.rs – npm-check subcommand: Writes no step file (confirmed by code). The Shared fixture Security surface: URL prefix enforcement ( No concrete defect was found against any named input. {"head": "8a653dd4db1e32eba4c508079b4e3cd6fa6f6a1f", "verdict": "no-findings", "findings": []}Subject: e457670...8a653dd, diff digest 1d0fb66da850e99deb0e427250e297bedaa822a33d2da6371dfd782b9090a6e3, 1 call(s). An AI comment is not an approval. |
Summary
Spec 068 increment 1 (#559): the fresh-consumer qualification's npm step requires npm provenance for every release after 0.5.0, and
rustev-release qualifyrefuses an npm step of such a version unless every@rustev/*package recordsverified.PROVENANCE_AFTER = (0, 5, 0)is a constant of the running harness, compared component by component; it is never read fromRUSTEV_QUALIFY_RELEASE_TREEor the manifest, so a default-branch harness qualifying an earlier tag cannot be loosened.@rustev/*package: the version document names an SLSA provenance attestation (npm_named, the predicate ofhosted.rs'snpm_has_provenance);npm audit signatures --include-attestationslists it in neitherinvalidnormissing; the bundle (only fromhttps://registry.npmjs.org/) holds exactly one SLSA statement whose single subject ispkg:npm/%40rustev/<name>@X.Y.Zwith the manifest integrity's SHA-512, built byhttps://github.com/statecrafting/rustev.github/workflows/release.ymlatrefs/tags/vX.Y.Z. Any network error, non-200, unparsable body or missing member fails the step naming the package and the check.npm_provenanceper package (verifiedornot_required), filled only once a package passed.qualification::Stepgains the member (optional, so older steps still parse);evidencerefuses a required npm step after 0.5.0 unless it lists at least one@rustev/*package and every one recordsverified(3.3.3).harness.py npm-checkruns the same checks over a recorded consumer, an audit report and fixture registry answers, and writes no step record.tests/qualify_harness.rscovers every row of section 5 and the boundary (0.3.0 and 0.5.0 grandfathered, 0.5.1, 0.6.0 and 1.0.0 not);tests/family.rscovers the step-file refusal and acceptance.tests/fixtures/npm-provenance-documents.jsonis shared:family.rsruns it throughnpm_responseand the harness test throughnpm_named, and both must agree.implementation: in-progress.No workflow edit (
qualify.yml,release.ymlunchanged), so no review exception is needed. Increment 2 (closure) records the real requalification runs of 0.6.0 (verified) and v0.5.0 (not_required) once this is onmain, and adds 068 toVERIFIED_SPECS.Read-only check against the public registry: the harness's live path reports
verifiedfor@rustev/rustevand@rustev/rustev-wasm0.6.0, and would refuse both at 0.5.0 (no provenance), which is why 3.3.1 grandfathers them.Checks
cargo test -p rustev-release --locked --test qualify_harness --test family(pass),make gate(pass),cargo fmt. Full crate tests, clippy-D warningsandspec-spine verify 068run locally in parallel with CI.