When you encounter this problem, perform the following solution:
- Run it in the project root directory
git init
command to initialize a Git repository - pass (a bill or inspection etc)
git add
Staging code files to be scanned - Make sure the Claude Code CLI is installed globally (npm install -g @anthropic-ai/claude-code)
- Execute the /security-review command after launching the Claude terminal in the project directory
Note: This solution requires that at least one code change be added to the Git staging area. If you are scanning all the code, it is recommended that you first rungit add .
command. This method is particularly suitable for initial security checks of legacy projects.
This answer comes from the articleClaude Code Security Review: a GitHub tool to automate code security vulnerability scanningThe