TruffleHog — the open-source secrets scanner from Truffle Security that finds, classifies and, crucially, verifies leaked credentials across git repositories, filesystems, cloud storage, chat and CI — is the tool that turned secret scanning from a grep into a test. Written in Go and released under the AGPL-3.0, it ships more than 900 detectors covering API keys, database passwords, private keys and tokens from AWS, Stripe, Slack, GitHub, Cloudflare, Postgres and hundreds more. The current release is v3.99.2 (October 2026) and the repository is under active development with over 28,000 stars. The project began in 2017 as a Python script that flagged high-entropy strings in git history; the modern v3 is a complete Go rewrite. Its defining idea is verification: for every secret it can classify, TruffleHog can also make a read-only call to the issuing provider’s API to prove the credential is live. A scan therefore returns three kinds of result — verified (confirmed working), unverified (looks like a real secret but could not be confirmed) and unknown — and you can filter to any combination of them.
--results=verified lets you gate a build only on credentials that are provably active, which removes most of the noise that makes regex-only scanners easy to ignore.trufflehog analyze goes beyond “is it live?” and reports what the key can actually do: who created it, which resources it reaches and what permissions it holds.git (local paths, file:// and remote URLs), github (orgs, repos, issue comments and PR comments, plus experimental cross-fork object discovery that enumerates deleted and hidden commits), gitlab, filesystem for directories and single files, s3, gcs, docker images (remote registry, local daemon or a saved tarball), postman, jenkins, elasticsearch, huggingface models/datasets/spaces/buckets, syslog, circleci, travisci, stdin for piped data, and multi-scan to describe many sources in one configuration file.--json for one JSON object per finding, --sarif for GitHub code scanning (findings appear inline on pull-request diffs and are tracked as new or fixed across runs), and --redact to mask every secret so a report can be shared or logged safely.--fail, which exits with code 183 when verified credentials are found so a leaking pipeline stops instead of warning.200 OK response marks the secret verified. Omitting the webhook still reports unverified matches, which makes this useful for generic password= and secret= patterns in .env, .properties and YAML files that no built-in detector would catch.sh -s -- -v).Leaking a credential is the failure mode that costs the most and is hardest to spot: the code is valid, the tests pass, and the key is simply sitting in a string that was committed months ago and deleted last week. Git history keeps every version of every file, so a key removed in a later commit is still a key somebody can find. TruffleHog answers the two questions that actually matter after a finding appears: is this credential still usable, and if so what can it do? Verification is what separates a result list you triage from a result list you act on — and it is why a scan that reports a single verified finding is far more useful than one reporting two hundred pattern matches. It runs entirely on your own machine or in your own CI, so private and regulated code never leaves your infrastructure; the detectors are readable Go rather than a black box, and the AGPL licence removes the procurement conversation. The trade-off against a purely local pattern scanner such as Gitleaks is a deliberate one: verification means outbound network requests, slower scans on large histories and a dependency on the provider’s API being reachable, so pair --results=verified with unknown when you want both the confident hits and an early warning of secrets that cannot be confirmed.
main with --results=verified,unknown --fail and let the build fail on a live key, uploading SARIF to GitHub code scanning so findings appear on the diff.trufflehog github --org=<org> --exclude-archived --results=verified — instead of cloning each one by hand.github-experimental --object-discovery enumerates hidden and deleted commits so a secret removed by a force-push is still found..env files are all just filesystem targets.trufflehog syslog when secrets are being logged rather than committed.Linux (x86-64, arm64, armv6/armv7) · macOS (Intel and Apple silicon) · Windows (x86-64) · Docker (Docker Hub trufflesecurity/trufflehog and ghcr.io) · Homebrew (brew install trufflehog) · standalone binaries from the releases page · Go toolchain (go install) · official install script with optional cosign verification.
AGPL-3.0 — the TruffleHog CLI, its detectors and its source. The hosted TruffleHog Enterprise service (continuous scanning of Git, Jira, Slack, Confluence, Teams and SharePoint) is a separate commercial product; using it is not required for anything described above.
source on GitHub · product page · canarytokens.org · also see the Security & Privacy category for more tools that keep secrets and systems in check, or browse the full directory.