Repository navigation
fix(core): bind extension catalog commit field to attestation source digest - #636
Merged
Merged
Conversation
…digest The extension-bundles.ts and extension-artifacts.ts catalogs carry a `commit` field, but nothing compared it against the commit the signed GitHub attestation actually vouches for -- it was format-checked and recorded, not verified provenance. Bind it: peek the catalog's own `commit` field ahead of its full parse and pass it as `gh attestation verify --source-digest` on the catalog's own attestation, then bind every subsequent asset attestation for that release to the same confirmed commit. A mismatch now fails closed instead of being trusted as an unverified label (#577). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ommit-to-attestation # Conflicts: # docs/RELEASE-SECURITY.md # llms-full.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/core/src/extension-bundles.ts,extension-artifacts.ts) carry acommitfield, but nothing compared it against the commit the signed GitHub attestation actually vouches for. It was format-checked (40-char hex) and recorded into the lockfile, but not bound to the attestation's own provenance -- a catalog with a truthful signature but a falsecommitlabel would have installed without complaint.gh attestation verify --source-digest, which GitHub CLI enforces against the certificate's cert-derived source digest (populated by the OIDC token, not the build script, so it can't be forged by whatever produced the catalog):packages/core/src/extension-transport.ts:attest()now takes an optionalcommitand, when given, appends--source-digest <commit>; addedpeekCatalogCommit(), a bounded pre-parse of just the catalog'scommitfield so it can be handed to the same attest call that verifies the catalog's own signature/signer-workflow/tag (fail-closed only -- a tampered peek just makes that call refuse).packages/core/src/extension-bundles.ts/extension-artifacts.ts: the catalog fetch is now bound viapeekCatalogCommit, and once the catalog's commit is confirmed, every subsequent bundle/artifact asset attestation for that release is bound to that same confirmed commit.scripts/verify-extension-bundles.ts(the release-side check that mirrors the CLI's install policy) binds the same way.test/extension-bundles.test.tsandtest/extension-artifacts.test.ts: a catalog whosecommitfield disagrees with the "true" attested commit (simulated via a fake transport standing in forgh's unforgeable source-digest check) is refused, and a matching catalog installs normally with both the catalog and asset attestations bound to the same commit. Also added a transport-level test provingcreateGithubTransport'sattest()appends--source-digestonly when a commit is supplied.docs/EXTENSIONS.md,docs/RELEASE-SECURITY.mdand theRIM-EXT-BUNDLE-001card indocs/RUNTIME-IMPLEMENTATION.mdto describe the binding instead of just "the catalog pins its commit".Fixes #577 per the triage decision: verification confirmed the binding did not exist before this change (checked
packages/core/src/extension-transport.tsandscripts/verify-extension-bundles.ts).Test plan
npm run typechecknode --test test/extension-bundles.test.ts test/extension-artifacts.test.ts(includes new [Bug]: verify that bundle/artifact catalog commit fields are bound to the attested commit #577 regression tests, all pass)npm run check(lint, code checks, docs checks including regeneratedllms-full.txt)npm run verify(full suite: 840 tests, 2 unrelated flaky failures intest/cli.test.tsandtest/provider-verification.test.tsthat pass individually in isolation -- confirmed unrelated to this change, both touch CLI process-spawning/deployment-probe timing, not extension bundles/artifacts)origin/mainin (picked up theRELEASE-OPERATIONS.mddoc split andextension-bundle-release.tsrefactor; no conflicts in the touched runtime files)Closes #577
🤖 Generated with Claude Code