Gitleaks vs TruffleHog
Gitleaks
github.comTruffleHog
trufflesecurity.comSide by side
| Figure | Gitleaks | TruffleHog |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 2 |
| Spec score · Secrets Scanning Software | 7.8 (#11) | 7.5 (#17) |
| Integrations | The project documents use as a pre-commit hook and as a GitHub Action. | The integrations page lists GitHub, GitLab, Bitbucket, Gerrit, Docker, Jenkins, Slack, Teams, Jira, Confluence, Google Drive, S3, and SharePoint, among others. |
| Purpose | Gitleaks detects secrets such as passwords, API keys, and tokens in Git repositories, files, and stdin. | TruffleHog scans code repositories and other sources to find exposed secrets, passwords, and sensitive keys. |
| Secret handling | The CLI has a redaction option that can redact secrets in logs and standard output, with a default redaction value of 100%. | The company says scanning occurs in memory and it stores only finding location metadata and redacted credential information, not the secrets themselves. |
Plans
In their own words
Gitleaks
Gitleaks is free, MIT-licensed software that detects secrets such as passwords, API keys, and tokens in Git repositories, files, and standard input. It runs on Linux, macOS, Windows, and self-hosted systems. Scans can target repositories, directories, individual files, or streamed data. Custom rules can use Go regular expressions, entropy checks, path matching, keywords, and allowlists. A previous report can serve as a baseline so later scans show only new findings. Output is available in JSON, CSV, JUnit, SARIF, or template formats. The project documents pre-commit hook and GitHub Action use, plus CI/CD, pull-request, and supported VCS workflows for GitHub, GitLab, Azure DevOps, Gitea, and Bitbucket. Installation options include Homebrew, Docker, Go, and prebuilt release binaries. A redaction option masks secrets in logs and standard output, with a default redaction value of 100%. The project describes itself as feature complete, with future releases limited to security patches, and its security policy supports only the latest version.
TruffleHog
TruffleHog scans code repositories and other sources for exposed secrets, passwords, and sensitive keys. It checks version history across branches and can find credentials in comments and Docker images, among other locations. For detected credentials, it checks the relevant protocol or API to determine whether they are live, helping reduce false positives. Its Analyze feature identifies the resources and permissions associated with API keys and other secrets without requiring access to a provider’s user interface. Pre-commit and pre-receive hooks can scan changes before they are committed. Alerts can point to credential-rotation actions and security guidance. Integrations include GitHub, GitLab, Bitbucket, Gerrit, Docker, Jenkins, Slack, Teams, Jira, Confluence, Google Drive, S3, and SharePoint, among others. Notifications can go to Slack, Jira, Splunk, webhooks, email, or stdout. The open-source plan costs nothing and includes 800+ secret detectors.