Trending
#Security & Privacy

trufflesecurity/trufflehog

Scans code, history and cloud storage for leaked credentials and verifies whether they are still live.

28,684
2,662
Go
AGPL-3.0
9 years old

The problem

Secrets leak constantly: a key committed during a late-night debug session, a token pasted into a pull request comment, a password baked into an old commit that was never really deleted. Regex-based scanners flag everything that looks like a key, and teams drown in false positives until they stop reading the alerts. TruffleHog addresses this by going one step past detection: it tries to authenticate with the credential it found and reports whether the secret is actually live.

What's different

The distinguishing idea is verification-as-classification. Instead of a regex catalogue, each detector knows how to confirm a specific credential type, and for a smaller set of high-value types it goes further and enumerates the identity, permissions and reachable resources behind the key. That turns a noisy finding into an actionable one: a dead AWS key and a live one with admin access are not the same incident. Compare the usual pattern of running gitleaks or GitHub's built-in secret scanning as a diff-time gate; those are cheap and fast, and TruffleHog is heavier but reaches further back. It also scans beyond git — chats, wikis, object stores, filesystems, issue and PR comments — which most committed-secret scanners simply don't look at. The output story is also more pragmatic than most scanners: JSON streaming, SARIF for GitHub code scanning, so findings track as new/fixed across runs.

Who it's for

Security engineers and platform teams doing incident response, due diligence or periodic sweeps of an org's repositories and S3 buckets. It's particularly useful when you must triage a large pile of suspected leaks and need to know which ones matter today. Teams that want a fast blocking check on every commit should look at lighter pre-commit scanners instead — the verification step makes network calls and can be slow, and it's not designed as a sub-second gate.

Cost of adoption

Single Go binary, with Homebrew, Docker, release binaries and an install script documented in the README. Scanning requires outbound network access for verification, which also means the tool effectively probes third-party services with the credentials it finds — get sign-off for that. The license is AGPL-3.0, which matters if you plan to embed it in a commercial product or SaaS. There is a commercial Enterprise product, and revenue from it funds the open-source work; the README's feature claims (800+ classified types, analysis for roughly twenty credential types) come from the vendor and are not independently benchmarked here. Artifacts are cosign-signed, which is a good sign of release discipline.

Verdict

TruffleHog is not a new project — it dates to 2016 and has grown into one of the default names in secret scanning, at roughly 28.7k stars. Interest is clearly still rising: the Go monthly board shows +718 this month and a #5 position, though it has not appeared on the daily trending board during the tracked window. That pattern — a decade-old tool climbing the monthly chart — reads as renewed relevance rather than a hype spike. The honest caveat is scope: it finds credentials, not every class of security bug, and its verification advantage depends on network round-trips that some environments will not allow. Worth adopting for any team with a real secrets problem; overkill for a small repo that only needs a commit hook.

Hacker News

TruffleHog v3 – Detect and automatically verify over 600 credential types
▲ 84 · 8 comments · April 4, 2022

Written by AI from the project's README, updated October 24, 2026. The project's own docs are the source of truth.