From 6dab67be2098227b0d4485d8795421b4cd5f8e5b Mon Sep 17 00:00:00 2001 From: Claude Code Bot Date: Sat, 18 Apr 2026 20:40:59 -0700 Subject: [PATCH] fix: allow bot actors to invoke claude-code-action (v2.0.2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit claude-code-action@v1 (recent releases) rejects workflow runs when github.actor is a Bot, unless the bot is listed in allowed_bots. Downstream callers hit this on: - dependabot-opened PRs (actor=dependabot[bot]) - synchronize events after a bot push (actor=claude[bot] or github-actions[bot]) - re-runs of any originally bot-triggered run (actor preserved) Fix by adding an explicit allowed_bots list inside each reusable workflow's action step. Authorization is still gated upstream by the caller's author_association / paths / event-type guards. claude-assistant.yml: claude[bot],github-actions[bot] — @claude mentions don't come from dependabot, so that bot is not listed here. claude-blocking-review.yml: claude[bot],github-actions[bot],dependabot[bot] — callers fire on pull_request for every PR, including dependabot's. No behavioral change for human actors; no widening of trust (no "*"). Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/claude-assistant.yml | 6 ++++++ .github/workflows/claude-blocking-review.yml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/claude-assistant.yml b/.github/workflows/claude-assistant.yml index 20499bc..d91160b 100644 --- a/.github/workflows/claude-assistant.yml +++ b/.github/workflows/claude-assistant.yml @@ -47,6 +47,12 @@ jobs: id: claude uses: anthropics/claude-code-action@26ec041249acb0a944c0a47b6c0c13f05dbc5b44 # v1 with: + # claude-code-action rejects non-User actors unless explicitly allowed. + # The caller's author_association guard (OWNER/MEMBER/COLLABORATOR) is + # the primary authorization — this list only names the bots that are + # legitimate secondary triggers (e.g., claude[bot] updating a thread, + # github-actions[bot] re-running after a synchronize push). + allowed_bots: "claude[bot],github-actions[bot]" claude_code_oauth_token: ${{ secrets.claude_oauth_token }} # Required for Claude to read CI results on PRs diff --git a/.github/workflows/claude-blocking-review.yml b/.github/workflows/claude-blocking-review.yml index 1866d4c..562617b 100644 --- a/.github/workflows/claude-blocking-review.yml +++ b/.github/workflows/claude-blocking-review.yml @@ -374,6 +374,12 @@ jobs: continue-on-error: true # infrastructure failure must not block merges uses: anthropics/claude-code-action@v1 with: + # claude-code-action rejects non-User actors unless explicitly allowed. + # Callers use this on pull_request events that fire for bot-opened PRs + # (dependabot) and synchronize events triggered by bot pushes (claude, + # github-actions). Named list only — see docs/security.md in the action + # repo for why `*` is discouraged. + allowed_bots: "claude[bot],github-actions[bot],dependabot[bot]" claude_code_oauth_token: ${{ secrets.claude_oauth_token }} prompt: | REPO: ${{ github.repository }}