trufflehog3
Find secrets in your codebase
What it is and what it does
Trufflehog3 is a secret scanner that searches Git repositories and source code for exposed credentials, API keys, and other sensitive data. It uses pattern-based detection to identify secrets in commit history, current files, or both, and can output results in multiple formats including JSON and interactive HTML reports.
The package is built on GitPython, Jinja2, and PyYAML, allowing it to clone remote repositories, parse configuration files, and generate formatted reports. It supports custom detection rules via YAML configuration, inline exclusion comments to suppress false positives, multiprocessing for faster scans, and incremental scanning against baseline reports to track new issues only.
Use it for:
- Scan a Git repository's commit history to find accidentally committed secrets before they reach production.
- Generate an HTML report of secrets found in a codebase for security review and remediation tracking.
- Run incremental scans against a baseline to identify only new credential exposures in ongoing CI/CD pipelines.
- Exclude known false positives using inline nosecret comments or custom rule configuration.
- Scan a local directory without Git history to quickly check current source code for hardcoded credentials.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Scans Git repositories and source code for secrets, API keys, and other sensitive data using pattern matching, with support for custom rules and incremental scanning.
Yes, if you need secret detection in Git repositories and can accept the aging maintenance status. The package is stable and has no known vulnerabilities, but the last release was over a year ago and there is no recent development activity. Suitable for one-off scans or CI/CD integration where active updates are not critical; reconsider if you require ongoing security rule updates or active maintainer support.
Install
trufflehog3 on PyPI
pip
pip install trufflehog3uv
uv add trufflehog3poetry
poetry add trufflehog3Installing trufflehog3
Before you install
Low install friction with four common runtime dependencies (attrs, GitPython, Jinja2, PyYAML). Maintenance status is aging—last release was 2024-05-24 and the repository shows no recent activity, though it remains unarchived.
License in practice
License is marked as GNU but SPDX classification is unclear, creating ambiguity about which GPL variant applies and what obligations it imposes on derivative works or bundled distributions.
Quickstart
pip install trufflehog3
trufflehog3 --depth 10 https://github.com/user/repo
trufflehog3 --no-history --format json --output report.json
Requires Python >=3.7; Git must be installed and accessible for repository scanning.
Verify before relying
- Whether the unclear GNU license (raw: 'GNU', SPDX: null) is GPLv2, GPLv3, or another variant—affects compliance obligations.
- Current maintenance status and whether the aging codebase receives security updates or bug fixes.
- Whether multiprocessing support and incremental scan features work reliably in production environments.
Package facts
| License | GNU (unclear) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — attrs, GitPython, Jinja2, PyYAML |
| Maintenance | aging — 812 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 89,620/month — #13,643 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: trufflehog3-3.0.10-py2.py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
scanossScanoss provides a Python library and CLI tool…
permissive · top 15,000 on PyPI
truffleHogScans Git repositories and other sources for…
unclear · top 15,000 on PyPI
detect-secretsDetects secrets (API keys, tokens, credentials)…
permissive · top 5,000 on PyPI
bc-detect-secretsDetects secrets (API keys, tokens, credentials)…
permissive · top 5,000 on PyPI
kingfisher-binKingfisher is a command-line secret scanner…
permissive · top 15,000 on PyPI
ggshieldggshield is a CLI tool that scans files,…
permissive · top 15,000 on PyPI
cycodeCycode is a command-line security scanner that…
permissive · top 15,000 on PyPI
flawfinderFlawfinder scans C/C++ source code to identify…
copyleft · top 15,000 on PyPI
pysonarA command-line scanner that integrates Python…
copyleft · top 15,000 on PyPI
abi3auditabi3audit scans Python extension wheels and…
permissive · top 15,000 on PyPI