Skip to content

Fix claude 01#1250

Merged
sbryngelson merged 2 commits intoMFlowCode:masterfrom
sbryngelson:fix-claude-01
Feb 22, 2026
Merged

Fix claude 01#1250
sbryngelson merged 2 commits intoMFlowCode:masterfrom
sbryngelson:fix-claude-01

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 22, 2026

User description

Description

Summarize your changes and the motivation behind them.

Fixes #(issue)

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other: describe

Testing

How did you test your changes?

Checklist

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed

See the developer guide for full coding standards.

GPU changes (expand if you modified src/simulation/)
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

CodeAnt-AI Description

Restrict Claude code-review to exact CLI commands and surface missing-diff errors

What Changed

  • The allowed tools list in CI and .claude settings is narrowed to the exact shell commands the review uses (gh, git, python3, grep, cat, ls) instead of a broad Bash wildcard.
  • The CI action enables full output for the reviewer run (comment warns this can expose secrets when debugging).
  • The review prompt now instructs the reviewer to explicitly state if it cannot access the PR diff or files and explain what is blocked.

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:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

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:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

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

  • Chores
    • Enhanced code review workflow with expanded tool access controls and improved transparency. When code review tools cannot access files or diffs, the process now explicitly states this limitation and explains what was blocked.

Updated allowed tools for Claude Code Review to specify exact commands used in the review flow.
Copilot AI review requested due to automatic review settings February 22, 2026 23:40
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 22, 2026

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 ·
Reddit ·
LinkedIn

@sbryngelson sbryngelson merged commit 8a77d33 into MFlowCode:master Feb 22, 2026
21 of 22 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 22, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR refines Claude AI tooling configuration by replacing broad Bash wildcards with explicit, restricted tool specifications in .claude/settings.json and .github/workflows/claude-code-review.yml. Additionally, error reporting for inaccessible diffs and files is enhanced.

Changes

Cohort / File(s) Summary
Claude Tool Configuration
.claude/settings.json, .github/workflows/claude-code-review.yml
Replaced generic Bash(*) wildcard with explicit Bash sub-patterns (e.g., Bash(gh ...), Bash(git ...), Bash(python3 ...), Bash(grep ...), etc.) to restrict allowed tools. Augmented workflow prompt to explicitly state when diff/files cannot be accessed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

size:M

Poem

🐰 Wildcard tools were cast aside,
Explicit specs now set the tide,
Each bash command gets its due,
Security and clarity shine through! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai codeant-ai bot added the size:S This PR changes 10-29 lines, ignoring generated files label Feb 22, 2026
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 22, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json to 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.

Comment on lines +31 to 32
# (Optional) Useful while debugging; can expose secrets in logs
show_full_output: true
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@@ -1,3 +1,3 @@
{
"allowedTools": ["Bash(*)"]
"allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
"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:*)"]

Copilot uses AI. Check for mistakes.
@@ -1,3 +1,3 @@
{
"allowedTools": ["Bash(*)"]
"allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"allowedTools": ["Bash(gh *)", "Bash(git *)", "Bash(python3 *)", "Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]
"allowedTools": ["Bash(grep *)", "Bash(cat *)", "Bash(ls *)"]

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +48
"Bash(gh api:*)"
"Bash(gh search code:*)"
"Bash(cat:*)"
"Bash(ls:*)"
"Bash(grep:*)"
"Bash(python3:*)"
"Bash(git:*)"
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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:*)"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

2 participants