Contents
What Claude Code's security review is
Claude Code has two built-in ways to look for security problems in your code. The /security-review command runs a security pass over the changes on your current branch, from inside a Claude Code session. A GitHub Action, anthropics/claude-code-security-review, runs the same kind of analysis on every pull request and leaves comments on the lines it's worried about.
Both arrived in August 2025 and are available to Claude Code users on Pro and Max plans and on pay-as-you-go API accounts.
This matters more now that people who aren't engineers ship working tools with AI. Vibe-coded apps often go live with the same few security issues: keys in the code, no login in front, and queries built from user input. A review pass catches a good share of these before anyone else sees the app. It doesn't catch everything, and this page is clear about where it stops.
For the Inhaus side of this, see the guide to deploying vibe-coded tools securely.
How to run it
Option 1: the /security-review command
- Update Claude Code to the latest version.
- Open a session in your project folder (in the terminal, run
claude; or use the Code tab in Claude Desktop). - Type
/security-review. - Read each finding. Ask Claude to fix the ones that are real.
Run it before you commit a significant change. There's nothing to install; the command ships with Claude Code.
To customise it, copy security-review.md from the anthropics/claude-code-security-review repository into your project's .claude/commands/ folder and edit the instructions, for example to add rules your team cares about or to ignore known false positives.
Option 2: the GitHub Action
Add a workflow file such as .github/workflows/security.yml:
name: Security Review
on:
pull_request:
permissions:
pull-requests: write
contents: read
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 2
- uses: anthropics/claude-code-security-review@main
with:
comment-pr: true
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
Store your Anthropic API key as the repository secret CLAUDE_API_KEY. The action needs pull-requests: write so it can post comments. Once it's on, every new pull request gets reviewed and findings show up as inline comments with suggested fixes.
What it catches and what it misses
What it checks for
Anthropic lists these patterns for both the command and the action:
- SQL injection
- Cross-site scripting (XSS)
- Authentication and authorisation flaws
- Insecure data handling (missing validation or sanitising)
- Known issues in dependencies
Anthropic says the action caught real bugs in its own code before release, including a remote code execution flaw reachable through DNS rebinding and an SSRF issue in an internal proxy.
What it can't see
The review reads code. Plenty of what makes an app safe lives outside the code:
- Who can open the app. If it's on a public URL with no login, the code can be clean and the data still exposed.
- Where keys actually are. It can flag a key written in a file, but it can't tell you whether that key was already pushed, shared in a chat or pasted into a deploy setting.
- Your hosting and DNS setup. Open ports, missing HTTPS, a forgotten test subdomain: none of these are in the diff.
- Business logic. "Sales reps shouldn't see each other's commissions" is a rule only you know.
- Everything outside the diff.
/security-reviewlooks at the changes on your branch, not a full audit of the codebase.
Two honest caveats
- It's an AI review. It can miss issues and flag things that aren't problems. Anthropic's own security docs say you're responsible for reviewing code and commands before you approve them.
- The action isn't hardened against prompt injection. Its README says so. Run it on pull requests from people you trust, not from anyone who can open a PR on a public repo.
Pre-launch checklist for vibe-coded internal tools
Run /security-review, fix what's real, then go through this list before anyone else gets the link.
- Keys out of the code. API keys go in environment variables or a secrets store, never in a file Claude wrote.
- Login in front. No internal tool on an open URL. Company sign-in, so leavers lose access with their account.
- Least access. Share with the people or team who need it. View-only unless they must edit.
- No raw user input in queries. Ask Claude to use parameterised queries if the review flagged any.
- Write access to data is deliberate. Know which tools can change records, and who can use them.
- A way back. Keep old versions so a bad change can be rolled back in a minute.
- Logs. Know who opened the app and when.
- An owner. One named person per tool.
Where Inhaus fits
The security review checks the code. Inhaus covers the parts of the checklist that live outside it, for tools you build with Claude, ChatGPT or code:
| Checklist item | How Inhaus handles it |
|---|---|
| Keys out of the code | API keys are stored as secrets and read from the environment |
| Login in front | Every app sits behind your company login |
| Least access | Share with people or teams, as viewer or editor |
| Write access to data | Writes to an app's database are confirmed before they run |
| A way back | Roll back to an earlier version |
| Logs | Access log for each app |
| Hosting and DNS | New: website hosting and DNS management inside Inhaus |
What Inhaus doesn't do: it doesn't replace a code review, a pen test or your own judgement on business rules. Use /security-review for the code and Inhaus for where the app lives.
FAQ
Is Claude Code's /security-review free?
It's included with Claude Code on Pro and Max plans and on pay-as-you-go API accounts. The GitHub Action calls the API with your key, so it uses API credit.
Does /security-review scan the whole codebase?
It reviews the pending changes on your current branch. For a wider sweep, customise the command's instructions.
Can it fix what it finds?
Yes. After the review, ask Claude to apply the fixes in the same session.
What are the most common vibe coding security issues?
API keys written into code, apps live on public URLs without login, queries built from user input, and no record of who changed what.
Is the security review enough before launch?
No. It checks code. You still need login, access control, secrets handling and a rollback plan where the app is hosted.
Sources
- Automated security reviews in Claude Code (Help Center)
- Automate security reviews with Claude Code (Anthropic)
- claude-code-security-review on GitHub
- Claude Code security docs
Put your team’s AI-built tools live
Build in Claude, ChatGPT or Cursor, then deploy and share it behind your company login.