No secrets. No leaks. No stress.
A beautifully simple, interactive Node.js CLI tool for detecting leaked secrets, scanning git history, and validating environment files before they become a problem.
Accidentally pushing a .env file or leaking an API key is every developer's nightmare. noleaks gives you an interactive, zero-configuration menu to:
- Compare your
.envagainst.env.exampleto find missing or extra keys. - Scan for high-risk patterns like AWS Access Keys, GitHub Tokens, Stripe Keys, and RSA Private Keys.
- Dig through your Git history to see if a
.envfile was ever committed. - Automatically fix issues (e.g., adding
.envto.gitignore, scaffolding.env.example).
📦 npm → https://lnkd.in/gD6GvpV7
You can run noleaks directly via npx without even installing it:
npx noleaksOr install it globally to have it handy on your system:
npm install -g noleaks
noleaksWhen you run noleaks in your terminal, you'll be greeted with a slick, bold ASCII banner and a numbered matrix menu. No need to memorize complex CLI flags!
1) Validate .env 2) Scan secrets 3) Audit Git history
4) Auto-remediate issues 5) Scaffold .env.example 6) Exit
7) 🌐 Scan public GitHub URL
✔ What do you want to do? (1-7):
Understanding .env vs .env.example:
Think of your code like a locked house. Your .env file holds the real keys (passwords, API keys) and should never be uploaded to GitHub. Your .env.example file holds the empty keyring (blank passwords) so other developers know what keys they need to create to run your code.
- 1) Validate .env: Compares your
.envfile against your.env.examplefile. If you added a new password to.envbut forgot to add a blank placeholder for it in.env.example, it will warn you to fix it so your code doesn't crash for other developers! - 2) Scan secrets: Checks your local
.envfile for highly sensitive patterns (like AWS Access Keys, Stripe Keys, or GitHub tokens) to ensure you aren't accidentally exposing real secrets. - 3) Audit Git history: Even if you delete an accidentally committed
.envfile, it still lives in your Git history! This runs a deep search through all your past commits to see if a.envfile was ever leaked. - 4) Auto-remediate issues: The magic button. It instantly adds
.envto your.gitignorefile (making it impossible to push to GitHub), and automatically generates a safe, blank.env.examplefile based on your real variables. - 5) Scaffold .env.example: If you are starting a brand new project and don't have an example file, this generates a clean, empty template for you instantly.
- 7) Scan public GitHub URL: Paste any public GitHub link, and it will securely download the code into a hidden temporary folder, scan every single file for leaked passwords, and then delete the downloaded code completely so it leaves zero trace on your computer!
- Zero Config: No JSON or YAML config files required. Just run it.
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
This project is MIT licensed.