trufflehog (trufflesecurity/trufflehog)

Searching Database…

What is this?TruffleHog is a CLI tool that discovers, classifies, validates, and analyzes leaked secrets like API keys, database passwords, and private keys across many sources (Git, GitHub, S3, Docker, Slack, filesystems, and more).
Is this a linter or an active credential checker?It is more than a pattern scanner: for every secret it classifies, it can log in to the real API to confirm whether the credential is actually live, not just regex-matched.
How do I get it running?Install via the macOS package, Docker image, binary release, install script, or by compiling from source, then run subcommands like 'trufflehog git ' or 'trufflehog github --org=...'.
Do I need anything special installed first?No special runtime is required to run prebuilt binaries, but Docker is needed for the container route, Cosign is needed if you want to verify release signatures, and a GitHub personal access token helps avoid rate limits on org scans.
Does scanning a whole GitHub org take long?Yes — unauthenticated GitHub org scans hit API rate limits and are slow unless you pass a personal access token, and the deep commit-enumeration feature for finding deleted/hidden commits can take 20 minutes to a few hours.
Is it safe to scan untrusted local git repos?By default TruffleHog clones local repos to a temp directory before scanning to guard against malicious git configs (CVE-2025-41390); you can skip this only for trusted repos with --trust-local-git-config.
How many secret types can it detect?TruffleHog classifies over 800 secret types, mapping findings back to the specific identity they belong to, such as AWS, Stripe, Cloudflare, or Postgres credentials.
What result statuses does it report?Results are labeled verified (confirmed live via API), unverified (detected but not confirmed), or unknown (verification attempted but failed due to error).
Can I use it in CI or as a pre-commit hook?Yes, TruffleHog supports CI pipelines (with --since-commit/--branch/--fail flags), is available as a GitHub Action, and can run as a pre-commit hook.
What is the Driftwood feature?Driftwood instantly verifies leaked private keys against millions of GitHub users and billions of TLS certificates to confirm if the key is actually usable live.
Size
52.4 MB
Stars
29.8K
Age
9y
Commits · 90 Days