──[ ▮ comparison ]──
TruffleHog + ShipGuard: confirm live keys, check app logic
TruffleHog tells you whether a leaked key still works. ShipGuard tells you whether the change is safe to ship.
Short answer: Use TruffleHog when the question is whether a leaked credential is still live: it tests found keys against the service and can scan many sources, not just git. Use ShipGuard for the checks around your own app: routes without login, payment webhooks, migrations and deploy settings. They answer different questions and run side by side. What ShipGuard is.
What TruffleHog does well
- It describes itself as a tool for secret discovery, classification, validation and analysis, and says it classifies over 800 secret types. [1]
- It can check whether a classified secret is live, and labels each result verified, unverified or unknown. [1]
- It scans git, filesystems, Docker images, object stores, chats, wikis, logs and more. [1]
- With
--failit exits 183 when it finds results; exit 1 means an error. [1] - Its pre-commit hook runs
trufflehog git file://. --since-commit HEAD --results=verified --fail, so as written it fails the commit on verified results only. [2] - It is AGPL-3.0 licensed. A separate enterprise product exists, and the latest release is v3.100.1. [1][4]
TruffleHog and ShipGuard, side by side
| ShipGuard | TruffleHog | |
|---|---|---|
| Best for[6][1] | Founders shipping with a coding agent | Finding, classifying and verifying leaked credentials |
| CLI and agent fit[6][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 | ~ Exit code 183 with --fail, and json or sarif output. Your agent reads the findings and decides |
| Where it runs[6][1] | ✓ Your machine. Your code never leaves it | ~ Your machine, Docker or CI. Checking whether a key is live calls that key's service |
| Licence and install[6][1][5] | Open source CLI (Apache-2.0). One line to run, no account for the general rules | AGPL-3.0. Installs with Homebrew, Docker, an install script or Go |
| How you buy[7][1] | ✓ Self-serve, no sales call. One account covers any number of your machines and agents | ~ The tool is free to download. A separate enterprise product is listed on its website |
| Pricing model and metering[7][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 | ✓ The tool is free: no seats and no usage count |
| What it checks[1][6] | Secrets, routes without login, payment webhooks, risky migrations, deploy settings | Finding, classifying and verifying leaked credentials |
| Is the key live?[1] | ✗ Does not test keys against a service | ✓ Verifies against the service |
| Where it looks[1][6] | Files in your project | ✓ Git, files, Docker images, buckets, chats, wikis and more |
| Git history[1] | ✗ Files on disk only | ✓ Yes (git source) |
| Pre-commit hook[2][6] | ✓ Yes | ✓ Yes (verified results fail the commit as written) |
| Blocking[1] | Exit 1 with --strict, plus a JSON verdict | Exit 183 with --fail |
| Runs without calling a service[1][6] | ✓ General-rule scans make no network call | ~ Verification calls the service the key belongs to |
When TruffleHog is the better pick
When ShipGuard is the better pick
- You want a check that works with no network: no key is sent anywhere to confirm it. [6]
- You also want to catch a route with no login check, an unsigned Stripe webhook, destructive SQL in a migration, or open CORS and debug mode. [6]
- A coding agent runs the check and needs a JSON verdict (SAFE_TO_SHIP, REVIEW_BEFORE_SHIP, DO_NOT_SHIP) and an exit code. [6]
Where ShipGuard stops
- ShipGuard does not say whether a key is live. It reports the match, and you decide whether to rotate.
- It reads the files on disk, not past commits and not buckets or images.
- It 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 covering common providers; TruffleHog covers far more secret types.
- It blocks only with --strict. Without that flag it reports and exits 0.
Run TruffleHog and ShipGuard together
TruffleHog guards against live credentials in what you commit. ShipGuard guards the logic around them.
Both tools as pre-commit hooks. Each hook definition comes from the tool's own repo; TruffleHog's file declares language: golang. [2][4][6][8]
TruffleHog's README documents this CI form. ShipGuard scans the checkout with --strict. [1][6]
- Keep TruffleHog as it is. Nothing to remove.
- Add the ShipGuard hook next to it, or let your coding agent run
npx @agenticcli/shipguard scan --changed --strict --json. - In CI, replace
feature-1with your PR branch name, as the TruffleHog README explains, and add the ShipGuard step.
TruffleHog and ShipGuard: common questions
Is ShipGuard a TruffleHog alternative?
Only for the part where both look for secrets in files. TruffleHog also checks whether a key is live and scans many sources beyond git, which ShipGuard does not. ShipGuard adds checks for auth, payments, migrations and deploy settings that TruffleHog does not claim to cover.
Does ShipGuard verify that a key is live?
No. It reports a match from its rules and does not call the service the key belongs to. If you need to know whether a leaked key still works, TruffleHog's verification does that.
Does TruffleHog's pre-commit hook fail on every secret it finds?
Not as written. Its hook definition passes
--results=verified, so only credentials it confirmed as live fail the commit. You can change the flag to include unknown results.Which one should a small SaaS team start with?
Start with the check that fits your question. If a key may already be in history, run TruffleHog or gitleaks on it once. If you want a check on every change your coding agent makes, run ShipGuard in pre-commit and CI.
More comparisons and real scan output
- ShipGuard vs Snyk, Semgrep and GitGuardian
- gitleaks 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
- Detect hardcoded secrets: four scanners on one repo
Sources
────────[ ▮ ShipGuard ]────────
Try the check on your own project
One command, no account for the general rules. Your code stays on your machine.