otinstaller · Secrets and cloud
Install Gitleaks on Windows, macOS, or Linux in one command
gitleaks 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.
Gitleaks in three lines
curl -fsSL https://otinstaller.com/install.sh | sh
ot install gitleaks
ot run gitleaks git -v .On Windows, replace the first line with irm https://otinstaller.com/install.ps1 | iex in PowerShell.
Runs gitleaks/gitleaks (MIT, ★ 31k, otinstaller 0.3.0). otinstaller installs it as a release binary, pinned to version 8.30.1; it does not change or audit the tool itself.
What Gitleaks is for
- Scanning a repository's whole history for committed secrets.
- Checking a config directory before it is shared.
- A JSON report with the values redacted (--redact).
Run Gitleaks with ot
ot run gitleaks passes everything after the tool's name to Gitleaks unchanged, with input and output passed through, so the project's own documentation applies and tools pipe into each other.
- 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 ./config- Write a JSON report and hide the secrets in the output.
ot run gitleaks git --redact --report-path leaks.json .
Where the results go
ot run saves nothing itself: Gitleaks's output goes to your terminal, a pipe, or wherever its own output option writes it. Results can hold personal data, so store and share them accordingly.
Before you run it
- It matches patterns and does not test the keys it finds, so expect some false positives. TruffleHog verifies them.
- A secret removed in a later commit is still in the history and still shows up.
Update, remove, inspect
ot info gitleaks # details, and how it installs on this system
ot update gitleaks # move to the version the registry pins
ot update gitleaks --latest # take the newest upstream release instead
ot remove gitleaks # remove itFull reference: the otinstaller docs, Gitleaks on otinstaller.com, and the tool's own project page.
Pairs with
When open-source isn't enough
Gitleaks finds secrets in code you can read. SearchIn's breach providers show where an organisation's credentials already appear in leaks.
FAQ
Gitleaks with otinstaller, answered
How do I install Gitleaks on Windows, macOS, or Linux?
Install ot once with the one-line script on the otinstaller page, then run ot install gitleaks. Ot downloads the project's release binary for your system and checks its SHA-256 hash before it installs anything, at version 8.30.1. ot itself needs no administrator rights, and ot doctor checks that every installed tool starts.
How do I run Gitleaks through ot?
With ot run gitleaks followed by Gitleaks's own arguments, for example: ot run gitleaks git -v .. ot passes everything after the tool's name straight through and exits with the tool's exit code, so the project's own documentation applies unchanged. Add ~/.ot/bin to your PATH to call the tool by its own name.
Is Gitleaks part of ot scan?
No. ot scan takes a username, an email address, a domain, or a phone number and runs the tools the registry assigns to that kind of target. Run Gitleaks on its own with ot run gitleaks.
Does Gitleaks need an API key or a login?
ot stores no key for it. It matches patterns and does not test the keys it finds, so expect some false positives. TruffleHog verifies them.
Does Gitleaks send traffic to the target?
The registry lists Gitleaks as passive: it does not probe the target's own systems. Options that do contact the target, where the tool has them, are named under "Before you run it".