Skip to content

Add checks/statuses read permissions to Claude workflow#115

Merged
justin808 merged 1 commit intomainfrom
codex/apply-claude-yml-permissions-20260301
Mar 2, 2026
Merged

Add checks/statuses read permissions to Claude workflow#115
justin808 merged 1 commit intomainfrom
codex/apply-claude-yml-permissions-20260301

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 2, 2026

Applies the workflow update from shakacode/react_on_rails#2487:

  • add checks: read and statuses: read to job permissions
  • pass github_token: ${{ github.token }} to anthropics/claude-code-action
  • add checks: read and statuses: read to additional_permissions

Admin merge requested to keep rollout fast across repos.


Note

Low Risk
Low risk workflow-only change that expands the GitHub token permissions available to the Claude action; main consideration is the slightly broader read access for CI status metadata.

Overview
Updates the Claude Code GitHub Actions workflow to let anthropics/claude-code-action read CI status details by adding checks: read and statuses: read to both the job permissions and the action’s additional_permissions.

Also passes github_token: ${{ github.token }} into the action so it can use the workflow token when querying GitHub APIs.

Written by Cursor Bugbot for commit 845c524. Configure here.

Copilot AI review requested due to automatic review settings March 2, 2026 00:42
@justin808 justin808 merged commit 1d0dd5c into main Mar 2, 2026
@justin808 justin808 deleted the codex/apply-claude-yml-permissions-20260301 branch March 2, 2026 00:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 2, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6bc5ad6 and 845c524.

📒 Files selected for processing (1)
  • .github/workflows/claude.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/apply-claude-yml-permissions-20260301

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link
Copy Markdown

claude Bot commented Mar 2, 2026

PR Review: Add checks/statuses read permissions to Claude workflow

Note: This PR has already been merged. Feedback below is for documentation purposes.

Summary

This is a clean, low-risk workflow-only change. The additions are correct and consistent with how the action is configured.

What looks good

  • Minimal scope: Only read permissions are added — no write access escalation.
  • Consistent pattern: Follows the same pattern as the existing actions: read permission.
  • Explicit token passing: Passing github_token: ${{ github.token }} explicitly makes the authentication flow clearer.
  • Cross-repo consistency: Syncing from shakacode/react_on_rails#2487 is a sound practice.

Minor observations

  1. Missing inline comments on new permissions: The existing actions: read line has a comment (# Required for Claude to read CI results on PRs) but the new checks: read and statuses: read lines do not. Adding similar comments would improve readability and help future maintainers understand why each permission exists.

  2. Apparent duplication between permissions: and additional_permissions:: actions: read, checks: read, and statuses: read appear in both the job-level permissions: block and the additional_permissions action input. This is likely intentional — the job-level block grants the token actual permissions, while additional_permissions may be used by the action internally (e.g., for OIDC token requests or self-documentation). Worth confirming this is the intended design with the action's docs to avoid confusion.

  3. Trailing blank lines: Two trailing blank lines at the end of the file — cosmetic only.

Overall: Approved — the change is correct and safe.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 2, 2026

Greptile Summary

This PR expands the GitHub token permissions for the Claude Code workflow by adding checks: read and statuses: read — two read-only permissions that allow the action to inspect CI check runs and commit statuses. It also explicitly passes github_token: ${{ github.token }} into anthropics/claude-code-action@v1 so the action can use the workflow token when querying GitHub APIs.

  • Adds checks: read and statuses: read to the job-level permissions block alongside the already-present actions: read.
  • Adds the same two permissions to the additional_permissions input of the Claude action, keeping both lists in sync.
  • Passes github_token: ${{ github.token }} to the action — the token's scope is constrained by the job's permissions block, so this does not grant any write access beyond what was already present.
  • All new permissions are read-only; the broader id-token: write permission that enables OIDC was already in place before this PR.

Confidence Score: 5/5

  • This PR is safe to merge; it only adds read-only GitHub API permissions and passes the scoped workflow token to the action.
  • The change is minimal (6 lines added, 0 deleted in a single YAML file), all new permissions are strictly read-only, and the github_token passed to the action is bounded by the job's permissions block. There are no write-permission escalations and no changes to secrets handling.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/claude.yml Adds checks: read and statuses: read to both the job-level permissions block and the action's additional_permissions, and forwards github_token to the Claude action. Straightforward, read-only permission expansion with no issues.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[GitHub Event triggered] -->|comment contains @claude| B[Claude Workflow runs]
    B --> C[Scoped workflow token issued\nwith read-only permissions]
    C --> D[claude-code-action receives\nworkflow token + OAuth token]
    D --> E{Reads CI data via\nGitHub REST API}
    E --> F[Check runs - NEW]
    E --> G[Commit statuses - NEW]
    E --> H[Actions runs - existing]
    F & G & H --> I[Claude generates response\nand posts to PR or issue]
Loading

Last reviewed commit: 845c524

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Claude GitHub Actions workflow permissions/config so the anthropics/claude-code-action job can read CI check runs and commit statuses when operating on PRs (matching the referenced upstream workflow update).

Changes:

  • Add checks: read and statuses: read to the job-level permissions.
  • Pass github_token: ${{ github.token }} to anthropics/claude-code-action@v1.
  • Add checks: read and statuses: read to the action’s additional_permissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants