[BUG]
Open 💬 7 comments Opened Aug 7, 2025 by jnardiello
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ x] Other: Claude Code
- Claude CLI version: 1.0.70
- Operating System: macOS 15.5
- Terminal: Ghostty
Bug Description
When trying to run /security-review I'm getting this error:
> /security-review
⎿ Error: Bash command failed for pattern "!`git diff --merge-base origin/HEAD`": [stderr]
usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]
> why isn't security-review working?
⏺ The security-review command has a bug in its implementation. It's trying to use:
git diff --merge-base origin/HEAD
But --merge-base is not a valid option for git diff. The correct git commands would be:
1. git diff origin/HEAD...HEAD (three dots for changes on current branch)
2. git diff $(git merge-base origin/HEAD HEAD)..HEAD (using merge-base separately)
This is a bug in the Claude Code security-review command itself. You should report this issue at https://github.com/anthropics/claude-code/issues
As a workaround, I can manually review your changes for security concerns:
Steps to Reproduce
- Open Claude Code in CLI
- type
/security-review
Expected Behavior
It should run a security review
Actual Behavior
Getting this error:
Error: Bash command failed for pattern "!`git diff --merge-base origin/HEAD`": [stderr]
usage: git diff [<options>] [<commit> [<commit>]] [--] [<path>...]This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗