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

npm-sentinel

v2.1.0

Published

A CLI tool to detect supply chain attacks in npm packages by analyzing lifecycle scripts and registry metadata.

Readme

npm-sentinel

npm version License Security

npm-sentinel is an advanced, professional-grade security tool designed to protect your development environment from sophisticated supply chain attacks. By analyzing package.json lifecycle scripts, scanning for known malware signatures (like Shai Hulud 2.0), and cross-referencing with the npm registry, it acts as a robust early warning system.

"In a world of compromised packages, be the sentinel."

Features

  • Deep Heuristics: Detects not just patterns, but extracts and analyzes Base64 obfuscated payloads to find hidden threats.
  • Malware Signatures: Specific detection for known threats like Shai Hulud 2.0 (setup_bun.js, bun_environment.js).
  • Beautiful UI: Interactive CLI with spinners, clean tables, and color-coded severity reports.
  • Robust Validation: Built with Zod schemas to handle malformed packages gracefully.
  • Lifecycle Script Analysis: Scans preinstall, install, postinstall for dangerous commands.
  • Registry Metadata Check: Identifies potential typosquatting by alerting on recently created packages (< 7 days old).

Installation

npm install -g npm-sentinel
# OR run directly
npx npm-sentinel

Usage

Basic Scan

Analyze the current directory for threats.

npm-sentinel

Targeted Scan

Analyze a specific package directory.

npm-sentinel --path /path/to/suspicious-package

Verbose Mode

See detailed logs of what is being checked.

npm-sentinel --verbose

How It Works

  1. Parse: Reads package.json and strict-validates it.
  2. Analyze Scripts: Checks scripts for regex patterns (e.g., curl|bash, netcat) and recursively decodes Base64 strings to find hidden commands.
  3. Scan Files: Checks the directory for known malicious filenames.
  4. Verify Registry: Fetches metadata from npm to warn about suspicious package age or maintenance status.
  5. Report: Displays a beautiful summary table of findings.

Example Output

📦 Package: my-app v1.0.0
📅 Registry: Created 365 days ago

⚠️  Found 1 potential issues:
┌──────────┬───────────────────┬────────────────────────────────────────────────────────┐
│ Severity │ Location          │ Description                                            │
├──────────┼───────────────────┼────────────────────────────────────────────────────────┤
│ CRITICAL │ scripts.install   │ Obfuscated (Base64) payload detected: "curl evil.com..."         │
└──────────┴───────────────────┴────────────────────────────────────────────────────────┘

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Security

For security concerns, please refer to SECURITY.md.

License

MIT

Author

Godfrey Lebo - GitHub