# TruffleHog

> Open-source scanner that finds leaked API keys, passwords and tokens in Git history, files, buckets and more, and checks if they work.

Source: https://osinttools.io/tools/trufflehog/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** URL, File
- **Category:** Infrastructure and domains
- **Pricing:** Free, open source
- **Footprint:** depends on the modules you run
- **Account required:** no
- **API:** no public API
- **Platforms:** CLI (Linux/macOS/Windows) · Docker
- **Website:** https://trufflesecurity.com/trufflehog
- **Source code:** https://github.com/trufflesecurity/trufflehog
- **GitHub:** trufflesecurity/trufflehog, 29,664 stars · Go · AGPL-3.0 · last commit 2026-11-24
- **Listed:** Nov 25
- **Last verified by an editor:** Nov 25, 2026

## What it does

TruffleHog searches for secrets such as API keys, passwords, private keys and auth tokens across Git repositories and their full history, GitHub organisations, filesystems, Docker images, S3 and GCS buckets, CI logs and chat or wiki exports. It has hundreds of detectors and can verify a found credential against the provider to see whether it is still live.

Security researchers and investigators use it to find credentials accidentally exposed in an organisation's public code. Its analyse command can show what a key can access. Verifying or using credentials that are not yours may be illegal; disable verification when you only need to detect.

Footprint is depends: whether the target is contacted depends on which modules or transforms you run. No account is needed. There is no public API.

## Features

- Scans Git history, GitHub, filesystems and buckets
- Hundreds of credential detectors
- Live verification of found secrets
- Permission analysis for many key types
- JSON output
- Docker and Homebrew installs

## Pros

- Free and open source
- Wide range of sources and detectors
- Verification cuts false positives
- Actively maintained

## Cons

- Command-line only
- Verification contacts third-party services and may be unlawful for credentials you are not authorised to test
- Large scans can be slow and noisy

## When to use it

- Use it when you need to check an organisation's public repositories for exposed credentials.
- Use it when you want to audit your own code and infrastructure for leaked secrets.

## Quick start

Homebrew or Docker:

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

## Alternatives

- [Hakrawler](https://osinttools.io/tools/hakrawler/): Fast Go web crawler that lists URLs and JavaScript file locations found on a website. (Open source · URL · active · 5,174 GitHub stars)
- [NetworkMiner](https://osinttools.io/tools/networkminer/): Network forensics tool that pulls files, images, messages, credentials and host details out of PCAP files. (Freemium · File · passive)
- [Wireshark](https://osinttools.io/tools/wireshark/): Free, open-source network protocol analyzer for capturing and inspecting traffic packet by packet. (Open source · File · passive)
- [BuiltWith](https://osinttools.io/tools/builtwith/): Website technology profiler showing the frameworks, analytics, ad and hosting services a site uses, with history. (Freemium · Domain, URL · passive)
- [Gobuster](https://osinttools.io/tools/gobuster/): Fast Go brute-forcer for web directories and files, DNS subdomains, virtual hosts and cloud storage buckets. (Open source · Domain, URL · active · 14,356 GitHub stars)
- [Netcraft Extension](https://osinttools.io/tools/netcraft-extension/): Netcraft's free extension that shows a site report with hosting and technology details and blocks known phishing and malicious scripts. (Free · URL, Domain · passive)

All alternatives to TruffleHog in one table: https://osinttools.io/tools/trufflehog/alternatives/

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
