Fix claude-code-action CI failures
What changed, and why it matters
This commit changes a GitHub Actions workflow so that an AI code-review bot receives an explicit GitHub access token. The stated goal is to fix a CI failure, but passing the default repository token to a third-party action can broaden what that action is able to do inside the repository. There is no evidence in the commit that this was done for malicious reasons or that the action misuses the token.
Review the workflow's top-level `permissions:` block to ensure the `GITHUB_TOKEN` has only read access where possible, pin the `anthropics/claude-code-action` to a verified SHA rather than a floating `@v1` tag, and monitor the upstream action for security-relevant changes.
Security signals we found
Third-party GitHub Action now receives repository GITHUB_TOKEN
Workflow already runs on pull_request_target, which grants write secrets to PRs from forks when configured
Change is driven by an upstream action issue, not by a security advisory
Evidence from the diff
The diff adds github_token: ${{ secrets.GITHUB_TOKEN }} to the anthropics/claude-code-action@v1 step in .github/workflows/claude-review.yml. The commit message says this avoids an OIDC token-exchange flow and uses pull_request_target (already present in the workflow) so secrets are available. Supplying the default GITHUB_TOKEN to a third-party action increases the action’s privileges compared with receiving no token, but the token is scoped by GitHub to the repository and respects the workflow’s permissions. The change is consistent with the upstream issue referenced in the message (anthropics/claude-code-action#649).
Changed components
.github/workflows/claude-review.ymlInspect captured patch +1 / −0
diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml
index c6c326d..0d6d645 100644
--- a/.github/workflows/claude-review.yml
+++ b/.github/workflows/claude-review.yml
@@ -18,6 +18,7 @@ jobs:
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
+ github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.