trufflesecurity /trufflehog

Find, verify, and analyze leaked credentials

★ 29,371⑂ 2,754👁 214⑃ 4,467● 1,017▤ 360
GoAGPL-3.0Created 2016-12-31trufflesecurity.com
Download: v3.99.9v3.99.9 ↓3.99.92026-11-12
+38
Daily
+541
Weekly
+922
Monthly
29,371
stars
2,754
forks
214
watchers
4,467
prs
1,017
issues
360
releases

README

TruffleHog
  Find leaked credentials.


---









---

 :mag_right: _Now Scanning_





...and more

To learn more about TruffleHog and its features and capabilities, visit our product page.



 :globe_with_meridians: TruffleHog Enterprise

Are you interested in continuously monitoring Git, Jira, Slack, Confluence, Microsoft Teams, Sharepoint (and more) for credentials? We have an enterprise product that can help! Learn more at .

We take the revenue from the enterprise product to fund more awesome open source projects that the whole community can benefit from.



 What is TruffleHog 🐽

TruffleHog is the most powerful secrets Discovery, Classification, Validation, and Analysis tool. In this context, secret refers to a credential a machine uses to authenticate itself to another machine. This includes API keys, database passwords, private encryption keys, and more.

 Discovery 🔍

TruffleHog can look for secrets in many places including Git, chats, wikis, logs, API testing platforms, object stores, filesystems and more.

 Classification 📁

TruffleHog classifies over 800 secret types, mapping them back to the specific identity they belong to. Is it an AWS secret? Stripe secret? Cloudflare secret? Postgres password? SSL Private key? Sometimes it's hard to tell looking at it, so TruffleHog classifies everything it finds.

 Validation ✅

For every secret TruffleHog can classify, it can also log in to confirm if that secret is live or not. This step is critical to know if there’s an active present danger or not.

 Analysis 🔬

For the 20 some of the most commonly leaked out credential types, instead of sending one request to check if the secret can log in, TruffleHog can send many requests to learn everything there is to know about the secret. Who created it? What resources can it access? What permissions does it have on those resources?

 :loudspeaker: Join Our Community

Have questions? Feedback? Jump into Slack or Discord and hang out with us.

Join our Slack Community

Join the Secret Scanning Discord

 :tv: Demo

!GitHub scanning demo

bash
docker run --rm -it -v "$PWD:/pwd" trufflesecurity/trufflehog:latest github --org=trufflesecurity


 :floppy_disk: Installation

Several options are available for you:

 MacOS users

bash
brew install trufflehog


 Docker:

_Ensure Docker engine is running before executing the following commands:_

     Unix

bash
docker run --rm -it -v "$PWD:/pwd" trufflesecurity/trufflehog:latest github --repo https://github.com/trufflesecurity/test_keys


     Windows Command Prompt

bash
docker run --rm -it -v "%cd:/=\%:/pwd" trufflesecurity/trufflehog:latest github --repo https://github.com/trufflesecurity/test_keys


     Windows PowerShell

bash
docker run --rm -it -v "${PWD}:/pwd" trufflesecurity/trufflehog github --repo https://github.com/trufflesecurity/test_keys


     M1 and M2 Mac

bash
docker run --platform linux/arm64 --rm -it -v "$PW

Top issues

Latest release

v3.99.9 v3.99.9 2026-11-12
What's Changed
 Update module github.com/go-jose/go-jose/v4 to v4.1.6 [SECURITY] by @renovate[bot] in https://github.com/trufflesecurity/trufflehog/pull/5490
 Update module golang.org/x/net to v0.62.0 [SECURITY] by @renovate[bot] in https://github.com/trufflesecurity/trufflehog/pull/5492
 Add Interrupt and UserActionable errors by @mcastorina in https://github.com/trufflesecurity/trufflehog/pull/5491
 Clean up Postman source logging for per-source debug by @kashifkhan0771 in https://github.com/trufflesecurity/trufflehog/pull/5510
 Clean up GCS source logging for per-source debug by @kashi

News & coverage (17)

Hacker NewsTruffleHog v3 – Detect and automatically verify over 600 credential types▲ 84 · 8 comments · 2022-04-04Hacker NewsTruffleHog: Find, verify, and analyze leaked credentials▲ 1 · 0 comments · 2025-04-02finance.biggoClaude Code Settings File Leaks Passwords and API Keys Across Public GitHub Repos2026-11-09NotebookcheckClaude Code leaks thousands of secrets on GitHub2026-11-09news.lavx.huClaude Code exposed thousands of credentials in public GitHub repositories2026-11-09Ars TechnicaClaude Code is accidentally exposing secrets all over GitHub2026-11-09Crypto BriefingClaude Code leaks over 1,300 secrets into public GitHub repositories2026-11-09CybernewsAI agents are leaking their owners’ secrets on GitHub: thousands of files exposed2026-11-09ShiftDelete.NetClaude Code Secrets Leak to GitHub via 'Don't Ask Again' Button2026-11-09Tech Times on MSNClaude Code accidentally exposes secrets on GitHub, including passwords, API keys, and more2026-11-09
7 moreMartin Cid MagazineClaude Code’s ‘don’t ask again’ left passwords in 1,122 public GitHub files2026-11-08Yahoo FinanceTruffle Security Launches ‘TruffleHog Analyze’ to Help Security Teams Discover the Full Impact of their Leaked Keys/Secrets2024-08-07Aikido Security5 Gitleaks Alternatives for Better Secrets Scanning in 20262026-05-22Pasquale PillitteriMoneyForward GitHub Hack: Stolen Code and 370 Cards Exposed (2026)2026-05-04wiz.ioTracking TeamPCP: Investigating Post-Compromise Attacks Seen in the Wild2026-03-31Help Net SecurityTruffleHog: Open-source solution for scanning secrets2024-02-21Black Hills Information SecurityRooting For Secrets with TruffleHog2024-01-18

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON