mrkeyoor.com_
Sat 26 Sept 23:37 UTC
Dev Toolsevaluationupdated 26 Aug 2026

trufflehog review

TruffleHog finds credentials in Git history, files, container images, cloud storage, collaboration systems, and build services. It can classify many findings by provider, check whether credentials are still live, and gather access details for selected credential types.

+50stars / 7d
Verdict

Our TruffleHog build succeeded, but 7 of 220 tests failed after a 521-second run, so pin and qualify the exact version before making it a mandatory gate. It remains a strong choice when live credential verification and broad source coverage materially improve incident response. Use a simpler pattern scanner when outbound validation, AGPL-3.0, or the larger operating surface conflicts with policy.

We ran it

Lab card: what happened when we ran trufflehogScreenshot of trufflehog (trufflesecurity.com)
Install✓ · 76s595 packages
Build✓ · 253s
Tests✗ · 521s213 passed · 7 failed of 220 (go test)
Repo3488 files~469,074 lines of source · 21.7 MB · 10 CI workflows · Dockerfile

Answers from our run

Does trufflehog build from source?

Dependencies installed in 76 seconds (595 packages), and the build succeeded in 253 seconds. We cloned commit 3ab759f into a clean Debian container with 3 CPUs and no project-specific setup.

Do trufflehog's tests pass?

Not all of them: 213 of 220 passed and 7 failed when we ran the project's own test command (go test). Some failures need services or credentials a bare container does not have.

Who should not use trufflehog?

Teams that prohibit outbound credential verification: TruffleHog can test findings against provider APIs, which exposes them to the service that appears to have issued them.

What are the alternatives to trufflehog?

Gitleaks, detect-secrets, ggshield. Our TruffleHog build succeeded, but 7 of 220 tests failed after a 521-second run, so pin and qualify the exact version before making it a mandatory gate.

Setup3/5Easy binaries and images; source tests had 7 failures
Docs5/5Sources, verification, CI, and signed artifacts are explicit
Community5/527,595 stars with active August 2026 releases and fixes
Maturity4/5Wide source coverage, but the measured full suite failed

Discussed on

  1. hnTruffleHog v3 – Detect and automatically verify over 600 credential types84 points
  2. hnTruffleHog now finds all Deleted and Private Commits on GitHub15 points
  3. hnTruffleHog V3: Automatically Validate over 600 API Keys13 points
  4. hnTruffleHog now finds all Deleted and Private Commits on GitHub (2024)3 points
  5. hnHugging Face Now Automatically Detects Leaked Secrets3 points

Who it’s for

Security teams that need secret discovery beyond the current contents of Git repositories.
Developers adding a pre-commit hook or CI gate with JSON or SARIF output.
Incident responders who want verified live credentials prioritized over a flat list of possible matches.
Organizations prepared to authorize provider API checks and protect findings as sensitive data.

Who it’s NOT for

Teams that prohibit outbound credential verification: TruffleHog can test findings against provider APIs, which exposes them to the service that appears to have issued them.
GitHub users who assume workflow artifacts are covered: open issue 5205 says the GitHub scanner does not download them.
Security programs requiring a fully pinned Action by default: open issue 4857 says the Action's version input defaults to the mutable latest image.
Contributors expecting a green full suite at the measured commit: our run passed 213 tests and failed 7.
Vendors that need a permissive embedding license: the open repository is AGPL-3.0.

Setup reality

Our sandbox install succeeded in 76 seconds with 595 Go packages. The build completed in 253 seconds. Tests ran for 521 seconds and failed: 213 passed and 7 failed out of 220. The supplied log tail ends with package results and FAIL, without naming the failed tests or showing their errors.

Local filesystem scans need no hosted account, while private GitHub, cloud, SaaS, and organization sources need appropriate tokens or credentials. Live validation makes outbound provider requests. Teams must choose result classes, scope history, secure output, define ignores, and connect findings to revocation.

Commit 3ab759f contained 3,488 files and about 469,074 source lines in 21.7 MB. The repository has a Dockerfile and 10 CI workflow files. SARIF buffers the complete scan in memory, and wide remote scans face source API permissions and rate limits.

Verification separates live credentials from suspicious strings

Most secret scanners ask whether text resembles a credential. TruffleHog can also classify the provider and, for supported types, contact that provider to check whether the credential still works. A verified result is more urgent than a placeholder or expired key. For selected common types, analyzers make further requests to identify ownership, accessible resources, and permissions, giving responders more context for rotation and containment.

The README says the engine classifies more than 800 secret types. Verification returns verified, unverified, or unknown states; unknown covers attempts blocked by network or API errors. This model reduces some false-positive work, but it does not make every unverified result safe. Custom formats, generic passwords, offline keys, and providers without validation still need policy and human review.

Provider checks make rollout a security decision

Validation sends a candidate credential to the service believed to have issued it. That request can appear in provider logs, trigger rate limits, or violate a rule against moving secrets outside an approved boundary. Teams should decide which detectors may verify, where scans run, how egress is restricted, and who can read output before enabling the feature across repositories.

The output itself is sensitive. JSON can carry the raw finding and provider metadata, while terminal and CI logs may be retained or copied. Restrict artifact access, redact downstream notifications, set deletion periods, and connect a verified result to an owner and revocation procedure. TruffleHog finds exposure; it does not rotate every supported credential automatically. Open issue 4171 still requests broader revocation functionality.

What happened when we ran it

Our sandbox installed 595 Go packages in 76 seconds and built TruffleHog in 253 seconds. The test step lasted 521 seconds and exited with code 1. Go test reported 213 passed and 7 failed out of 220. The supplied tail shows later packages completing or having no test files, followed by a final FAIL. It does not show the seven failing names or their error messages.

We therefore cannot attribute the failures to networking, credentials, timing, or a particular package. The exact finding is that commit 3ab759f did not pass its full measured suite in our unprivileged 3-CPU, 8 GB Go 1.24 container. The checkout had 3,488 files, about 469,074 source lines, and 21.7 MB, with a Dockerfile and 10 CI workflow files but no tests directory.

Git and cloud coverage goes beyond a pre-commit hook

TruffleHog scans Git repositories and organizations, issue and pull-request comments, filesystems, stdin, Docker images, S3, GCS, Postman, Jenkins, Elasticsearch, Hugging Face, and other sources documented in the CLI. That matters because secrets leak through build output, image layers, state files, copied conversations, and object storage as well as committed source. Private sources need credentials with enough read access.

Coverage still has boundaries. Open issue 5205 says the GitHub scanner does not download Actions artifacts, even though those archives can contain Terraform state and other sensitive output. Scan that store separately if it is in scope. Experimental cross-fork object discovery reaches deleted and hidden commits, but the README says enumeration can take 20 minutes to several hours and writes cache files unless cleanup is requested.

CI output is useful, while default pinning needs attention

The CLI emits streaming JSON and can fail CI with exit code 183 when valid credentials appear. SARIF integrates with GitHub code scanning and tracks findings on pull requests, but the README notes that SARIF buffers the whole result set before writing one document. Large finding sets therefore use more memory than streaming JSON. Base commit, branch, fetch depth, authentication, and history scope also affect runtime and coverage.

Release artifacts include checksums and Cosign signatures, with the expected workflow identity and OIDC issuer documented. That is good supply-chain practice. The official GitHub Action has a separate open concern: issue 4857 says its version input defaults to latest, so pinning the Action wrapper by commit does not automatically pin the scanner image. Set an explicit version and digest if immutable CI execution is required.

Git safety and repository edge cases need testing

Local Git scans copy a repository into a temporary directory by default to avoid trusting a malicious local Git configuration. The README ties this behavior to CVE-2025-41390 and offers a flag to scan directly only when the repository is trusted. That default is sensible for a tool that parses attacker-controlled history. Custom clone paths are available when system temporary storage is unsuitable.

Open issue 5232 reports that a malformed binary-diff line can panic the Git parser in v3.97.1. Issue 5181 reports that pre-commit mode fails in repositories using Git worktree configuration because of an upstream go-git limitation. Neither issue erases the broader Git support, but both justify regression cases for the exact repository shapes your organization uses before making the scanner a blocking check.

Current releases are active, and AGPL remains a boundary

GitHub recorded 27,595 stars, 524 combined issues and pull requests, and a push on August 25, 2026. Release v3.97.1 arrived August 24 with a go-git security update, detector work, GitHub Enterprise data-residency support, timeout changes, and fixes. The dates show active maintenance; the combined open number is not a confirmed bug count.

The open code is AGPL-3.0, while Truffle Security sells an enterprise monitoring product. Internal command-line use and vendor embedding create different legal questions, so product teams should have counsel review modifications, distribution, and network-service use. Operationally, TruffleHog earns its complexity when verified status changes response priority. If every scan must stay offline, Gitleaks or detect-secrets is the cleaner fit.

Alternatives

ProjectWhat it isPick it when
Gitleaks gh↗A fast configurable secret scanner for Git, files, pre-commit, and CI.pick this instead when local pattern detection and a smaller operating surface matter more than live credential checks.
detect-secretsA baseline-oriented scanner designed to stop new secrets entering a repository.pick this instead when gradual adoption around an audited baseline is the main workflow.
ggshieldGitGuardian's CLI for scanning commits, files, images, and CI through its service.pick this instead when you want hosted detection and centralized remediation around the CLI.

What people are saying

  1. [github-trending] trufflesecurity/trufflehog

Sources

  1. TruffleHog README
  2. TruffleHog v3.97.1 release
  3. GitHub Action image pinning issue 4857
  4. Malformed binary diff issue 5232
  5. GitHub Actions artifact request 5205
  6. Git worktree pre-commit issue 5181

More dev tools reviews

terminal-browser · fearless_simd · devops-exercises · scriptc · 30-seconds-of-code · styleguide · the whole board →