You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add allow_bot_actor parameter for automated workflows
- Add allow_bot_actor parameter to enable GitHub bots to trigger Claude Code Action
- Implement robust bot write permission validation
- Use repo.permissions for comprehensive access checks
- Handle both collaborator and installation permissions
- Add comprehensive test coverage for bot scenarios
- Update documentation with security considerations
This enables automated workflows like documentation updates, CI-triggered
code reviews, and scheduled maintenance while maintaining security through
explicit opt-in and proper permission validation.
Copy file name to clipboardExpand all lines: FAQ.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,13 @@ This FAQ addresses common questions and gotchas when using the Claude Code GitHu
6
6
7
7
### Why doesn't tagging @claude from my automated workflow work?
8
8
9
-
The `github-actions` user cannot trigger subsequent GitHub Actions workflows. This is a GitHub security feature to prevent infinite loops. To make this work, you need to use a Personal Access Token (PAT) instead, which will act as a regular user, or use a separate app token of your own. When posting a comment on an issue or PR from your workflow, use your PAT instead of the `GITHUB_TOKEN` generated in your workflow.
9
+
By default, bots cannot trigger Claude for security reasons. With `allow_bot_actor: true`, you can enable bot triggers, but there are important distinctions:
10
+
11
+
1.**GitHub Apps** (recommended): Create a GitHub App, use app tokens, and set `allow_bot_actor: true`. The app needs write permissions.
12
+
2.**Personal Access Tokens**: Use a PAT instead of `GITHUB_TOKEN` in your workflows with `allow_bot_actor: true`.
13
+
3.**github-actions[bot]**: Can trigger Claude with `allow_bot_actor: true`, BUT due to GitHub's security, responses won't trigger subsequent workflows.
14
+
15
+
**Important**: With `allow_bot_actor: true`, `github-actions[bot]` CAN trigger Claude initially. However, Claude's responses (when using `GITHUB_TOKEN`) cannot trigger subsequent workflows due to GitHub's anti-loop security feature.
10
16
11
17
### Why does Claude say I don't have permission to trigger it?
|`mode`| Execution mode: 'tag' (default - triggered by mentions/assignments), 'agent' (for automation with no trigger checking) | No |`tag`|
173
-
|`anthropic_api_key`| Anthropic API key (required for direct API, not needed for Bedrock/Vertex)| No\*| - |
174
-
|`claude_code_oauth_token`| Claude Code OAuth token (alternative to anthropic_api_key)| No\*| - |
175
-
|`direct_prompt`| Direct prompt for Claude to execute automatically without needing a trigger (for automated workflows)| No | - |
176
-
|`override_prompt`| Complete replacement of Claude's prompt with custom template (supports variable substitution)| No | - |
177
-
|`base_branch`| The base branch to use for creating new branches (e.g., 'main', 'develop') | No | - |
178
-
|`max_turns`| Maximum number of conversation turns Claude can take (limits back-and-forth exchanges)| No| -|
179
-
|`timeout_minutes`| Timeout in minutes for execution | No |`30`|
180
-
|`use_sticky_comment`| Use just one comment to deliver PR comments (only applies for pull_request event workflows) | No|`false`|
181
-
|`github_token`| GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!**| No | - |
182
-
|`model`| Model to use (provider-specific format required for Bedrock/Vertex) | No | - |
183
-
|`fallback_model`| Enable automatic fallback to specified model when primary model is unavailable| No | - |
184
-
|`anthropic_model`|**DEPRECATED**: Use `model` instead. Kept for backward compatibility. | No |- |
185
-
|`use_bedrock`| Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API| No |`false`|
186
-
|`use_vertex`| Use Google Vertex AI with OIDC authentication instead of direct Anthropic API|No|`false`|
187
-
|`allowed_tools`| Additional tools for Claude to use (the base GitHub tools will always be included)| No | "" |
188
-
|`disallowed_tools`| Tools that Claude should never use | No | "" |
189
-
|`custom_instructions`| Additional custom instructions to include in the prompt for Claude | No | "" |
190
-
|`mcp_config`| Additional MCP configuration (JSON string) that merges with the built-in GitHub MCP servers | No |""|
191
-
|`assignee_trigger`| The assignee username that triggers the action (e.g. @claude). Only used for issue assignment| No | - |
192
-
|`label_trigger`| The label name that triggers the action when applied to an issue (e.g. "claude")| No |- |
193
-
|`trigger_phrase`| The trigger phrase to look for in comments, issue/PR bodies, and issue titles | No |`@claude`|
194
-
|`branch_prefix`| The prefix to use for Claude branches (defaults to 'claude/', use 'claude-' for dash format)| No |`claude/`|
195
-
|`claude_env`| Custom environment variables to pass to Claude Code execution (YAML format)| No | "" |
196
-
|`settings`| Claude Code settings as JSON string or path to settings JSON file | No |"" |
197
-
|`additional_permissions`| Additional permissions to enable. Currently supports 'actions: read' for viewing workflow results | No | "" |
198
-
|`experimental_allowed_domains`| Restrict network access to these domains only (newline-separated). | No | "" |
199
-
|`use_commit_signing`| Enable commit signing using GitHub's commit signature verification. When false, Claude uses standard git commands | No |`false`|
|`anthropic_api_key`| Anthropic API key (required for direct API, not needed for Bedrock/Vertex) | No\*| - |
171
+
|`claude_code_oauth_token`| Claude Code OAuth token (alternative to anthropic_api_key) | No\*| - |
172
+
|`direct_prompt`| Direct prompt for Claude to execute automatically without needing a trigger (for automated workflows)| No| - |
173
+
|`override_prompt`| Complete replacement of Claude's prompt with custom template (supports variable substitution) | No | - |
174
+
|`base_branch`| The base branch to use for creating new branches (e.g., 'main', 'develop') | No | - |
175
+
|`max_turns`| Maximum number of conversation turns Claude can take (limits back-and-forth exchanges)| No | - |
176
+
|`timeout_minutes`| Timeout in minutes for execution | No|`30`|
177
+
|`use_sticky_comment`| Use just one comment to deliver PR comments (only applies for pull_request event workflows)| No |`false`|
178
+
|`github_token`| GitHub token for Claude to operate with. **Only include this if you're connecting a custom GitHub app of your own!**| No| -|
179
+
|`model`| Model to use (provider-specific format required for Bedrock/Vertex) | No | - |
180
+
|`fallback_model`| Enable automatic fallback to specified model when primary model is unavailable| No | - |
181
+
|`anthropic_model`|**DEPRECATED**: Use `model` instead. Kept for backward compatibility. | No | - |
182
+
|`use_bedrock`| Use Amazon Bedrock with OIDC authentication instead of direct Anthropic API| No |`false`|
183
+
|`use_vertex`| Use Google Vertex AI with OIDC authentication instead of direct Anthropic API | No |`false`|
184
+
|`allowed_tools`| Additional tools for Claude to use (the base GitHub tools will always be included) | No|""|
185
+
|`disallowed_tools`| Tools that Claude should never use | No | "" |
186
+
|`custom_instructions`| Additional custom instructions to include in the prompt for Claude| No | "" |
187
+
|`mcp_config`| Additional MCP configuration (JSON string) that merges with the built-in GitHub MCP servers| No | "" |
188
+
|`assignee_trigger`| The assignee username that triggers the action (e.g. @claude). Only used for issue assignment| No |- |
189
+
|`label_trigger`| The label name that triggers the action when applied to an issue (e.g. "claude") | No | - |
190
+
|`trigger_phrase`| The trigger phrase to look for in comments, issue/PR bodies, and issue titles | No |`@claude`|
191
+
|`branch_prefix`| The prefix to use for Claude branches (defaults to 'claude/', use 'claude-' for dash format)| No |`claude/`|
192
+
|`claude_env`| Custom environment variables to pass to Claude Code execution (YAML format) | No |"" |
193
+
|`settings`| Claude Code settings as JSON string or path to settings JSON file | No | "" |
194
+
|`allow_bot_actor`| Allow GitHub bots and automation accounts to trigger Claude (security: defaults to false, requires explicit opt-in) | No |`false`|
195
+
|`additional_permissions`| Additional permissions to enable. Currently supports 'actions: read' for viewing workflow results | No | "" |
196
+
|`experimental_allowed_domains`| Restrict network access to these domains only (newline-separated). | No | "" |
197
+
|`use_commit_signing`| Enable commit signing using GitHub's commit signature verification. When false, Claude uses standard git commands | No |`false`|
200
198
201
199
\*Required when using direct Anthropic API (default and when not using Bedrock or Vertex)
202
200
203
201
> **Note**: This action is currently in beta. Features and APIs may change as we continue to improve the integration.
204
202
205
-
## Execution Modes
206
-
207
-
The action supports two execution modes, each optimized for different use cases:
208
-
209
-
### Tag Mode (Default)
210
-
211
-
The traditional implementation mode that responds to @claude mentions, issue assignments, or labels.
Check for outdated dependencies and create an issue if any are found.
239
-
```
240
-
241
-
See [`examples/claude-modes.yml`](./examples/claude-modes.yml) for complete examples of each mode.
242
-
243
203
### Using Custom MCP Configuration
244
204
245
205
The `mcp_config` input allows you to add custom MCP (Model Context Protocol) servers to extend Claude's capabilities. These servers merge with the built-in GitHub MCP servers.
@@ -871,7 +831,7 @@ Both AWS Bedrock and GCP Vertex AI require OIDC authentication.
871
831
### Access Control
872
832
873
833
- **Repository Access**: The action can only be triggered by users with write access to the repository
874
-
- **No Bot Triggers**: GitHub Apps and bots cannot trigger this action
834
+
- **Bot Actor Control**: GitHub Apps and bots are blocked by default for security. Use `allow_bot_actor: true` to enable automated workflows (requires explicit opt-in)
875
835
- **Token Permissions**: The GitHub app receives only a short-lived token scoped specifically to the repository it's operating in
876
836
- **No Cross-Repository Access**: Each action invocation is limited to the repository where it was triggered
877
837
- **Limited Scope**: The token cannot access other repositories or perform actions beyond the configured permissions
Copy file name to clipboardExpand all lines: ROADMAP.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Thank you for trying out the beta of our GitHub Action! This document outlines o
10
10
-**Support for workflow_dispatch and repository_dispatch events** - Dispatch Claude on events triggered via API from other workflows or from other services
11
11
-**Ability to disable commit signing** - Option to turn off GPG signing for environments where it's not required. This will enable Claude to use normal `git` bash commands for committing. This will likely become the default behavior once added.
12
12
-**Better code review behavior** - Support inline comments on specific lines, provide higher quality reviews with more actionable feedback
13
-
-**Support triggering @claude from bot users** - Allow automation and bot accounts to invoke Claude
13
+
-~**Support triggering @claude from bot users** - Allow automation and bot accounts to invoke Claude~
14
14
-**Customizable base prompts** - Full control over Claude's initial context with template variables like `$PR_COMMENTS`, `$PR_FILES`, etc. Users can replace our default prompt entirely while still accessing key contextual data
0 commit comments