npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

leak-proof

v1.1.0

Published

Zero-config Git pre-commit hook that blocks secrets (AWS keys, API tokens, .env files) from being committed. Auto-installs for your entire team.

Downloads

312

Readme

leak-proof 🛡️

npm version License: MIT Maintenance

Stop accidental secret leaks before they leave your laptop.

Leak-Proof is a zero-config CLI that blocks you from committing .env files or hardcoded secrets (AWS keys, Tokens, Private Keys).


🚨 Security Notice

⚠️ CRITICAL UPDATE (v1.1.0): If you are using v1.0.x, upgrade immediately.

What was fixed:

  • [CRITICAL] Staging area bypass vulnerability - secrets in Git's index could be bypassed by modifying the working directory
  • [HIGH] Memory crash on large files (500MB+ SQL dumps, binaries)

How to upgrade:

npm install leak-proof@latest --save-dev

✨ Features

  • 🔒 Automatic Secret Detection - Instantly spots AWS keys, private keys, and generic secrets in staged files.
  • 👥 Team-Wide Protection - Auto-installs for every team member via npm install. No manual setup required.
  • 🎨 Beautiful CLI - Clear, colored output with actionable security alerts.
  • ⚡ Zero Config - Best-practice security defaults out of the box.
  • 🛡️ Smart Filtering - Intelligently ignores binary files, lock files, and safe assets.

🚀 For Users

Installation

Install leak-proof as a development dependency in your project:

npm install leak-proof --save-dev

Quick Start

  1. Initialize in your project:

    npx leak-proof init

    This sets up the necessary Git hooks and configuring your project for safety.

  2. Commit as usual:

    git add .
    git commit -m "feat: amazing new feature"
  3. That's it! If you accidentally stage a file with secrets (like .env or a hardcoded API key), leak-proof will block the commit and show you exactly what needs to be fixed.

How it Works

  1. You run npx leak-proof init.
  2. A prepare script is added to your package.json.
  3. When your teammates pull the code and run npm install, the hooks are automatically set up for them too.
  4. Everyone is protected effectively immediately. 🎉

💻 For Developers & Contributors

We welcome contributions! Whether you're fixing a bug, improving the docs, or adding a new secret pattern, here's how to get started.

Development Setup

  1. Clone the repository:

    git clone https://github.com/sayan365/leak-proof.git
    cd leak-proof
  2. Install dependencies:

    npm install
  3. Link locally: This allows you to test your local changes as if they were an installed global package.

    npm link

    Now you can run the leak-proof command anywhere in your terminal to test your changes.

  4. Verify your setup: Run the help command to see if your local version is active:

    leak-proof --help

🤝 Contributing

We love contributions! Here's how you can help make Leak-Proof better:

  1. Fork & Clone the repository.
  2. Create a Branch for your feature (git checkout -b feature/amazing-feature).
  3. Commit your changes (git commit -m 'feat: add amazing feature').
  4. Push to the branch (git push origin feature/amazing-feature).
  5. Open a Pull Request and describe your changes.

💡 Note: Validation is currently manual. Please run the scanner against dummy files to verify your changes before submitting.


🔍 Security Checks

File Patterns Blocked

  • .env
  • .env.local, .env.test, .env.production, etc.

Secrets Detected

  • AWS Access Keys: AKIA...
  • Private Keys: -----BEGIN PRIVATE KEY-----
  • Generic Secrets:
    • api_key = "..."
    • auth_token: "..."
    • client_secret = "..."

🚦 Bypassing Checks (False Positives)

Sometimes you need to commit a dummy key for testing purposes. You have two options:

Force Commit (Emergency)

If you need to bypass the entire hook for a specific commit:

git commit -m "fixing stuff" --no-verify

🗑️ Uninstalling

If you want to remove Leak-Proof from your project, run:

npx leak-proof remove

This cleans up the git hooks and removes the scripts from your package.json.


👨‍💻 Author

Built with ❤️ by Sayan.