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

secure-install

v1.0.3

Published

Secure npm package installer with risk analysis, dependency scanning, and vulnerability detection

Readme

secure-install 🛡️

Secure npm package installer with risk analysis, dependency scanning, and vulnerability detection.

Instead of scanning for vulnerabilities after installation (like npm audit), secure-install actively evaluates the risk of a package before installation, acting as a proactive firewall for your supply chain.

🚀 Features

  • Typosquatting Protection - Detects malicious misspelled packages (e.g., react-domm vs react-dom)
  • OSV Vulnerability Checks - Queries OSV.dev database for known CVEs before installation
  • Malicious Package Detection - Checks against npm security advisories database
  • Suspicious Script Detection - Analyzes preinstall/postinstall scripts for obfuscation, network calls, env exfiltration
  • Dependency Infiltration Check - Scans dependencies for suspicious patterns
  • License & Repository Verification - Validates package metadata
  • Rate Limiting & Caching - Fast API calls with intelligent caching

📦 Installation

Global Installation (Linux/macOS/Windows)

npm install -g secure-install

Local Installation (as dev dependency)

npm install --save-dev secure-install

Without Installing (using npx)

npx secure-install <package>

Note for Windows: If secure-install command is not found after global install, restart your terminal or use npx secure-install instead.

⚙️ Usage

Global Installation

secure-install lodash
secure-install axios

Using npx (no install needed)

npx secure-install lodash
npx secure-install axios express

Using locally installed package

npm install --save-dev secure-install
npx secure-install lodash
# Or run directly
./node_modules/.bin/secure-install lodash

Security Report Only (No Installation)

secure-install <package> --report
secure-install <package> -r

Multiple Packages

secure-install lodash axios express

CI/CD Mode

secure-install <package> --ci --json --dry-run

📋 Options

| Flag | Short | Description | |------|-------|-------------| | --safe | -s | Run in safe mode (--ignore-scripts) | | --force | -f | Force installation even on high risk | | --quick | -q | Quick install (--prefer-offline --legacy-peer-deps) | | --verbose | -v | Show verbose npm output | | --json | | Output results as JSON | | --quiet | -Q | Quiet mode (no prompts, minimal output) | | --report | -r | Generate HTML security report (no install) | | --dry-run | | Analyze package without installing | | --skip-deps | | Skip dependency scanning for faster analysis | | --ci | | CI/CD mode (quiet + no prompts) | | --output=<file> | -o | Custom report output path | | --threshold=<n> | | Set risk threshold (default: 70) | | --version | -V | Show version | | --help | -h | Show help message |

📊 Example Output

Security Report

🔒 secure-install: Analyzing axios...

📊 Security Report
Risk Score: 50/100

📋 Analysis Details:
 - ⚠️ Only 1 maintainer listed (lower bus factor)
 - 📄 License: MIT
 - 📦 Repository: https://github.com/axios/axios

📦 Package Info:
   Version: 1.15.0
   Maintainers: 1
   Dependencies: 3
   License: MIT
   Repo: https://github.com/axios/axios

HTML Report

Generates a styled HTML report when using --report:

secure-install axios --report
# Creates: security-report-axios-1234567890.html

CI/CD Mode (JSON)

secure-install lodash axios --ci --json --dry-run
[
  {
    "score": 0,
    "details": ["📄 License: MIT", "📦 Repository: git+github.com/lodash/lodash"],
    "metadata": { "name": "lodash", "version": "4.18.1", "maintainers": 3 }
  },
  {
    "score": 50,
    "details": ["⚠️ Only 1 maintainer listed", "📄 License: MIT"],
    "metadata": { "name": "axios", "version": "1.15.0", "maintainers": 1 }
  }
]

🎯 Risk Score Interpretation

| Score | Status | Action | |-------|--------|--------| | 0-39 | Safe | Proceeds automatically | | 40-69 | Medium Risk | Prompts for confirmation | | 70-100 | High Risk | Blocks installation (use --force to bypass) |

🔐 Security Checks

  1. Malicious Package Database - Checks npm security advisories
  2. Typosquatting Detection - Compares against popular packages
  3. Vulnerability Scan - Queries OSV.dev for CVEs
  4. Suspicious Scripts - Detects obfuscation, network calls, env exfiltration
  5. Dependency Analysis - Scans dependencies for risks
  6. Maintainer Check - Flags single-maintainer packages
  7. Package Age - Detects newly published packages with no maintainers
  8. License Verification - Validates package license

🔧 Configuration

Create a .secure-install.json config file in your project:

{
  "threshold": 70,
  "skipDeps": false
}

Config file locations (in order of priority):

  1. .secure-install.json
  2. secure-install.config.json
  3. .config/secure-install.json
  4. ~/.secure-install.json

📝 Examples

# With global installation
secure-install lodash

# With npx (no install needed)
npx secure-install lodash

# With local installation
npm install --save-dev secure-install
npm run secure-install lodash
# Or using npx in local project
npx secure-install lodash

# Install with safe mode
secure-install sketchy-package --safe

# Generate HTML report
secure-install express --report --output=security.html

# Quick scan (skip deps)
secure-install lodash --skip-deps --report

# CI/CD pipeline
secure-install package1 package2 --ci --json --dry-run

# Custom threshold
secure-install axios --threshold=50 --force

License

MIT