ci(provisioning): don't persist checkout token while caller code runs - #1114
Merged
Merged
Conversation
provision-check.sh runs the caller's ./launcher.sh, so a GITHUB_TOKEN left in .git/config by actions/checkout was readable by caller-controlled code (CodeRabbit on #1113, CWE-522). No later step pushes or fetches, so set persist-credentials: false on both checkouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W5CoaksP2Bg21HpDCgFgwS
hyperpolymath
enabled auto-merge (squash)
October 1, 2026 17:46
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Follow-up to #1113. Its hardening commit (
11239800) was pushed after automerge was armed. GitHub squash-merged the earlier head16b0a9b4at 17:41:00Z, so the commit never reachedmain. This PR re-applies it unchanged.What
In
.github/workflows/provisioning-check-reusable.yml, bothactions/checkoutsteps now setpersist-credentials: false:launcher.sh, which is caller code. With the defaultpersist-credentials: true, the job'sGITHUB_TOKENwould sit in.git/configwhile that code runs..standards-checkout(canon): the token is never needed after checkout.Neither checkout pushes or fetches again, so nothing depends on the persisted token.
Verification
git diff origin/main --stat: 1 file, 3 insertions.gh actions-lock --no-fix: rc=0. Nouses:lines touched.actionlint1.7.7: rc=1, only on the pre-existingjob.workflow_shalines (50, 89). That is a documentedjobcontext property which this actionlint release predates. It is identical onmain, not introduced here.🤖 Generated with Claude Code
https://claude.ai/code/session_01W5CoaksP2Bg21HpDCgFgwS