BASE

TruffleHog

TruffleHog

Developer CLI · Free

A credential scanner for source code and related sources: it helps find secrets and assess their risk in development workflows.

Also known as: trufflesecurity/trufflehog; trufflehog; secret-scanner

Resource illustration: TruffleHog

Open resource ↗

What you can use for free

Code and local use under AGPL-3.0.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under AGPL-3.0. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Find accidentally published repository credentials
  • Inspect findings and determine which credentials require revocation and replacement

Example workflow

A possible workflow; this is not a report of hands-on testing.

Find accidentally published repository credentials.

Before you start

  • Project files or environment.
  • A shell and supported platform.

Steps

  1. Choose a repository or another supported source for secret scanning.
  2. Inspect findings and determine which credentials require revocation and replacement.
  3. Save the working command or script and the result criteria.

Check your result

  • The command correctly handles paths, Unicode, and invalid inputs.
  • Repeat runs behave predictably; credentials do not appear in the output.

Choosing TruffleHog

Find accidentally published repository credentials

Choose this when

  • Find accidentally published repository credentials
  • Inspect findings and determine which credentials require revocation and replacement

Requirements

  • The README's Docker commands require running Docker. A local Git repository is cloned to a temporary directory by default to reduce risks from its configuration.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: AGPL-3.0 for the code; copyleft obligations apply to a modified version accessed over a network.
  • Unknown does not mean the secret is invalid. SARIF accumulates results in memory until scanning ends. Exit code 183 for detected secrets is used with --fail; error 1 may indicate an incomplete scan.

Frequently asked questions

What can you use for free in TruffleHog?

Code and local use under AGPL-3.0.

What additional costs might arise with TruffleHog?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for TruffleHog?

AGPL-3.0 for the code; copyleft obligations apply to a modified version accessed over a network.

How do you get started with TruffleHog?

Choose a repository or another supported source for secret scanning. Inspect findings and determine which credentials require revocation and replacement. Save the working command or script and the result criteria.

What do verified, unknown, and unverified mean in TruffleHog?

Verified means successful secret verification with the provider; unknown means a verification error; unverified means a detected but unconfirmed secret. Verification contacts the provider's service; disable it with --no-verification.

License

AGPL-3.0 for the code; copyleft obligations apply to a modified version accessed over a network.

AGPL 3.0 — copyleft with a network-service condition

Use, modification, and commercial use cases are permitted. GPL obligations apply to distribution. If you modify an AGPL-covered program and let users interact with it over a network, you must offer them the corresponding source code for that version. This applies to the covered program, not automatically to all your data or independent applications.

License terms

Technologies and topics

  • TruffleHog
  • CLI
  • Development

Sources

Other resources