Add Claude Code GitHub Workflow - #1
Merged
Merged
Conversation
Comment on lines
+22
to
+26
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| id-token: write |
There was a problem hiding this comment.
Bug: The new GitHub workflows claude.yml and claude-code-review.yml lack the necessary write permissions to post comments on pull requests and issues, which will cause them to fail.
Severity: HIGH
Suggested Fix
Add pull-requests: write and issues: write to the permissions block in both claude.yml and claude-code-review.yml to allow the actions to post comments as intended.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/claude-code-review.yml#L22-L26
Potential issue: The new GitHub workflows, `claude.yml` and `claude-code-review.yml`,
are configured with read-only permissions for `pull-requests` and `issues`. However,
their intended function is to post review comments, which requires `pull-requests:
write` and `issues: write` permissions. This is confirmed by an existing, similar
workflow (`claude-blocking-review.yml`) that already uses these write permissions.
Without the correct permissions, these new workflows will fail with a permission denied
error every time they attempt to post a comment, preventing them from performing their
core function.
Did we get this right? 👍 / 👎 to inform future reviews.
2 tasks
twistedmelonman
added a commit
that referenced
this pull request
Mar 9, 2026
Add permissions block to claude.yml (the github-workflows repo's own thin caller) and update the usage comment in claude-assistant.yml to show callers should include it. Explicit permissions are required because: - GitHub Actions security scanner flags callers without explicit scopes - id-token: write is needed by claude-code-action for internal auth - Without it, the caller inherits default read-only scopes but without the explicit declaration that makes the security scanner happy Addresses security/code-scanning alert #1 (actions/missing-workflow-permissions).
4 tasks
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.
🤖 Installing Claude Code GitHub App
This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.
What is Claude Code?
Claude Code is an AI coding agent that can help with:
How it works
Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.
Important Notes
Security
There's more information in the Claude Code action repo.
After merging this PR, let's try mentioning @claude in a comment on any PR to get started!