Repository navigation
ci: one token, one publishing environment, SHA-pinned actions - #145
Merged
Merged
Conversation
The pipeline's credentials, consolidated after the Scoop bucket joined the destinations: - ONE secret, CI_DEVCOACH_TOKEN (the admin's fine-grained PAT: Contents RW on dev-coach and on homebrew-tap, scoop-bucket, claude-plugins-marketplace, claude-plugins-marketplace-beta). It replaces RELEASE_TOKEN in `bump` and HOMEBREW_TAP_TOKEN / SCOOP_BUCKET_TOKEN / CLAUDE_PLUGIN_MARKETPLACE / the BETA_MARKETPLACE_DEPLOY_KEY in the four publishing jobs, which now all clone and push the same way. - The four publishing jobs run in a single `publishing` environment whose deployment branch policy (develop, main, v* tags) refuses them on any other ref — the control that keeps the token away from PR branches. The per-destination environments are no longer referenced. - The token is read in the one step that pushes (job-level HAS_TOKEN boolean, since `secrets` is not available in a step's `if`) and reaches git as an HTTP header through scripts/ci/git-token-auth.sh: never in a clone URL, never in the clone's .git/config, base64 form masked in the log. - Every `uses:` in the four workflows is pinned to a full commit SHA with the version as a comment; Dependabot's github-actions ecosystem bumps pin and comment together. Claude-Session: https://claude.ai/code/session_01LWas1iLGAaSFTxXrcucoSr
The token was stored as an environment secret, which is the tighter place for it; the bump job had no environment and would have read an empty token at the next release. It now runs in `publishing` like the four publishing jobs — one secret, one place, and the branch policy (develop, main, v*) is exactly where a release is dispatched from. Claude-Session: https://claude.ai/code/session_01LWas1iLGAaSFTxXrcucoSr
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.
What
The pipeline's credentials, consolidated after the Scoop bucket joined the destinations.
CI_DEVCOACH_TOKEN— the admin's fine-grained PAT (Contents RW on dev-coach andon homebrew-tap, scoop-bucket, claude-plugins-marketplace, claude-plugins-marketplace-beta). It
replaces
RELEASE_TOKENinbumpandHOMEBREW_TAP_TOKEN/SCOOP_BUCKET_TOKEN/CLAUDE_PLUGIN_MARKETPLACE/BETA_MARKETPLACE_DEPLOY_KEYin the four publishing jobs, which nowall clone and push the same way (the beta job leaves its ssh deploy key behind).
publishingenvironment forbump,marketplace-beta,homebrew,scoop,marketplace,holding the secret, with a deployment branch policy —
develop,main,v*tags — that refusesthose jobs on any other ref before they start. This is the control that keeps the token off PR branches; a fork's
pull_requestrun never had secrets, and the onepull_request_target(CLA) runs a fixed actionwithout checking out PR code.
HAS_TOKENboolean, since
secretsis not available in a step'sif), and handed to git as an HTTP header byscripts/ci/git-token-auth.sh— never in a clone URL, never in the clone's.git/config, base64form masked in the log.
Dependabot's
github-actionsecosystem bumps pin and comment together. A moved tag is how CIsecrets were actually stolen in 2025 (tj-actions/changed-files).
No user-facing change; CHANGELOG untouched.
Before merging
CI-DEVCOACH-TOKENexists with the five repos and Contents RW, and is stored as thesecret
CI_DEVCOACH_TOKENof thepublishingenvironment (done 2026-11-08) — the beta job readsit on the first push to
developafter the merge,bumpon the next release.After the first green run
RELEASE_TOKEN,HOMEBREW_TAP_TOKEN,CLAUDE_PLUGIN_MARKETPLACE, theenvironment secret
BETA_MARKETPLACE_DEPLOY_KEY, the deploy key on the beta repo, and the two oldPATs; the environments
homebrew-tap,scoop-bucket,claude-marketplaceare unreferenced.(only after this PR is on
develop, or the running workflows fail).Verification
uses:resolves to the SHA its tag pointed at on2026-11-08 (11 actions, exact versions in the comments); no old secret name remains in
.github/.marketplace-betajob runs on every push todevelop, so the merge itself exercises the newtoken path end to end.