fix(ci): skip claude-review for Dependabot PRs (root cause of #115–#119 failures)#122
Merged
Merged
Conversation
Root cause: GitHub does not expose repo secrets (including CLAUDE_CODE_OAUTH_TOKEN) to workflow runs triggered by dependabot- authored PRs — a security default that blocks malicious deps from exfiltrating credentials. The action exits with an empty-credential failure on every dep bump, so all 5 currently-open dependabot PRs (#115-#119) show a red claude-review check despite tests + drift being green. Skip the job entirely for dependabot[bot] rather than try to wire Dependabot secrets — dep-version-bump diffs are low-signal for AI review anyway. Co-Authored-By: Claude Opus 4.7 (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.
Summary
All 5 currently-open Dependabot PRs (#115, #116, #117, #118, #119) have the same single failing check:
claude-review. Tests + drift-check pass on every one.Root cause: GitHub does not expose repo secrets — including
CLAUDE_CODE_OAUTH_TOKEN— to workflow runs triggered by Dependabot-authored PRs. This is a deliberate security default (a malicious dependency could otherwise exfiltrate credentials via a crafted PR). The action lands in the runner with empty credentials and exits 1 before doing anything useful.Evidence from the log on PR #115's run (25990801467):
Fix: add
if: github.actor != 'dependabot[bot]'at the job level. Skips the run entirely rather than firing and failing. Dep-bump diffs are low-signal for AI review anyway (version range changes, not behavior).Alternative considered: configure Dependabot secrets (a separate secret store GitHub exposes to dependabot-triggered runs). Rejected — extra complexity for an action that doesn't add review value on version bumps.
After this merges, the 5 open Dependabot PRs will need a re-trigger (close/reopen, or push a no-op) for the skip to take effect on a fresh run.
Test plan
claude-reviewis skipped (not failed)