TruffleHog
$ trufflehog Official Med Risktrufflehog scans git repos, filesystems, S3 buckets, and Docker images with 800+ secret detectors and optional live API verification. Agents should pass --no-verification for offline-only scans and suppress raw secret echo when reviewing --json output.
brew install trufflehog Local repository scanning via trufflehog keeps candidate credentials inside local pipes rather than MCP JSON traffic.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Emits NDJSON via --json, supports --only-verified, --no-verification, and --fail CI exit codes.
- Native
--jsonNDJSON output and--no-updatecontrol
Read-only on local repos, but live verification makes outbound HTTP checks to third-party APIs and --json includes .Raw secret strings unless stripped.
- Emits
.Rawsecret values in JSON and sends verification probes unless disabled
Single Go binary via brew, Docker, go install, and GitHub releases.
- Cross-platform static binary
800+ detectors and live verification dramatically cut false positives compared to naive entropy scanners.
- High-precision secret detection across git, FS, containers, and cloud
Actively maintained by Truffle Security under AGPL-3.0.
- High-velocity upstream repository
Detailed README covering targets, verification, and JSON schema.
- Clear GitHub README and
--help
Security, Auth & Guardrails
None required for local scans; uses GITHUB_TOKEN or cloud credentials only when scanning remote targets.
CLI is free OSS (AGPL-3.0); TruffleHog Enterprise is a commercial product.
# TruffleHog Agent Rules - Pass `--no-verification --no-update` when offline/air-gapped scanning is required. - Filter `--json` with `jq 'del(.Raw, .RawV2)'` before reading results into LLM context so raw secrets are stripped.
Agent-Ready Command Recipes
Safe Read-Only Queries
trufflehog filesystem . --no-verification --no-update --json
Detects candidate secrets locally without contacting third-party provider APIs or auto-updating.
trufflehog git file://. --only-verified --no-update --json
Focuses strictly on confirmed active credentials in git history.
Strengths for Agents
- + 800+ specialized detectors plus optional live verification eliminate most false positives.
- + Streams structured NDJSON with
--jsonacross git, filesystems, and container images.
Caveats & Pitfalls
- !
--jsonincludes.Rawmatched secrets by default—strip withjq 'del(.Raw, .RawV2)'before putting output in LLM context. - ! Live verification sends outbound network requests unless
--no-verificationis passed.