# /security-review and ShipGuard: run both

Canonical: https://agenticcli.dev/shipguard/compare/claude-code-security-review

**Short answer:** Claude Code's /security-review has a model read your branch diff for risks such as injection, auth issues and data exposure. ShipGuard runs fixed checks on your project files and gives the same answer for the same code. A model review can spot logic a rule cannot name; a fixed check can be run on every commit. Use both.

- /security-review reviews the diff between your branch and the default branch, and explains what it found.
- ShipGuard checks the project files against fixed rules and returns a JSON verdict and an exit code.
- Run ShipGuard on every commit, and /security-review before you merge. We tested both five times on one change.

## What /security-review does well
Read from its own docs on 24 Nov 2026.

- The Claude Code docs say `/security-review` analyzes the changes on your current branch for security vulnerabilities, reviewing the diff against the origin default branch for risks such as injection, auth issues and data exposure. [1]
- It needs an `origin` remote. The docs add an error reference for reviews that fail without one. [1]
- Anthropic also publishes a GitHub Action that reviews pull requests and comments on them. Its README says it reasons about code semantics and lists business logic flaws among the issue types. [2]
- The Action needs a Claude API key. Its README says it is not hardened against prompt injection and should only review trusted pull requests. [2]
- By default the Action filters out some low-impact findings such as denial of service, rate limiting and open redirects, and you can tune the filter. [2]

## Claude Code /security-review and ShipGuard, side by side

| | ShipGuard | Claude Code /security-review |
|---|---|---|
| Best for [7][1] | Founders shipping with a coding agent | A second review of one change, by a Claude model |
| CLI and agent fit [7][1][2] | ✓ No dashboard to open. One command returns a JSON verdict, and with --strict a failing exit code. Works with Claude Code, Codex and Cursor | ✓ A slash command inside Claude Code, and a GitHub Action that returns a findings count and a results file |
| Where it runs [7][2] | ✓ Your machine. Your code never leaves it | ✗ The review is done by a Claude model, so it reads the changed code |
| Licence and install [7][3][4] | Open source CLI (Apache-2.0). One line to run, no account for the general rules | MIT for the GitHub Action. The /security-review command ships inside Claude Code, under Anthropic's terms |
| How you buy [8][2] | ✓ Self-serve, no sales call. One account covers any number of your machines and agents | ~ Needs an Anthropic account: Claude Code, or an API key for the Action |
| Pricing model and metering [8][5][6] | ✓ One flat price, no seats. Only rulebook scans are counted: 1,000 a month on Pro. General-rule scans are free and never counted | ✓ Billed by use on your API key. The Claude Console shows the spend |
| What it checks [2][7] | Five areas: secrets, auth, database, payments, deployment | Injection, login and access flaws, data exposure, crypto mistakes and more, found by a model reading the diff |
| How it finds issues [7][1] | Fixed pattern rules, no AI model involved | A model reads your diff |
| What it reads [7][1] | The project files, or only changed files with --changed | The diff against the default branch |
| Same answer every run [7] | ✓ Same code, same answer | ~ Varied between runs in our five-run test |
| Logic a rule cannot name [2] | ✗ Only what the rules cover | ✓ Can reason about intent and context |
| Explains the fix [7][2] | ✓ Each finding has an explanation and, where known, a fix | ✓ Writes findings with explanations |
| Verdict for automation [7][2] | ✓ JSON recommendation plus exit code | ~ Text review; the Action returns a findings count |
| Needs [7][2] | Node.js 20+; no account for the general rules | Claude Code (or an API key for the Action) |

## When Claude Code /security-review is the better pick

- You want a reviewer that reads the whole change and explains risks in context, including logic problems no rule names. [2]
- You want a pull request comment from a model before you merge. [2]
- You already work in Claude Code and want a review without extra setup. [1]

## When ShipGuard is the better pick

- You want a check that runs on every commit and gives the same answer for the same code. [7]
- You want a hard gate: `--strict` exits 1 on a blocking finding, so a hook or CI job can stop the commit. [7]
- You want the common AI-code mistakes covered by name: leaked keys, routes without login, unsigned payment webhooks, destructive migrations, risky deploy settings. [7]
- Your agent needs a yes or no it can parse: SAFE_TO_SHIP, REVIEW_BEFORE_SHIP or DO_NOT_SHIP. [7]

## Where ShipGuard stops

- ShipGuard only finds what its rules cover. A logic flaw no rule names can pass.
- It has five check areas: secrets, auth, database, payments and deployment. It is not a code reviewer and not a dependency scanner.
- It blocks only with --strict. Without that flag it reports and exits 0.

## Run both in your Claude Code workflow

Rules first on every change, a model review second, and you last.

ShipGuard after each change your agent makes, then the model review on the branch. [7][1]

`Per change and before merge`

```
npx @agenticcli/shipguard scan --changed --strict --json
# fix anything blocking, then rerun until it passes
/security-review   # inside Claude Code, before you merge
```

ShipGuard can install a hook so Claude Code runs the check for you. [7]

`Claude Code hook`

```
shipguard hook --target claude
```

1. Add the ShipGuard check to your agent's rules or hook so it runs after every change.
2. Run /security-review on the branch before you open or merge the pull request.
3. Treat a ShipGuard block as a stop, and a /security-review finding as a question to answer.

## Claude Code /security-review and ShipGuard: common questions

### Is ShipGuard a replacement for /security-review?

No. They do different jobs. /security-review has a model read your diff and reason about it; ShipGuard runs fixed checks and gives the same answer each time. We suggest ShipGuard on every commit and /security-review before merge.

### Does /security-review catch a hardcoded API key?

It can, but a model review can miss it. We ran it five times on one change with a planted live key and compared the answers; the full result is in our blog post. ShipGuard's secret checks are rules, so they report a matching key every run.

### Does /security-review send my code to Anthropic?

Yes, the review is done by a Claude model, so the changed code is read by that model. The GitHub Action also needs a Claude API key. ShipGuard's checks run on your machine.

### Can ShipGuard run inside Claude Code?

Yes. Run `npx @agenticcli/shipguard scan --changed --strict --json` from the agent, or install a Claude Code hook with `shipguard hook --target claude`. This is compatibility only; it is not an official Anthropic integration.

## Sources

Facts about other tools were read on 24 Nov 2026. Facts about ShipGuard come from our own README and docs.

1. [Claude Code docs: commands (/security-review)](https://code.claude.com/docs/en/commands)
2. [claude-code-security-review README (Anthropic)](https://github.com/anthropics/claude-code-security-review#readme)
3. [claude-code-security-review licence (MIT)](https://github.com/anthropics/claude-code-security-review/blob/main/LICENSE)
4. [Claude Code licence and terms (Anthropic)](https://github.com/anthropics/claude-code/blob/main/LICENSE.md)
5. [Claude API pricing (Anthropic)](https://platform.claude.com/docs/en/about-claude/pricing)
6. [Claude Code docs: manage costs](https://code.claude.com/docs/en/costs)
7. [ShipGuard README (our own)](https://github.com/agenticcli/shipguard#readme)
8. [ShipGuard pricing page (our own)](https://agenticcli.dev/pricing)

More: [ShipGuard](https://agenticcli.dev/shipguard) · [Compare](https://agenticcli.dev/shipguard/compare) · [Pricing](https://agenticcli.dev/pricing)
