fix: allow Bash tool in claude-code-action for dependabot workflow#43
Merged
Conversation
Without allowed_tools, Claude Code runs with no permitted tools in non-interactive CI mode and all 14 tool calls are denied (permission_denials_count: 14). Claude needs Bash to run gh and grep commands as specified in the prompt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Static Code Review 📊 ✅ All quality checks passed! |
Bare 'Bash' allows arbitrary shell execution — a prompt injection via PR description could run any command with GH_AUTO_MERGE_TOKEN perms. Restrict to only the commands Claude actually needs: - Bash(gh:*) for gh pr view/edit/review/merge - Bash(grep:*) for codebase package usage scan Co-Authored-By: Claude Sonnet 4.6 <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
agentmode,claude-code-actiondefaults toallowedTools: undefinedwhen noallowed_toolsinput is given. In non-interactive CI mode, Claude Code denies all tool calls without human approval →permission_denials_count: 14, nothing gets merged.allowed_tools: 'Bash'so Claude can run theghandgrepcommands specified in the prompt.Test plan
@dependabot recreate) and verify Claude runs to completion and labels/merges the PR🤖 Generated with Claude Code
PR Summary by Typo
Overview
This PR fixes an issue by explicitly allowing the
Bashtool within theclaude-code-actionfor the Dependabot auto-merge workflow.Key Changes
allowed_tools: 'Bash'to theclaude-code-actionconfiguration in thedependabot_auto_merge.ymlworkflow.Work Breakdown
To turn off PR summary, please visit Notification settings.