BrowseSecurity & networking tools
Gitleaks
Command-line tool that detects secrets such as passwords, API keys and tokens in git repositories, files and stdin.
Tested on LinuxKnown vulnerabilities
Use it
Before you install: known vulnerabilities
pickfit found 13 known high or critical vulnerabilities in the packages a fresh install brings (OSV.dev, 16 Nov 2026). Weigh this before you install it.
go:github.com/andybalholm/brotli v1.2.0Excessive memory allocation when decompressing crafted streams in github.com/andybalholm/brotli (GO-2026-6888, critical, fixed in 1.2.7)go:golang.org/x/crypto v0.35.0golang.org/x/crypto vulnerable to auth bypass via unenforced @revoked status (GHSA-5cgq-3rg8-m6cv, critical, fixed in 0.52.0)
See 8 more
go:golang.org/x/crypto v0.35.0— GHSA-89gr-r52h-f8rx (critical), fixed in 0.52.0go:golang.org/x/crypto v0.35.0— GHSA-f5wc-c3c7-36mc (critical), fixed in 0.52.0go:golang.org/x/crypto v0.35.0— GHSA-jppx-rxg9-jmrx (critical), fixed in 0.52.0go:golang.org/x/crypto v0.35.0— GHSA-rm3j-f69w-wqmq (critical), fixed in 0.52.0go:golang.org/x/crypto v0.35.0— GHSA-vgwf-h737-ff37 (critical), fixed in 0.52.0go:golang.org/x/crypto v0.35.0— GHSA-x527-x647-q7gg (critical), fixed in 0.52.0go:github.com/klauspost/compress v1.18.0— GHSA-259r-337f-4rfw (high), fixed in 1.18.7go:github.com/klauspost/compress v1.18.0— GO-2026-6865 (high), fixed in 1.20.2
3 more findings not listed here.
Linux x86_64
You need first
- Runtimes:
go (for building from source)
Download the v8.30.1 linux_x64 release tarball and install the gitleaks binary into ~/.local/bin
mkdir -p ~/.local/bin /tmp/gl && curl -fsSL -o /tmp/gl/gl.tgz https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz && tar -xzf /tmp/gl/gl.tgz -C /tmp/gl && install -m 755 /tmp/gl/gitleaks ~/.local/bin/gitleaks
Check that it works
gitleaks versionThe output should contain “8.30.1”.
First thing to try
gitleaks versionRun gitleaks version to confirm it is installed, then gitleaks dir -v <path> to scan files.
What it does
- Scan directories or files for secretsTested
How to use it
- Run
gitleaks dir -v <path>on a file or directory. - Read each finding's rule ID, file, line and fingerprint in the output.
- Run
- Find secrets in text piped from stdinTested
How to use it
- Pipe text into Gitleaks with
cat <file> | gitleaks -v stdin. - Check the RuleID of each finding to see what kind of secret was found.
- Pipe text into Gitleaks with
- Write your own secret detection rulesTested
How to use it
- Create a TOML config file with a
[[rules]]entry that sets anid,description,regexandkeywords. - Scan with your rules using
gitleaks dir -v --config <config.toml> <path>.
- Create a TOML config file with a
- Scan git repositories for secretsNot tested
How far pickfit got
Linux x86_64
- Installs
- Starts
- 3 of 4 features work
- Works offline
macOS and Windows: the project says it runs there; pickfit hasn’t tried it.
Good for
- scan a local git repository history for leaked secrets
- block commits containing secrets with a pre-commit hook
- run secret scanning in CI as a GitHub action
- scan directories or files for secrets
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
Its main function works
- Replayed from scratch
- Works offline
- Checked on 15 Nov 2026
- Version 8.30.1
Differences the test machine hit
- README: From Source (make sure `go` is installed): git clone ...; cd gitleaks; make build
In the test: Go is not available in this box and may not be installed here, so I used the prebuilt release binary (gitleaks_8.30.1_linux_x64.tar.gz) from the releases page that the README links to. - README: --exit-code int exit code when leaks have been encountered (default 1)
In the test: Scans that find secrets exit 1 by default. That is expected, not an error. Use --exit-code 0 if a pipeline needs exit 0.