| Crates.io | npmls |
| lib.rs | npmls |
| version | 0.4.0 |
| created_at | 2025-09-09 17:37:12.222659+00 |
| updated_at | 2025-09-11 15:45:24.611298+00 |
| description | Fast cross-platform scanner for npm modules and malicious packages |
| homepage | https://github.com/h4x0r/npmls |
| repository | https://github.com/h4x0r/npmls |
| max_upload_size | |
| id | 1831316 |
| size | 218,167 |
A fast, cross-platform Rust application that scans your entire system for npm modules and detects known malicious packages from recent supply chain attacks.
Author: Albert Hui albert@securityronin.com
locate database for instant lookupsmdfind) for fast filesystem queriesfd algorithm)# Install directly from crates.io
cargo install npmls
# The binary will be available in ~/.cargo/bin/npmls
# Make sure ~/.cargo/bin is in your PATH
# Clone the repository
git clone https://github.com/yourusername/npmls.git
cd npmls
# Build the application
cargo build --release
# The binary will be available at target/release/npmls
Pre-built binaries are available for Windows on the GitHub Releases page.
For Linux users: We recommend installing via cargo install npmls for the best experience.
# Scan entire system - automatically downloads/updates database as needed
npmls
# Show only malicious packages
npmls --threats-only
# Verbose output with progress (shows download progress on first run)
npmls --verbose
# Force database update (optional - normally automatic)
npmls --update-db
# Offline mode - skip all downloads, use built-in database only
npmls --offline
# JSON output
npmls --format json
# CSV output
npmls --format csv --output scan_results.csv
# Table output (default)
npmls --format table
# List all known threats
npmls --list-threats
USAGE:
npmls [OPTIONS]
OPTIONS:
-o, --output <FILE> Output results to file (CSV format by default)
--format <FORMAT> Output format: table (console), json, csv [default: table]
-t, --threats-only Only show packages matching known malicious versions
-v, --verbose Verbose output with detailed scan progress
--offline Offline mode - only use built-in threat database
--update-db Update vulnerability database from online sources and exit
--list-threats List all known vulnerable packages and versions, then exit
-h, --help Print help
-V, --version Print version
🔍 NPM Security Scanner v0.1.0
Scanning for npm modules and malicious packages...
🍎 Using macOS Spotlight (mdfind) for fast scanning...
✅ Found 234 node_modules directories
📦 Analyzing 234 node_modules directories...
📦 NPM Package Security Scan Results
────────────────────────────────────────────────────────────────────────────────
Package Name Version Status Threat Level Location
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
chalk 5.6.1 🚨 MALICIOUS 🔴 Critical /Users/dev/project/node_modules/chalk
debug 4.4.2 🚨 MALICIOUS 🔴 Critical /Users/dev/project/node_modules/debug
express 4.18.2 ✅ Clean ─ /Users/dev/project/node_modules/express
react 18.2.0 ✅ Clean ─ /Users/dev/project/node_modules/react
────────────────────────────────────────────────────────────────────────────────
📊 Summary: 1,234 total packages, 2 malicious
🚨 SECURITY ALERT - MALICIOUS PACKAGES DETECTED
═══════════════════════════════════════════════════════════════
📦 Package: chalk@5.6.1
📍 Location: /Users/dev/project/node_modules/chalk
⚡ Threat Type: SupplyChainAttack
🔥 Severity: CRITICAL
📝 Description: Compromised in September 2025 Qix phishing attack. Contains crypto wallet hijacking malware...
package.json files to extract name/version infoThe application automatically downloads and maintains vulnerability data from multiple authoritative sources:
GitHub Advisory Database: Official GitHub security advisories for npm packages
npm Security Advisories: Official npm security team findings
--update-db flag to force immediate update--offline to rely on built-in database onlyAlbert Hui
Email: albert@securityronin.com
LinkedIn: https://www.linkedin.com/in/alberthui
Security Researcher & Developer
This tool is for defensive security purposes only. It helps identify potentially compromised npm packages on your system. Always verify findings and update to secure package versions.
MIT License - see LICENSE file for details.