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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sealight

v0.1.4

Published

CLI tool to detect hardcoded secrets and sensitive data in codebases.

Readme

🔐 Sealight – Hardcoded Secret Scanner for Developers

NPM version License

Sealight is a fast, zero-config CLI tool that scans your codebase for hardcoded secrets and sensitive data — such as API keys, JWTs, AWS credentials, Base64 blobs, and more.

✅ Lightweight.
✅ ESM-compatible.
✅ Designed for CI, audits, and secure development practices.


📦 Installation

You can install sealight globally using:

npm install -g sealight

Or run it directly (if not published yet):

npx sealight ./your-folder

🧠 Requires Node.js v18+ and ESM-compatible project setup.


🚀 Usage

sealight <path-to-scan> [options]

Basic Example:

sealight ./src

With JSON Output:

sealight ./my-app --json report.json

🎯 What It Detects

Sealight uses built-in regex patterns to catch:

  • 🔑 Generic API Keys
  • 🔐 AWS Access Keys
  • 🧪 JWT Tokens
  • 🧬 Base64 Encoded Strings
  • 🔓 Common sensitive patterns in .env, .js, .ts, .json, .py, and more

🧩 Scalable Secret Matchers

Sealight loads its secret detection patterns from an external key-patterns.json file in the project root. This makes it easy to add or update patterns for new key types without changing the code.

To add a new matcher:

  1. Open key-patterns.json in your project root.
  2. Add a new object with a name and a regex string. Example:
    {
      "name": "My Service API Key",
      "regex": "myservice_[A-Za-z0-9]{32}"
    }
  3. Save the file and rerun Sealight.

All regexes are loaded dynamically at runtime. No code changes required!


📂 .sealightignore – Exclude Files or Folders

Create a .sealightignore file in your project root to exclude files or folders from being scanned.

Example:

# Ignore secrets in test fixtures
**/mocks/**
.env.local
src/secrets/sample.json
**/ignored.txt   # Use glob patterns relative to the scan root

Uses glob patterns. Patterns are relative to the scan root (the directory you pass to Sealight). For example, if you scan test-samples, use ignored.txt or **/ignored.txt to ignore a file in that folder.


📤 JSON Output (for CI/CD or Auditing)

Use the --json flag to export findings to a machine-readable .json file:

sealight ./backend --json findings.json

Output Format:

[
  {
    "file": "src/config/api.js",
    "line": 15,
    "type": "Generic API Key",
    "value": "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
  }
]

📄 Sample Output

🔍 Scanning: ./src

🔐 [API Key]  ./src/config.js:12
→ sk_test_4eC39HqLyjWDarjtT1zdp7dc

🔐 [JWT Token] ./auth/token.ts:8
→ eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

✅ Scan complete. Total findings: 2
📁 Findings exported to report.json

🤝 Contributing

Want to suggest a new pattern or contribute?

  1. Fork this repo
  2. Create a feature branch
  3. Submit a pull request with a clear description

📜 License

This project is licensed under the MIT License.


🔗 Author

Created by Shreeyash Jejurkar