Package Exports
- supply-scan
- supply-scan/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (supply-scan) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
supply-scan
Universal npm supply chain attack scanner. Detects compromised packages from 12 known attacks spanning 2018-2026. Zero runtime dependencies.
npx supply-scanWhat It Detects
| Attack | Date | Severity | Type |
|---|---|---|---|
| Axios (plain-crypto-js) | 2026-03 | Critical | RAT (North Korea) |
| GlassWorm (invisible Unicode) | 2026-03 | Critical | Stealer via Solana C2 |
| Shai-Hulud 2.0 (npm worm) | 2025-11 | Critical | Self-replicating worm |
| Chalk/Debug (18 packages) | 2025-09 | Critical | Crypto wallet stealer |
| @solana/web3.js | 2024-12 | Critical | Private key stealer |
| Lottie Player | 2024-10 | High | Wallet drainer |
| node-ipc (peacenotwar) | 2022-03 | Critical | Geotargeted file wiper |
| colors/faker | 2022-01 | Medium | Sabotage / infinite loop |
| coa/rc (Danabot) | 2021-11 | Critical | Password stealer |
| ua-parser-js | 2021-10 | Critical | Cryptominer + stealer |
| event-stream (flatmap-stream) | 2018-11 | High | Bitcoin wallet stealer |
| eslint-scope | 2018-07 | High | npm token stealer |
5 Check Categories
- Compromised Packages — Scans
node_modulesand lockfiles for known bad versions - Malware Files — Checks for RAT payloads, droppers, and artifacts on disk
- Network Connections — Detects active connections to C2 servers
- Suspicious Processes — Identifies running malware and persistence mechanisms
- NPM Cache — Scans npm cache for malicious packages
Usage
Interactive Mode (default)
npx supply-scanPrompts you to select which attacks to scan for and which directories to scan.
Scan All Attacks
npx supply-scan --allScan Specific Attacks
npx supply-scan --rule axios-2026
npx supply-scan --rule axios-2026 --rule chalk-debug-2025Scan Specific Directory
npx supply-scan --path ~/projects/my-appCI Mode
npx supply-scan --ciNon-interactive, outputs "OK" on clean scan. Exit codes:
0— All clear1— Compromise detected2— Warnings found
List Available Rules
npx supply-scan --listAdding New Rules
Each attack is defined as a JSON file in the rules/ directory. To add a new attack, create a new .json file:
{
"id": "my-attack-2026",
"name": "My Attack Name",
"date": "2026-01-01",
"severity": "critical",
"description": "Description of the attack",
"references": ["https://example.com/advisory"],
"packages": {
"compromised": {
"package-name": ["1.0.0", "1.0.1"]
},
"malicious": {
"evil-package": ["0.1.0"]
}
},
"ioc": {
"files": {
"darwin": ["/path/to/malware"],
"linux": ["/tmp/malware"],
"win32": ["%TEMP%\\malware.exe"]
},
"domains": ["evil-c2.com"],
"ips": ["1.2.3.4"],
"ports": [8080],
"processes": ["malware-process"],
"strings": ["suspicious-string"]
}
}No code changes needed — the scanner automatically picks up new rule files.
Architecture
supply-scan/
├── bin/supply-scan.js # CLI entry point
├── src/ # TypeScript source
│ ├── index.ts # Main orchestrator + CLI
│ ├── scanner.ts # Scan engine
│ ├── ui.ts # Terminal UI (zero deps)
│ ├── utils.ts # Utilities
│ ├── types.ts # TypeScript interfaces
│ └── checks/
│ ├── packages.ts # Package/lockfile scanner
│ ├── files.ts # Malware file detector
│ ├── network.ts # C2 connection checker
│ ├── processes.ts # Process scanner
│ └── cache.ts # npm cache scanner
├── rules/ # Attack definitions (JSON)
└── dist/ # Compiled JavaScriptZero runtime dependencies. This is a security scanner — we don't depend on packages that could themselves be compromised.
Contributing
- Fork the repository
- Add a new rule JSON file in
rules/ - Submit a pull request with a reference link to the attack advisory
License
MIT