Skip to content

fix: allow bot actors to invoke claude-code-action (v2.0.2) - #60

Merged
twistedmelonman merged 1 commit into
mainfrom
claude/allow-bots-fix-1776569952
Apr 19, 2026
Merged

fix: allow bot actors to invoke claude-code-action (v2.0.2)#60
twistedmelonman merged 1 commit into
mainfrom
claude/allow-bots-fix-1776569952

Conversation

@twistedmelonman

Copy link
Copy Markdown
Member

Summary

Adds allowed_bots to both reusable workflows so downstream callers don't fail when github.actor resolves to a Bot (dependabot/github-actions/claude).

  • claude-assistant.yml: claude[bot],github-actions[bot]
  • claude-blocking-review.yml: claude[bot],github-actions[bot],dependabot[bot]

Context

Recent releases of anthropics/claude-code-action@v1 reject workflow runs where github.actor is a Bot unless the bot is explicitly allowed. This bit nightowlstudiollc/kebab-tax-netlify PR #173 yesterday (changelog-review workflow) when a github-actions[bot] push produced a synchronize event with github.actor = claude[bot]. Fix landed there as a one-off (PR #174); this PR applies the same fix to both reusable workflows so every caller inherits it.

Why different lists per file

claude-assistant.yml fires on @claude mentions — dependabot doesn't mention @claude, so it's not listed there. claude-blocking-review.yml fires on pull_request events in callers, which includes dependabot-opened PRs, so dependabot[bot] is required.

Why named list, not *

The action's docs/security.md warns that * on public repos lets external GitHub Apps invoke workflows with prompts they control. Explicit list only.

Release plan

This is a patch-level change. After merge, please tag v2.0.2 and fast-forward the v2 floating tag. Callers pinned to @v2 pick it up automatically; callers pinned to @v2.0.1 (e.g., kebab-tax-netlify/.github/workflows/claude-blocking-review.yml) will need a separate bump PR.

Test plan

  • YAML parses for both files
  • Local code-reviewer + adversarial-reviewer: PASS
  • After merge + v2.0.2 tag: bump kebab-tax-netlify from @v2.0.1@v2.0.2 and confirm a dependabot PR (or synchronize push) gets a clean claude-review status
  • Review claude-blocking-review's own PR-run on this PR — since commit a2566ef short-circuits on .github/workflows/*.yml modifications, it should skip rather than hit the very bug being fixed

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
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