OSINT tool
Install gitleaks on Windows, macOS and Linux
Find secrets and API keys committed to git repositories and files.
ot install gitleaksgitleaks scans a git repository's whole history, or any directory, for passwords, API keys and tokens. It matches a large set of known secret formats, runs offline and is fast enough to use on every commit.
How to install gitleaks
ot install gitleaksot downloads gitleaks 8.30.1 as a prebuilt binary from github.com/gitleaks/gitleaks and verifies its SHA-256 checksum before installing it. Nothing has to be compiled.
New to ot? It is one command to install, shown below.
How to use gitleaks
Arguments after the tool's name go straight to gitleaks, so its own documentation applies unchanged.
Scan the history of the repository in the current directory.
ot run gitleaks git -v .Scan plain files that are not in git.
ot run gitleaks dir ./configWrite a JSON report and hide the secrets in the output.
ot run gitleaks git --redact --report-path leaks.json .ot run gitleaks --help lists every option. The project's own documentation is at github.com/gitleaks/gitleaks.
An AI agent can run gitleaks too: ot mcp serves it over the Model Context Protocol. See OSINT with AI agents.
gitleaks licence, platforms and versions
| Project | https://github.com/gitleaks/gitleaks |
| Licence | MIT |
| Runs on | Windows, macOS and Linux |
| Takes | repository, directory |
| Sends traffic to the target | No |
| Release binary | version 8.30.1 from github.com/gitleaks/gitleaks, verified by SHA-256 |
Questions about gitleaks
How do I install gitleaks on Windows?
Open PowerShell and install ot with irm https://otinstaller.com/install.ps1 | iex. Then run ot install gitleaks. ot fetches a pinned version of gitleaks and keeps it under ~/.ot, apart from the rest of your system.
Is gitleaks free?
Yes. gitleaks is open source, released under the MIT licence. ot, which installs it, is free under the Apache 2.0 licence.
Do I need Go or a compiler to install gitleaks?
No. ot downloads the prebuilt gitleaks binary for your platform and checks its SHA-256 checksum. A mismatch installs nothing.
How do I update or remove gitleaks?
ot update gitleaks moves it to the version pinned in ot's registry, and ot update gitleaks --latest to the newest upstream release. ot remove gitleaks uninstalls it.
Install ot
curl -fsSL https://otinstaller.com/install.sh | shirm https://otinstaller.com/install.ps1 | iexRun it in PowerShell.
Current version: 0.3.0. Both scripts verify the download against its SHA-256 checksum before installing.