Conversation
Updated allowed tools for Claude Code Review to specify exact commands used in the review flow.
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR refines Claude AI tooling configuration by replacing broad Bash wildcards with explicit, restricted tool specifications in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Pull request overview
Updates Claude Code review automation configuration to tighten tool permissions and improve review prompts for better safety and debuggability.
Changes:
- Replaced broad
Bash(*)tool access with a more targeted allowlist in the GitHub Actions workflow. - Updated
.claude/settings.jsonto restrict allowed tools versus the previous wildcard. - Added prompt guidance and enabled full output logging for debugging.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/claude-code-review.yml | Narrows allowed tools, tweaks prompt, and enables verbose output for the review job. |
| .claude/settings.json | Replaces global wildcard tool permissions with a limited allowlist. |
| # (Optional) Useful while debugging; can expose secrets in logs | ||
| show_full_output: true |
There was a problem hiding this comment.
show_full_output: true contradicts the “Optional” warning comment and can leak sensitive data into GitHub Actions logs. Default this to false, and only enable it conditionally for debugging (e.g., via an input, env var, or workflow_dispatch parameter) so it cannot be accidentally left on for normal PRs.
| @@ -1,3 +1,3 @@ | |||
| { | |||
| "allowedTools": ["Bash(*)"] | |||
| "allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"] | |||
There was a problem hiding this comment.
The allowlist syntax here uses a space form ("Bash(gh *)") while the workflow uses a colon form (e.g., "Bash(gh pr view:*)"). If the tool-matching grammar expects the command:pattern format, these entries may not match as intended and could result in tools being blocked or unintentionally allowed. Align the settings file with the exact same pattern style used in the workflow (and ideally the same specific subcommands).
| "allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"] | |
| "allowedTools": ["Bash(gh:*)", "Bash(git:*)", "Bash(python3:*)", "Bash(grep:*)", "Bash(cat:*)", "Bash(ls:*)"] |
| @@ -1,3 +1,3 @@ | |||
| { | |||
| "allowedTools": ["Bash(*)"] | |||
| "allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"] | |||
There was a problem hiding this comment.
Even after moving off Bash(*), entries like Bash(gh *), Bash(git *), and Bash(python3 *) are still very permissive (e.g., gh auth, arbitrary gh api calls, arbitrary scripting). Since the workflow comment says “allow exactly what the review flow uses,” consider restricting to the minimal required subcommands (mirroring the workflow allowlist) rather than * at the tool level.
| "allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"] | |
| "allowedTools": ["Bash(grep *)", "Bash(cat *)", "Bash(ls *)"] |
| "Bash(gh api:*)" | ||
| "Bash(gh search code:*)" | ||
| "Bash(cat:*)" | ||
| "Bash(ls:*)" | ||
| "Bash(grep:*)" | ||
| "Bash(python3:*)" | ||
| "Bash(git:*)" |
There was a problem hiding this comment.
The comment states “allow exactly what the review flow uses,” but the allowlist still includes broad capabilities (Bash(git:*), Bash(python3:*), and especially Bash(gh api:*)) that can materially expand access beyond viewing PR content. If these are not strictly required, remove them; if they are required, narrow them as much as the tool syntax allows (e.g., specific gh api endpoints / specific git subcommands) to reduce the blast radius of a prompt-injection scenario.
| "Bash(gh api:*)" | |
| "Bash(gh search code:*)" | |
| "Bash(cat:*)" | |
| "Bash(ls:*)" | |
| "Bash(grep:*)" | |
| "Bash(python3:*)" | |
| "Bash(git:*)" | |
| "Bash(gh search code:*)" | |
| "Bash(cat:*)" | |
| "Bash(ls:*)" | |
| "Bash(grep:*)" |
User description
Description
Summarize your changes and the motivation behind them.
Fixes #(issue)
Type of change
Testing
How did you test your changes?
Checklist
See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)CodeAnt-AI Description
Restrict Claude code-review to exact CLI commands and surface missing-diff errors
What Changed
Impact
✅ Reduced tool access during code reviews✅ Clearer reporting when diffs or files are inaccessible✅ Review runs use only targeted commands, lowering unexpected command execution💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit