# TruffleHog + ShipGuard: confirm live keys, check app logic

Canonical: https://agenticcli.dev/shipguard/compare/trufflehog

**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.

- TruffleHog classifies secret types, can confirm a key is live, and scans git, files, Docker images, buckets and more.
- ShipGuard reads your project files locally and adds checks for auth, payments, database and deployment. It does not test keys against any service.
- Both fit pre-commit and CI. The snippet below runs them together.

## What TruffleHog does well
Read from its own docs on 24 Nov 2026.

- 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 `--fail` it 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

- A key leaked and you need to know whether it still works, to decide how urgently to rotate it. [1]
- You want results grouped by what the secret belongs to, across hundreds of secret types. [1]
- You scan more than code: a Docker image, a bucket, a wiki or a chat export. [1]

## 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]

`.pre-commit-config.yaml`

```
repos:
  - repo: https://github.com/trufflesecurity/trufflehog
    rev: v3.100.1
    hooks:
      - id: trufflehog
  - repo: https://github.com/agenticcli/shipguard
    rev: main   # pin to a commit or tag you trust
    hooks:
      - id: shipguard
```

TruffleHog's README documents this CI form. ShipGuard scans the checkout with `--strict`. [1][6]

`CI (shell steps)`

```
trufflehog git file://. --since-commit main --branch feature-1 --results=verified,unknown --fail
npx --yes @agenticcli/shipguard scan --json --strict
```

1. Keep TruffleHog as it is. Nothing to remove.
2. Add the ShipGuard hook next to it, or let your coding agent run `npx @agenticcli/shipguard scan --changed --strict --json`.
3. In CI, replace `feature-1` with 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.

## Sources

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

1. [TruffleHog README](https://github.com/trufflesecurity/trufflehog#readme)
2. [TruffleHog pre-commit hook definition (.pre-commit-hooks.yaml)](https://github.com/trufflesecurity/trufflehog/blob/main/.pre-commit-hooks.yaml)
3. [TruffleHog pre-commit guide (PreCommit.md)](https://github.com/trufflesecurity/trufflehog/blob/main/PreCommit.md)
4. [TruffleHog release v3.100.1 (published 23 Nov 2026)](https://github.com/trufflesecurity/trufflehog/releases/tag/v3.100.1)
5. [TruffleHog licence (AGPL-3.0)](https://github.com/trufflesecurity/trufflehog/blob/main/LICENSE)
6. [ShipGuard README (our own)](https://github.com/agenticcli/shipguard#readme)
7. [ShipGuard pricing page (our own)](https://agenticcli.dev/pricing)
8. [pre-commit framework](https://pre-commit.com)

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