feat: store verified source attestation bundles in packages #2977
All Vouch review confidence checks passed
Residual risk 0.39 = Change Risk (0.70) × (1 − Review Confidence (0.44)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.70 · 378 lines diff across 14 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.355
Shallow Review Depth
shallow_review_depth
0.344
No Reviewer Assigned
no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #2977"
general
weight: 0.35
wolfv
Builds that verify source attestations (#2947) record which publishers were checked, but not the attestations themselves. Once the upstream attestation disappears, nobody can check that evidence again.
What changes
info/attestations/<sha256>.sigstore.json. PyPI provenance gets converted to a bundle. Only bundles that passed verification are stored, not the raw API responses, so the package contents don't depend on what the GitHub attestations API returns on a given day.finalized_sourcesgetsbundle_sha256, so a verifier knows which bundle covers which source and publisher.src_cache/attestations/and reuses a cached verification only while its bundle files still exist. Cache entries from 0.81.0 are verified once more.rebuild. Sources are verified against the package'sinfo/attestationsinstead of downloading the attestations again. Verification is the same as in a normal build: signature, subject digest and publisher checks. Packages without the folder download the attestations as before.sigstore.md,rebuild.mdandpackage_spec.md.Determinism
The bundle digests end up in the package, so the bytes have to be stable. In
sigstore-types0.16.0,Bundle::to_json()writes fixed fields in a fixed order, with no maps and no floats. The in-toto statement stays as base64 payload bytes and is never re-encoded. A new test fixes the stored bundle digests for the recorded flask and uv attestations, and checks that a stored bundle reads and writes back to the same bytes.Testing
rattler_build_source_cache, including the ignored network tests (59 passed), andrattler_build_recipe. clippy is clean.source.tar.gzwith both the release attestation and the provenance attestation.- The package contains 3 bundles. sigstore-python 4.6.0 verifies the stored flask and uv provenance bundles against the tarballs.
- A cached rerun makes no attestation downloads and still packages all 3 bundles. After the cached bundles are deleted, the build verifies again.
-
rebuilduses the bundled attestations and is bit-for-bit identical.- A tampered DSSE signature fails the rebuild, and so does a removed bundle.
- A 0.81.0 package rebuilds by downloading, as before.
Limitations
rebuildstill fetches the Sigstore trust root through TUF, so it isn't fully offline yet.publishers.