Skip to content

Fix Claude OAuth token env for Actions - #31

Merged
justin808 merged 2 commits into
masterfrom
jg-codex/claude-oauth-env-fallback
Jul 5, 2026
Merged

Fix Claude OAuth token env for Actions#31
justin808 merged 2 commits into
masterfrom
jg-codex/claude-oauth-env-fallback

Conversation

@justin808

Copy link
Copy Markdown
Member

Summary

  • pass CLAUDE_CODE_OAUTH_TOKEN through the Claude action step env as well as the existing with: input
  • keep OAuth token wiring consistent for Claude review and @claude workflows

Why

anthropics/claude-code-action@v1 can resolve the OAuth input empty in this runner path unless the token is also available in the inherited step env. This matches the Hichee fix proven by shakacode/hichee#9633.

Verification

  • workflow-only YAML patch generated from the org Claude integration audit

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@justin808, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 262f564c-4aa0-483d-a1d4-7316e78d7d36

📥 Commits

Reviewing files that changed from the base of the PR and between 2e9cd68 and 4786bcf.

📒 Files selected for processing (2)
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg-codex/claude-oauth-env-fallback

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.

@justin808
justin808 merged commit 6594da2 into master Jul 5, 2026
2 of 6 checks passed
@justin808
justin808 deleted the jg-codex/claude-oauth-env-fallback branch July 5, 2026 05:47
@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Claude GitHub Actions token wiring.

  • Adds CLAUDE_CODE_OAUTH_TOKEN to the Claude review action step environment.
  • Adds the same OAuth token environment variable to the interactive @claude workflow.
  • Keeps the existing claude_code_oauth_token action inputs in both workflows.

Confidence Score: 4/5

The interactive @claude workflow can expose the OAuth token through the agent environment.

  • User-controlled @claude comments can start the workflow.
  • The changed step exports the OAuth token as an inherited environment variable.
  • The workflow does not add tool restrictions that would block environment reads or exfiltration.

.github/workflows/claude.yml

Security Review

The interactive @claude workflow now exposes the Claude OAuth token as an inherited environment variable while accepting user-controlled comment text as instructions. This creates a prompt-injection path for secret exfiltration unless the workflow is restricted to trusted authors or the token is kept out of the agent environment.

Important Files Changed

Filename Overview
.github/workflows/claude.yml Adds the Claude OAuth token to the step environment in the user-triggered @claude workflow, increasing secret exposure.
.github/workflows/claude-code-review.yml Adds the same OAuth token environment variable to the automated review workflow, where the prompt and allowed tools are more constrained.

Reviews (1): Last reviewed commit: "Fix Claude OAuth token env for Actions: ..." | Re-trigger Greptile

Comment on lines +38 to +39
env:
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Comment Prompt Exposes OAuth Token

When any issue, review, or comment body containing @claude starts this workflow, that user-controlled text becomes the Claude instruction source while the action also receives CLAUDE_CODE_OAUTH_TOKEN in its process environment. Because this workflow does not restrict Claude's tools, prompt injection can read the inherited environment and leak the OAuth token; the existing with input already passed the token without adding this extra environment surface.

Context Used: CLAUDE.md (source)

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.

1 participant