trufflehog

Scan git repositories and local filesystems for leaked credentials and secrets.

2|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/zachmayer/skills --skill trufflehog-zachmayer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trufflehog
Source: https://github.com/zachmayer/skills/tree/main/.claude/skills/trufflehog
Command: npx skills add https://github.com/zachmayer/skills --skill trufflehog-zachmayer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill identifies hardcoded credentials, API keys, and sensitive secrets hidden within your codebase, preventing accidental exposure and security breaches.

Core Features & Use Cases

  • Comprehensive Scanning: Scans full git history, filesystem directories, and remote GitHub organizations for leaked secrets.
  • Verification: Validates findings against provider APIs to confirm if a credential is live and active.
  • Use Case: Before pushing code to a public repository, run this skill to ensure no AWS keys or database passwords have been accidentally committed to the git history.

Quick Start

Use the trufflehog skill to scan the current directory for any verified leaked secrets and output the results in json format.

Frequently Asked Questions about trufflehog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan git history for leaked secrets and credentials?

To scan git history for leaked secrets, you can run a deep history scan across local repositories and filesystems. This process identifies hardcoded credentials and verifies them against provider APIs to confirm if they are active.

What is the best way to audit a remote GitHub organization for exposed API keys?

Auditing a remote GitHub organization for exposed API keys requires scanning the organization's repositories directly. This approach detects leaked credentials across the remote infrastructure and verifies findings against provider APIs.

Do I need to install the TruffleHog binary to scan local filesystems for sensitive data?

Yes, you need the TruffleHog binary installed and accessible in your system path to scan local filesystems for sensitive data. The binary handles the execution required to detect and verify hardcoded secrets within your directories.

How does credential verification work when detecting leaked secrets in a repository?

Credential verification works by validating detected secrets against provider APIs to confirm if a credential is live and active. This mechanism ensures you only act on verified leaked credentials, preventing accidental exposure and reducing false positives.

Can I scan full git history for database passwords before pushing code to a public repository?

Yes, you can scan full git history for database passwords before pushing code to a public repository. Deep history scanning identifies sensitive secrets hidden in previous commits, ensuring no hardcoded credentials are accidentally exposed.