Scan every app you built with AI for leaked API keys, before someone else does
AI coding tools love pasting API keys straight into your code, and deleting them later doesn't delete them from Git. Gitleaks digs through every old version of your project for OpenAI, Stripe, AWS and GitHub keys, and blocks new ones before they're committed. Free, open source, and it runs on your own PC.
- A clear plan for a key that did leak: cancel it first, then clean up
- A one-command sweep of every repo on your GitHub account
- A project that uses Git (anything you've pushed to GitHub counts)
- Git installed. If
git --versionprints a number, you're set - About 31MB of free disk space
- For the clean-up in step 6 only: uv (
winget install --id astral-sh.uv -eon Windows,brew install uvon a Mac, or see Level 0)
Get Gitleaks (one file, no admin)
Gitleaks is a single free program. No account, no installer, and it runs on your own computer.
Gitleaks ↗ is a free, open-source scanner with about 29,800 stars on GitHub. It knows 222 patterns for API keys, tokens and passwords, from OpenAI and Stripe keys to AWS and GitHub tokens.
Open PowerShell and paste this. It downloads the official Windows build from Gitleaks' GitHub releases into a
gitleaksfolder in your user folder:Windows (PowerShell)$dir = "$HOME\gitleaks" Invoke-WebRequest https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_windows_x64.zip -OutFile "$dir.zip" Expand-Archive "$dir.zip" $dir Set-Alias gitleaks "$dir\gitleaks.exe" gitleaks versionOutput8.30.1The download is 8.4MB. Unzipped, it's one 22.6MB file,
gitleaks.exe. Nothing is installed into Windows and there's no admin prompt.TipSet-Aliasonly lasts until you close the window. In a new PowerShell window, runSet-Alias gitleaks "$HOME\gitleaks\gitleaks.exe"first. Want a permanent command instead?winget install --id Gitleaks.Gitleaks -einstalls the same official build as a normal command.Macbrew install gitleaks
gitleaks version prints 8.30.1 (or a newer number).If it breaksExpand-Archive says a file "already exists" + 1 more
Expand-Archive says a file "already exists"
-Force to the end of the Expand-Archive line and run it again.'gitleaks' is not recognized
Set-Alias line again.