Gitleaks: free secret scanner for git repos and directories
Gitleaks is a free MIT-licensed command-line tool that detects secrets such as passwords, API keys and tokens, not personal data[1] [2]. Its README says it is feature complete, gets security patches only, and that the maintainer's focus has moved to a new project, Betterleaks[2]. It scans git repositories, directories and piped input, which covers 2 of the 8 kinds of data store, with regex rules and no price[2] [1].
Last reviewed ยท Markdown version
At a glance
- The README states that Gitleaks is feature complete and that future releases will be security patches only; the latest release, v8.30.1, was published March 21, 2026, and the last commit on the default branch is dated October 23, 2026; the README says the maintainer's focus has moved to Betterleaks[2] [3] [4].
- The repository had 31,549 GitHub stars on December 4, 2026 and is not archived[1].
- The default configuration ships 222 detection rules[5].
Where Gitleaks can look
Git mode runs git log -p over a local repository and scans the patches[2]. Dir mode scans directories and files, and with no target given Gitleaks scans the current working directory[2]. Stdin mode scans whatever is piped in, for example cat some_file | gitleaks -v stdin[2]. The README names no object storage, database, warehouse or SaaS target[2].
| Kind of store | Named in the documentation | Source |
|---|---|---|
| Object storage | None found in the pages cited | [2] |
| Databases | None found in the pages cited | [2] |
| Warehouses | None found in the pages cited | [2] |
| SaaS apps | None found in the pages cited | [2] |
| File shares | None found in the pages cited | [2] |
| Endpoints | local directories and files | [2] |
| Code repos | local git repositories (git log -p) | [2] |
| Logs | None found in the pages cited | [2] |
How it detects sensitive data
Each rule is a Go regular expression and can set a minimum Shannon entropy for the matched secret group[2]. Users write their own rules in a TOML configuration that replaces or extends the default rules[2]. The --max-decode-depth flag decodes percent, hex (32 characters or more) and base64 (16 characters or more) encoded text before matching and --max-archive-depth scans inside zip and tar archives; both default to 0, which turns them off[2]. A gitleaks:allow comment on a line or a fingerprint listed in an ignore file (.gitleaksignore) suppresses a finding[2]. The README publishes no accuracy figure, and Gitleaks has no personal-data detectors[2].
What a scan costs
Gitleaks is free under the MIT license and publishes no price[1]. It scans the git history, directory or stream it is given and runs locally, so compute is the user's own[2]. The --log-opts flag passes git log options, for example --log-opts="--all commitA..commitB", so a scan can cover a commit range only[2]. The README gives no throughput figure[2].
Finding data stores nobody listed
Gitleaks has no discovery mode: it scans only the repository, directory or piped input named on the command line[2].
Deployment and where the data goes
It runs locally as a release binary or through Homebrew, Docker or go install, and as a pre-commit hook or GitHub Action. The README describes no hosted service[2]. Findings and the secrets they contain stay on the machine that runs the scan; the --redact flag masks all or part of each secret in logs and stdout[2]. The pre-commit hook blocks a commit that contains a secret[2]. GitLab's pipeline secret detection analyzer runs the gitleaks command; its troubleshooting section quotes the error "Couldn't run the gitleaks command"[6].
Output: exports, APIs and integrations
Reports go out as json, csv, junit, sarif or a custom template, and each finding carries a fingerprint[2]. A baseline file limits later scans to new findings[2]. The README names no catalog, ticketing, SIEM or data subject request integration[2].