ci: pin claude-code-action to SHA + restrict contextualize to same-repo PRs (CodeQL)#33
Open
jhamon wants to merge 1 commit into
Open
ci: pin claude-code-action to SHA + restrict contextualize to same-repo PRs (CodeQL)#33jhamon wants to merge 1 commit into
jhamon wants to merge 1 commit into
Conversation
…po PRs (CodeQL) - Pin anthropics/claude-code-action@v1 -> @e90deca # v1.0.171 in both contextualize-skills.yml and claude.yml. Fixes 2x actions/unpinned-tag. - Harden contextualize-skills against actions/untrusted-checkout: the job checks out the PR head and runs Claude Code over it WITH the ANTHROPIC_API_KEY secret, contents: write, and pull-requests: write, then pushes commits back. Add an explicit `head.repo.full_name == github.repository` guard so a fork PR can never reach this privileged, secret-bearing path. Combined with the existing sync/skills- branch filter, only the internal skills-sync automation triggers it. claude.yml was already least-privilege (contents: read; gated on author_association OWNER/MEMBER/COLLABORATOR) and needed only the pin. The 2 untrusted-checkout alerts are dismissed (won't fix) with this compensating control as the documented reason. Refs PIN-24. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Addresses the 4 CI/Actions-hygiene CodeQL alerts.
actions/unpinned-tag(2)Pin
anthropics/claude-code-action@v1→@e90deca# v1.0.171in bothcontextualize-skills.ymlandclaude.yml.actions/untrusted-checkout/medium(2, both on contextualize-skills.yml)This job is privileged: it checks out the PR head and runs Claude Code over that content with the
ANTHROPIC_API_KEYsecret,contents: write, andpull-requests: write(and pushes commits back). "Dismiss — never runs with secrets" does not apply.Hardening: added an explicit same-repo guard to the job condition:
A fork PR can now never reach this secret-bearing, write-capable path. Combined with the pre-existing
sync/skills-branch-name filter, only the internal skills-sync automation — which pushessync/skills-*branches directly to this repo (requiring write access) — can trigger it.With that compensating control, the 2
untrusted-checkoutalerts are dismissed as "won't fix", referencing this PR.claude.ymlwas already least-privilege (contents: read, gated onauthor_association∈ OWNER/MEMBER/COLLABORATOR) — it needed only the SHA pin.Verification
if/permissionsconfirmed; both action refs pinned to SHA.Refs PIN-24.