Fast, offline-first npm supply chain attack scanner. Single bash script, zero dependencies.
Checks your lockfiles, source files, and system for compromised packages, malware, and suspicious patterns.
npm supply chain attacks are increasing. Shoo detects, malware files, exfiltration endpoints, and suspicious install scripts.
| Attack | Packages | Impact |
|---|---|---|
| nx/Singularity | nx@20.9.0-21.8.0 | Millions of downloads |
| debug/chalk | debug@4.4.2, chalk@5.6.1 | Billions of downloads |
| DuckDB | duckdb@1.3.3, @duckdb/node-api@1.3.3 | Data exfiltration |
| Shai-Hulud | Malware files, workflow tampering | Targeted orgs |
- Fast — runs in milliseconds, single bash script, zero dependencies
- Works offline — no network required, fetches updates when available
- Context-aware — ignores test files and build artifacts, reduces false positives
- Beyond npm audit — checks VS Code extensions, shell configs, GitHub workflows
# Download
curl -sO https://raw.githubusercontent.com/jplansink/shoo/main/shoo
chmod +x shoo
# Or clone
git clone https://github.com/jplansink/shoo.git- Bash 4.0+
- Optional:
curlorwgetfor online malware database
$ ./shoo
Shoo 👻 .
Total: 2 (critical: 1, high: 1)
CRITICAL
✗ Compromised version: nx@21.5.0 (nx/Singularity) [CWE-506]
package-lock.json
https://cwe.mitre.org/data/definitions/506.html
→ Remove package, clean reinstall, rotate credentials
HIGH
✗ Suspicious postinstall script (curl/wget/eval) [CWE-94]
node_modules/sketchy-pkg/package.json
https://cwe.mitre.org/data/definitions/94.html
→ Review script contents before running npm install
./shoo # Scan current directory
./shoo ~/projects # Scan specific directory
./shoo --all # Scan directory + system
./shoo --system # Scan system only
./shoo -q # Quiet (exit code only)
./shoo --json # JSON output
./shoo --sarif # SARIF output (GitHub Security)
./shoo --offline # Skip online databasesExit codes: 0 clean, 1 critical, 2 high, 3 medium
| Location | What It Checks |
|---|---|
| Lockfiles | Compromised package versions |
| Source files | Malware patterns, exfiltration endpoints |
| package.json | Suspicious install scripts |
| GitHub workflows | Malicious actions, encoded payloads |
| VS Code extensions | Unicode malware |
| npm cache | Cached malware files |
| Shell configs | Tampering (.bashrc, .zshrc) |
Tip
Use --system to scan global packages and VS Code extensions without a project.
| Attack | Packages |
|---|---|
| nx/Singularity | nx@20.9.0-21.8.0 |
| debug/chalk | debug@4.4.2, chalk@5.6.1 + 16 more |
| DuckDB | duckdb@1.3.3, @duckdb/node-api@1.3.3 |
| Shai-Hulud 2.0 | posthog-js, @asyncapi/specs, @ensdomains/ensjs |
| XRP | xrpl@4.2.1-4.2.4, @2.14.2 |
| React Native Aria | 16 compromised packages |
Plus 1000+ packages from aikido.dev online database (cached 24h).
| Pattern | Examples |
|---|---|
| Malware files | setup_bun.js, bun_environment.js |
| Exfiltration endpoints | webhook.site, pastebin.com |
| Hardcoded secrets | AWS keys, GitHub/npm tokens, private keys |
| Obfuscated payloads | Base64 blobs, hex encoding, suspicious minification |
| Destructive code | rm -rf, recursive rmSync |
| Suspicious postinstall | curl/wget/eval in scripts |
| Unicode obfuscation | Hidden homoglyph characters |
| Malicious workflows | Encoded payloads, bad runners |
| Shell config tampering | .bashrc, .zshrc modifications |
| npm audit CVEs | Known vulnerabilities in dependencies |
| Targeted org typosquatting | @asyncapi, @posthog, @zapier |
package-lock.json · yarn.lock · pnpm-lock.yaml
- name: Security scan
run: |
curl -sO https://raw.githubusercontent.com/jplansink/shoo/main/shoo
chmod +x shoo
./shoo -q || exit 1- name: Security scan (SARIF)
run: |
curl -sO https://raw.githubusercontent.com/jplansink/shoo/main/shoo
chmod +x shoo
./shoo --sarif > results.sarif || true
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarifCreate .shooignore in your project:
test/fixtures/
malware-samples/
- Aikido.dev — Malware database
- OSV.dev — Google's open vulnerability database
- Socket.dev — Supply chain research
See CONTRIBUTING.md for guidelines on adding new detections.
See CHANGELOG.md for version history.
MIT