TruffleHog
trufflesecurity/trufflehog
A powerful tool that scans code repositories, chats, and logs to find accidentally leaked passwords, API keys, and other sensitive information, verifying if they are still active.
Find, verify, and analyze leaked credentials
AI Summary
What This Project Does
TruffleHog is like a security guard specifically looking for trouble in your code. It carefully scans your Git repositories, local files, and even chat logs to find accidentally written passwords, API keys, or encryption private keys.
What Problems It Solves
Often, for testing convenience, we write real passwords into code and forget to delete them, leading to account theft. It helps you find these "time bombs" in advance and confirm if these keys are still valid, avoiding future security incidents.
Who It's For
Programmers writing code, operations personnel responsible for company security, or any technical team wanting to check if their projects are secure.
Typical Use Cases
1. Scan code repository history before project launch to ensure no sensitive info is left behind.
2. Run automatically in CI/CD workflows to prevent new commits from containing keys.
3. Scan local config files to prevent local passwords from being accidentally uploaded to public networks.
Key Strengths & Highlights
It doesn't just match formats; it attempts to log in to verify if the key is truly valid. Supports identifying over 800 different types of keys, much more accurate than traditional regex matching.
Getting Started Requirements
No coding required, can run directly via command line or Docker after installation. Requires some command line basics, enterprise version may need paid features.
Purpose
Suitable for regular self-checks of code repository security to prevent account theft caused by sensitive information leaks. Not suitable for attacking others or scanning unauthorized systems; only recommended for projects you have permission to audit.
Category
Tech Stack
Project Info
- Primary Language
- Go
- Default Branch
- main
- License
- AGPL-3.0
- Homepage
- https://trufflesecurity.com
- Created
- Dec 31, 2016
- Last Commit
- yesterday
- Last Push
- yesterday
- Indexed
- Apr 18, 2026