Repository navigation
fix(core): make extension bundle verification failures diagnosable (#579) - #601
Merged
Merged
Conversation
) - Pass a bounded, sanitized excerpt of `gh attestation verify` output and the applied policy through on refusal instead of discarding it. - Check `init --with` / `extension-bundles install` names against the bundles this core builds before any network call, with did-you-mean. - Report an unreachable GitHub as such, naming the release being fetched. - Release workflow: a dispatch from main only creates the tag and re-dispatches on it, so build and attestation run on refs/tags/<release>; verify assets with the CLI's own transport before and after publishing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…errors # Conflicts: # llms-full.txt # scripts/README.md
The merge with origin/main lost #596's timeout-minutes on the job that builds/attests/publishes bundles, since that job was split into tag/publish in #601. Restore it on publish (the tag job already got one from the merge). Co-Authored-By: Claude Sonnet 5 <[email protected]>
…errors # Conflicts: # 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.
Refs #579
Problem and change
urlcode init --with authon 0.5.9 fails withGitHub attestation verification refused the extension bundle. The cause is that[email protected]was attested by aworkflow_dispatchrun onrefs/heads/main, and the CLI verifies--source-ref refs/tags/<release>. The CLI discardedgh's output, so the cause was invisible. This PR leaves the verifier policy as it is. It does not touch the published release.CLI / transport (
packages/core/src/extension-transport.ts,extension-bundles.ts,init-with.ts)gh attestation verifyoutput is captured (at most 16 KiB) and not discarded. The refusal error now carries the policy applied (signer workflow andrefs/tags/<release>). It also carries a single-line excerpt of at most 600 characters, with ANSI/control characters stripped, that keeps the lines stating the refusal. Example:expected SourceRepositoryRef to be refs/tags/[email protected], got refs/heads/main.init --withandextension-bundles installcheck names againstBUNDLE_CATALOG_NAMES(the listextension-bundles listprints) before any network call. A typo gets a suggestion:Unknown extension bundle auht; did you mean auth? Known bundles: .... The check applies only with the production GitHub transport. An injected transport brings its own catalog, and the signed catalog stays authoritative.Could not reach GitHub to fetch extension bundle release extension-bundles@vX (ENOTFOUND); check the network connection, .... Before, it fell through to the genericOperation failed…. Offline transport itself is still init --with has no offline/local-bundle transport for extension bundles #533.Release workflow (
.github/workflows/extension-bundles.yml)mainrun. The Sigstore certificate records the run's own ref, so the result could never satisfy the CLI. Now a dispatch frommainruns atagjob only: it creates or resumes the tag, then runsgh workflow run extension-bundles.yml --ref <tag>. That needsactions: write, and a GITHUB_TOKENworkflow_dispatchdoes start a new run. Thepublishjob runs only whengithub.ref_type == 'tag', so every attestation namesrefs/tags/<release>. For a dispatch, the tag must equalextension-bundles@v<inputs.version>. Theupdate-refworkaround is gone.scripts/verify-extension-bundles.tsuses the CLI's owngithubBundleTransport(same signer workflow and--source-ref), plus catalog parsing, the core-version pin, the archive checks, and a check that catalog names matchBUNDLE_CATALOG_NAMES. It runs once beforegh release create, so a release the CLI would refuse is never published. It runs again on the assets downloaded back from the published release.releaseapprovals, one for the tagging run and one for the tag build. The docs are updated. I kept the tagging job behind the environment rather than loosening it. Thereleaseenvironment already allowsextension-bundles@v*tag deployments.Still needed (maintainer action, which is why this PR is Refs, not Closes): the published v0.5.9 bundle release still carries
refs/heads/mainprovenance, soinit --withon 0.5.9 keeps failing. The error message now shows why. Re-issue the bundle release from its tag, or cut the next core and bundle release through this workflow.Verification
node --test test/extension-bundles.test.ts test/init-with.test.ts test/project-dependencies.test.ts test/release-dispatch.test.ts: all pass. The new tests cover:ghoutput passthrough, using a fakeghon PATH (skipped on Windows).fetchis never called.init --with auth,auhtrefusal.main, and the verification steps sit before and aftergh release create.npm run typecheck: pass.npm run verify: pass (core 781 and 91 tests). The auth password-hash contention test ([Bug]: auth password hashing returns 503 to every caller when two global slots are busy #464/[Bug]: Windows CI flake in auth password-hashing contention test (auth-core.test.ts:489, #464) #506) failed once while 11 parallel agents were loading this machine. It passed on rerun, andnpm run verify:workspacesthen passed in full.npm run test:package: pass.gh release downloadcheck.Compatibility and security
The verifier policy is unchanged: same signer workflow,
--source-ref refs/tags/<release>and--deny-self-hosted-runners.Error text includes excerpts of
ghoutput. They are bounded, control characters are stripped, and they contain no tokens (ghdoes not print them).The workflow gains
actions: writeon the tag job only. The publish job's permissions are unchanged.Changes match the documented portable contract; docs/examples are updated where needed.
Relevant tests and package checks pass, or limitations are explained above.
No credentials, customer data or private project material are included.
Runtime/starter changes remain aligned where applicable.
🤖 Generated with Claude Code