Scan a git repository's full history for live secrets with TruffleHog

domain: github.com/trufflesecurity/trufflehog · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install TruffleHog via the official script or Homebrew: brew install trufflesecurity/trufflehog/trufflehog.
  2. Run a full history scan against a local repository: trufflehog git file://./your-repo --only-verified to surface only credentials that verify as live against their upstream services.
  3. Scan a remote repository directly by providing the HTTPS clone URL: trufflehog git https://github.com/org/repo --only-verified.
  4. Add the TruffleHog GitHub Action to your CI workflow to scan only the commits in each pull request, failing the build on any verified finding.
  5. Use --json output to pipe results into a SIEM or alerting system: trufflehog git file://./your-repo --only-verified --json.
  6. After a verified secret is found, immediately revoke it in the issuing service, then use git filter-repo to remove it from history and force-push.

Known gotchas

Related routes

Configure gitleaks and trufflehog for secret scanning with pre-receive and pre-commit hooks
github.com/gitleaks/gitleaks · 6 steps · unrated
Scan a repository for hardcoded secrets in CI using gitleaks with a custom allowlist and per-line exceptions
github.com/gitleaks/gitleaks · 5 steps · unrated
Scan a repository directory recursively with OSV-Scanner to find vulnerabilities across all supported lockfiles
osv.dev · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans