──[ ▮ comparison ]──
gitleaks + ShipGuard: keep gitleaks for history, add ShipGuard for app logic
Two local scanners, two jobs. What each one checks, where each one stops, and how to run both.
Short answer: Keep gitleaks for git history: it reads past commits, and ShipGuard does not. Add ShipGuard when a coding agent writes your code, or when you also want checks for routes without login, payment webhooks, database migrations and deploy settings. They do not conflict. Both run on your machine, in pre-commit and in CI. What ShipGuard is.
What gitleaks does well
- It detects secrets such as passwords, API keys and tokens in git repos, in files, and on stdin. [1]
- It scans history with
gitleaks gitand folders or files withgitleaks dir. [1] - It exits 1 when it finds leaks. The
--exit-codeflag changes that code. [1] - It writes reports as json, csv, junit, sarif or a template, and takes a baseline so old findings stay quiet. [1]
- It runs from a binary, Homebrew, Docker or a Go build, as a pre-commit hook or as a GitHub Action. [1]
- It is MIT-licensed. Its README says the tool is feature complete and future releases are security patches only; the latest release is v8.30.1. [1][2]
gitleaks and ShipGuard, side by side
| ShipGuard | gitleaks | |
|---|---|---|
| Best for[4][1] | Founders shipping with a coding agent | Finding secrets in git repos, files and stdin |
| CLI and agent fit[4][1] | ✓ 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 command-line tool with an exit code and json, csv, junit or sarif reports. Your agent reads the findings and decides |
| Where it runs[4][1] | ✓ Your machine. Your code never leaves it | ✓ Your machine or CI. A binary, Docker image or Go build |
| Licence and install[4][1][3] | Open source CLI (Apache-2.0). One line to run, no account for the general rules | MIT. Installs with Homebrew, Docker or Go, or as a binary |
| How you buy[5][1] | ✓ Self-serve, no sales call. One account covers any number of your machines and agents | ✓ Nothing to buy. Free to download, and its README lists no paid plan |
| Pricing model and metering[5][1] | ✓ One flat price, no seats. Only rulebook scans are counted: 1,000 a month on Pro. General-rule scans are free and never counted | ✓ Free to run. No seats and no usage count |
| What it checks[1][4] | Secrets, routes without login, payment webhooks, risky migrations, deploy settings | Secrets: passwords, API keys, tokens |
| Git history[1] | ✗ Files on disk only | ✓ Scans past commits |
| Files and stdin[1] | ✓ Project files, or only changed files with --changed | ✓ Files, folders and stdin |
| Pre-commit hook[1][4] | ✓ Yes | ✓ Yes |
| Blocking[1] | Exit 1 with --strict, plus a JSON verdict | Exit 1 when leaks are found (changeable) |
| Your own rules[1] | ~ A policy file picks what blocks | ✓ Your own rules in a TOML config |
| Report formats[1] | ~ JSON on screen, saved report in .shipguard/ | ✓ json, csv, junit, sarif, template |
| Needs[1][4] | Node.js 20 or newer | One binary, Docker image or Go build |
When gitleaks is the better pick
When ShipGuard is the better pick
- A coding agent runs the check before each commit and needs a yes or no: exit code plus a JSON recommendation (SAFE_TO_SHIP, REVIEW_BEFORE_SHIP, DO_NOT_SHIP). [4]
- You also want to catch a route with no login check, an unsigned Stripe webhook, or destructive SQL in a migration. [4]
- You want deploy risks flagged too: open CORS, debug mode, exposed environment values, and secrets in NEXT_PUBLIC_ variables. [4]
- You want the general rules free, unlimited and with no account, at one flat price when you add the full rulebook. [4]
Where ShipGuard stops
- ShipGuard checks the files on disk. It does not read past commits, so it cannot tell you a key leaked last year. gitleaks can.
- ShipGuard has five check areas: secrets, auth, database, payments and deployment. It is not a dependency scanner and not a code reviewer.
- Its secret checks are pattern rules. A key format they do not know can pass, which is a good reason to keep a second scanner.
- It blocks only with --strict. Without that flag it reports and exits 0.
Run gitleaks and ShipGuard together
The usual setup: gitleaks guards the commit and the history, ShipGuard guards the change.
Both tools as pre-commit hooks. Each hook definition comes from the tool's own repo. [1][2][4][6]
ShipGuard scans the checkout. gitleaks reads history, so give that job a full clone. Add --strict so ShipGuard fails the job on a blocking finding. [1][4]
- Keep gitleaks exactly as it is. Nothing to remove.
- Add the ShipGuard hook to the same pre-commit file, or run
npx @agenticcli/shipguard scan --changed --strict --jsonfrom your agent. - Add the ShipGuard step to CI next to the gitleaks step. Use a full scan in CI, not
--changed.
gitleaks and ShipGuard: common questions
Is ShipGuard a gitleaks alternative?
For secrets in the files on disk, it has its own checks, so it can stand in. For git history it cannot: ShipGuard does not read past commits. Most teams keep gitleaks for history and add ShipGuard for the app checks around it.
Does ShipGuard scan git history like gitleaks?
No. ShipGuard reads the files in your working tree. If you need to know whether a key ever sat in an old commit, run gitleaks on the history.
Does gitleaks check auth, payments or database migrations?
No. Its README describes it as a tool for detecting secrets. ShipGuard checks routes without login, payment webhook signatures, destructive SQL in migrations and risky deploy settings.
Can a coding agent run gitleaks?
Yes. It is a command-line tool with an exit code and a json report. ShipGuard adds one thing for agents: a JSON verdict (SAFE_TO_SHIP, REVIEW_BEFORE_SHIP or DO_NOT_SHIP) next to the exit code.
Is gitleaks still maintained?
Its README says it is feature complete and that future releases are security patches only. The latest release at the time of reading was v8.30.1. It stays MIT-licensed and usable as it is.
More comparisons and real scan output
- ShipGuard vs Snyk, Semgrep and GitGuardian
- TruffleHog and ShipGuard: when to use which
- Semgrep and ShipGuard: when to use which
- Claude Code /security-review and ShipGuard: when to use which
- Benchmark: 29 planted defects, 6 free tools and ShipGuard Pro
- Secret scanning tools tested: GitHub, gitleaks, TruffleHog and ShipGuard
- Pre-commit secret scanner: what runs before the commit
Sources
────────[ ▮ ShipGuard ]────────
Try the check on your own project
One command, no account for the general rules. Your code stays on your machine.