Repository navigation
impl(058): every npm package carries provenance (A-87) - #555
Conversation
AI review (findings)Review of PR 0b79f34Overview: This PR adds a fallback granular-token path for npm publishing when npm refuses the OIDC trusted-publishing exchange (npm/cli#9969), and enforces that every published npm package carries SLSA build-provenance attestation. Changes span the release workflow, spec 058, the release tool's lifecycle/hosted/tagged logic, and tests. MechanicsWorkflow ( Provenance check (
Test coverage: Finding
{"head": "0b79f34ac5edd395da31a18451f55927fb410347", "verdict": "findings", "findings": [{"path": "tools/rustev-release/src/hosted.rs", "line": 17, "severity": "low", "category": "correctness", "summary": "The Unattested arm in observe_crates is dead code: lifecycle.rs documents Unattested as npm-only, and the crates registry implementation does not produce this variant, creating a misleading inconsistency with the documented constraint."}]}Subject: 186dbc9...0b79f34, diff digest 952756db86b69284532cb838dbd59ac789fdb1e1c7bf0f7097a63bdddd9f58a1, 1 call(s). An AI comment is not an approval. |
AI review (no-findings)Reviewing the diff across all changed paths: workflow, decision record, spec, and the Rust implementation in
The configure-token step correctly writes the literal string
Old code chained
Checks
Spec 058 / A-87 The spec accurately describes the new behaviour: trusted publishing first, granular-token fallback when refused,
The test verifies that
No concrete defects found. {"head": "c8f1c479bd87825d1784a466455b33b255007d17", "verdict": "no-findings", "findings": []}Subject: 186dbc9...c8f1c47, diff digest f86ad653bacd7d33b28febe13a917acbef196a52cf904cbf388e18aacee20b98, 1 call(s). An AI comment is not an approval. |
…llback, unattested present fails (A-87)
c8f1c47 to
aaa5a7b
Compare
AI review (no-findings)Reviewing the diff for bugs, security defects, and inconsistencies against the governance context. Workflow: The configure step writes The secret is confined to
Old code:
Checks
Spec 058 amendments Section 3.3.2 replaces hand-publication with the fallback-token path; 3.3.4 (registry-token scope) is updated to name the exception; 3.5.2 adds the provenance-required idempotency rule. All three are consistent with the code and with A-87. Tests
No concrete defect found. {"head": "aaa5a7baa73fd0fd1dc9805badf5fe7230bb96ec", "verdict": "no-findings", "findings": []}Subject: e8f6653...aaa5a7b, diff digest ee0e0bf9d1387fd51aeeed0f931ee7a207e5d206549991b3187946ea536f78eb, 1 call(s). An AI comment is not an approval. |
…amends 031, 056 and 058) Proposes spec 068 for #559. A-87 (#555) makes every npm release after 0.5.0 carry provenance at publication, but the qualification's npm step still accepts a registry signature in place of provenance (A-74). The draft makes the step require a verified SLSA build-provenance attestation, bound to release.yml at the tag, for every version after 0.5.0; 0.1.0 to 0.5.0 keep A-74's rule. It records the NPM_TOKEN fallback's removal as a conditional follow-up. It changes no code and declares no extends edge; ratification is the owner's act.
…031, 056 and 058) Spec 068 for #559, ratified by the owner on 2026-11-08 (A-88) with every open question answered as recommended. A-87 (#555) makes every npm release after 0.5.0 carry provenance at publication, but the qualification's npm step still accepted a registry signature in place of provenance (A-74). For every version after 0.5.0 the step now requires a verified SLSA build-provenance attestation bound to the manifest integrity and to release.yml at the tag, enforced in the harness and again by rustev-release qualify; 0.1.0 to 0.5.0 keep A-74's rule. The NPM_TOKEN fallback's removal is recorded as a conditional follow-up. Declares the extends edge on tools/rustev-release/ (031, amending). Decision row A-88. Target: the release after 0.6.0.
Every npm package rustev releases now carries npm provenance (owner decision A-87, 2026-11-07, superseding A-74 for releases after 0.5.0).
What changes:
publish-npmkeeps npm trusted publishing (OIDC) as the first path. When npm refuses the exchange ([BUG] OIDC trusted publishing fails with "package not found" for GitHub repos that use immutable OIDC subject claims npm/cli#9969, immutable OIDC subject, still open), npm falls back to a granular token held only by thenpm-publishEnvironment asNPM_TOKEN.--provenancesigns with the job's OIDC token on both paths. Without the secret the job is trusted publishing only.Lookup::Unattested). A hand publish now turns the release red instead of being recordedpresent.verify-release's registry observation refuses it too.Evidence: v0.4.0, v0.4.1 and v0.5.0 each failed
publish-npmwithENEEDAUTHon the first attempt; npm lists every version as published by the owner's account; no@rustev/*version hasdist.attestations.Owner actions before 0.6.0:
@rustev/*packages (statecrafting/rustev,release.yml, environmentnpm-publish).@rustev/*as theNPM_TOKENsecret of thenpm-publishEnvironment (only needed while [BUG] OIDC trusted publishing fails with "package not found" for GitHub repos that use immutable OIDC subject claims npm/cli#9969 is open).Checks:
cargo test -p rustev-release --locked, clippy-D warnings, fmt,make gate. This changes.github/workflows/release.yml, so it needs thestatecraft-review-exceptionapproval.