Skip to content

Developer & Productivity Tools · Free

Betterleaks

Betterleaks is an open-source secret scanner maintained by the people who made Gitleaks, including Gitleaks' original author. It finds hard-coded credentials such as API keys, tokens, passwords and private keys in Git history, staged changes, folders, stdin and, in newer releases, remote sources such as GitHub, GitLab, Hugging Face, S3 and container images. It is written in Go, MIT-licensed, and its development is supported by Aikido Security. The repository was created in February 2026; Gitleaks' README has pointed users to it since May 21, 2026, when Gitleaks was declared feature complete with security patches only.

Who it is for: teams already using Gitleaks who want a maintained successor, and anyone who wants a fast regex-based pre-commit and CI scanner with optional checks on whether a found credential is live.

How it works. Rules are regular expressions with keywords, plus filters written in the Expr language that can look at the file path, Git author, commit message or the candidate secret to cut false positives. Version 1.10.1 (released November 12, 2026) ships 466 default rules, 229 of which include a validate expression. Validation is off unless you ask for it: --validation in v1, -v or --validate in v2, where -a also analyzes identity and permissions. Optional revocation exists for some rules but scans never revoke anything.

Coming from Gitleaks: the command shape is familiar (git, dir, stdin, and git --pre-commit --staged for hooks), and the project publishes a pre-commit hook with id betterleaks. One difference matters on day one: Betterleaks does not load a .gitleaks.toml or .betterleaks.toml from the scanned repository unless you pass --unsafe-auto-load-config, so pass --config or set BETTERLEAKS_CONFIG or GITLEAKS_CONFIG to keep existing allowlists. Rule names also differ in places, so compare baselines before switching.

Version status: v2 is in release candidates (v2.0.0-rc.16 on November 27, 2026) with a new JSON report envelope and SDK module path; until stable v2 ships, package managers and the Docker latest tag may still install v1.

Pricing type: free and open source.

Alternatives: Gitleaks (feature complete, security fixes only), TruffleHog (verification on by default, AGPL-3.0), and GitHub Secret Protection for server-side push protection.

Official URL: https://github.com/betterleaks/betterleaks

Official site