explaingit

trufflesecurity/trufflehog

📈 Trending26,365GoAudience · developerComplexity · 3/5ActiveLicenseSetup · moderate

TLDR

Scans code and data sources to find accidentally exposed credentials like API keys and passwords, then verifies if they're still active and what they can access.

Mindmap

mindmap
  root((repo))
    What it does
      Finds leaked credentials
      Verifies if active
      Shows permissions
      Scans 800+ secret types
    Where it scans
      Git repositories
      Jira and Slack
      Logs and wikis
      Cloud services
    Use cases
      Pre-deployment security check
      Continuous monitoring
      Incident prevention
      Compliance scanning
    Tech stack
      Go
      Git integration
      Cloud APIs
    Audience
      Developers
      DevOps teams
      Security teams

Things people build with this

USE CASE 1

Run a scan before making a private repository public to catch any accidentally committed API keys or passwords.

USE CASE 2

Set up automatic credential checks on every code commit to catch leaks before they reach production.

USE CASE 3

Audit your organization's repositories and data sources to find and remediate active leaked credentials.

USE CASE 4

Verify the permissions and access level of discovered credentials to prioritize which ones pose the biggest risk.

Tech stack

GoGitAWS SDKREST APIs

Getting it running

Difficulty · moderate Time to first run · 30min

Requires AWS credentials configured and API keys for services being scanned; Go build may need specific version.

Use freely for any purpose, including commercial use, with an open-source license; enterprise tier available for organizations.

In plain English

TruffleHog is a security tool that scans your code, repositories, and other data sources to find accidentally exposed credentials, things like API keys, passwords, and private tokens that someone committed to a codebase and shouldn't have. It's the kind of problem that's embarrassingly common: a developer pastes a working API key into their code during testing, forgets to remove it, and pushes it to GitHub where anyone can find it. What makes TruffleHog stand out from simpler credential scanners is that it doesn't just find suspicious-looking strings, it actually attempts to log in and verify whether the credentials are still active. Finding an old rotated key is low-priority; finding an active AWS key with production access is an emergency. TruffleHog tells you the difference, and for the most common credential types it goes further, showing you exactly what permissions that leaked key has and what resources it can access. The tool knows over 800 different types of secrets and can recognize credentials from AWS, Stripe, Cloudflare, GitHub, database passwords, SSL private keys, and hundreds of other services. It can scan Git repositories (including the entire commit history, not just the current state), Jira, Slack, wikis, logs, and more. For founders and developers: this is a practical first line of defense before deploying anything. Running a quick TruffleHog scan before making a repo public, or setting it up as an automatic check on every code commit, can prevent the kind of security incident that makes headlines. It's free and open source, with an enterprise tier for continuous monitoring across an entire organization.

Copy-paste prompts

Prompt 1
How do I set up TruffleHog to scan my Git repository for leaked API keys and credentials?
Prompt 2
Show me how to integrate TruffleHog into my CI/CD pipeline to automatically check for secrets on every commit.
Prompt 3
How does TruffleHog verify if a leaked credential is still active, and what does it tell me about its permissions?
Prompt 4
What are the main credential types TruffleHog can detect, and how do I scan sources like Slack or Jira for leaks?
Prompt 5
How can I use TruffleHog to audit my entire organization's repositories for exposed credentials?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.