claude-code
claude-code copied to clipboard
[BUG]
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>...]
I have the same problem。
git version 2.47.0.windows.2 windows11
Same issue for me. Claude Code on WSL2.
- Git 2.25.1
- Claude-CLI: 1.0.77
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.