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

secrets-scan-cli

v1.0.0

Published

Scan a project for accidentally committed secrets: API keys, tokens, passwords, private keys, and more

Readme

secrets-scan-cli

Scan any project directory for accidentally committed secrets, credentials, and API keys. Catches AWS keys, GitHub tokens, Stripe keys, Google API keys, private keys, JWTs, passwords, and more — all from your terminal, with zero configuration.

Install

npm install -g secrets-scan-cli

Usage

# Scan current directory
secrets-scan

# Scan a specific project
secrets-scan /path/to/project

# Show only high-severity findings
secrets-scan --severity high

# Output JSON (useful for CI/CD pipelines — exits 1 if secrets found)
secrets-scan --json

# Skip .env files (scan all other files)
secrets-scan --skip-env

# Combine flags
secrets-scan ./my-repo --severity high --json

What it detects

| Pattern | Severity | |---|---| | AWS Access Key (AKIA...) | HIGH | | GitHub Token (ghp_, github_pat_) | HIGH | | Stripe Live Key (sk_live_...) | HIGH | | Google API Key (AIza...) | HIGH | | SendGrid Key (SG....) | HIGH | | Mailgun Key (key-...) | HIGH | | Private Key headers (-----BEGIN ...) | HIGH | | Basic Auth in URLs (http://user:pass@) | HIGH | | npm Token (npm_...) | HIGH | | Firebase Key | HIGH | | Slack Token (xox...) | HIGH | | Generic secret=, token=, api_key= | MEDIUM | | Generic password= | MEDIUM | | Stripe Test Key (sk_test_...) | MEDIUM | | JWT tokens | MEDIUM | | Twilio SID/Token | MEDIUM | | UUID patterns | LOW |

Example output

Secrets scan of /home/user/my-project

[HIGH] src/config.js:14  AWS Access Key
       const key = "AKIAIOSFODNN7EXAMPLE";

[MEDIUM] .env.backup:3  Generic Secret
       api_key=abcdef1234567890abcdef1234567890

────────────────────────────────────────────────────────────
Found 2 potential secret(s): 1 high, 1 medium, 0 low
Review each finding and rotate any real credentials immediately.

CI/CD integration

secrets-scan exits with code 1 when secrets are found, 0 when clean. Use --json for machine-readable output:

# GitHub Actions example
- name: Scan for secrets
  run: npx secrets-scan-cli --severity high --json

What it skips

  • node_modules/, .git/, dist/, build/, vendor/
  • Binary files (images, archives, compiled binaries, fonts)
  • Files over 1MB
  • Lock files (package-lock.json, yarn.lock)

License

MIT