Detect obfuscated malware in npm supply chains
npm supply-chain scanner catching obfuscated payloads, credential stealers, eBPF rootkits, and AI-key attacks that npm audit misses.
Why it matters
Scan npm packages and dependencies for advanced supply chain attacks that traditional tools miss-obfuscated payloads, credential stealers, conditional triggers, sandbox evasion, worm propagation, and campaign-specific signatures from real-world incidents like Megalodon, Mini Shai-Hulud, TrapDoor, and node-ipc compromise.
Outcomes
What it gets done
Identify obfuscated preinstall hooks and eval chains using AST-level heuristic analysis
Detect conditional triggers that activate only in CI/CD or production environments
Catch typosquatting, HuggingFace org impersonation, and registry poisoning attempts
Export findings to SARIF, SBOM (CycloneDX/SPDX), SIEM formats, and compliance reports
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/lateos-ai-npm-scan | bash Capabilities
Tools your agent gets
Scans npm packages for supply chain attacks, obfuscation, malware, and campaign indicators
Analyzes package-lock.json, yarn.lock, and pnpm-lock.yaml for malicious dependencies
Detects VS Code extension supply chain attacks and malicious marketplace packages
Overview
Npm Scan
Supply-chain security scanner for npm packages that detects behavioral attacks - obfuscated payloads, credential stealers, eBPF kernel rootkits, memory-level token extraction, GitHub author spoofing, and AI-platform-targeted attacks - that CVE-based tools like npm audit and Snyk miss. Use it to scan a package or an entire lockfile for supply-chain attacks before installing or shipping it, or as a CI/CD gate that fails a build on critical findings. It runs locally with no telemetry, in under 30 seconds per run.
What it does
npm-scan is a supply-chain threat detector for npm packages that catches behavioral attack patterns traditional tools miss - CVE-database scanners like npm audit only check known-vulnerability databases, and dependency-version scanners like Snyk don't analyze behavior. It runs 23 detectors (D1-D25) covering obfuscated payloads, credential stealers, eBPF kernel rootkits, memory-level credential/token extraction (including OIDC tokens), GitHub author spoofing, worm-like auto-republishing propagation, and attacks specifically targeting AI platform API keys (Claude, OpenAI, Cursor, Mistral).
When to use - and when NOT to
Use it to scan a specific package with known or suspected issues, or an entire project lockfile, before installing dependencies or shipping a release, and as an automated gate in CI/CD that fails a build on critical findings. It's meant to complement, not replace, CVE-based scanning - the project's own positioning is npm-scan plus npm audit for complete coverage, since each catches different attack classes. It runs entirely locally with no telemetry or cloud dependency, completing a scan in under 30 seconds, which makes it suitable for routine CI/CD runs rather than only occasional manual audits.
Capabilities
npm-scan <package> scans a single package (e.g. npm-scan axios); npm-scan scan-lockfile scans an entire project's lockfile; --json exports findings for programmatic use; --fail-on critical gates a CI run on severity. Detection categories documented with confidence figures include credential theft (env var harvesting, token exfiltration, 98%), kernel attacks (eBPF rootkits, privilege escalation, ~95%), code evasion (obfuscation, self-defending/anti-debug code, ~95%), memory extraction (OIDC/AI key access, ~95%), GitHub attacks (author spoofing, force-push hijacking, ~99%), and worm propagation via stolen credentials (95%). The project reports validation against real campaigns (IronWorm, Miasma, Dependency Confusion) and policy-as-code support via YAML allowlists and severity overrides.
How to install
Install globally with npm install -g @lateos/npm-scan, or run ad hoc via npx @lateos/npm-scan scan axios. It integrates into GitHub Actions, GitLab CI, Jenkins, or any CI/CD platform, and outputs SBOM/SARIF in CycloneDX, SPDX, and GitHub Security formats, with multi-arch Docker images also available. Licensing is dual: free under MIT for individuals, open-source projects, and teams evaluating pre-production; a paid BLA license (from $799/year for small teams to $9,900/year for enterprise) is required once shipping commercially to production.
Who it's for
Security and platform teams who want CI/CD-integrated protection against behavioral supply-chain attacks in npm dependencies - especially teams handling AI platform credentials or shipping to production, where a compromised package carries real breach and compliance liability that CVE-only scanning won't catch.
Source README
npm-scan
Supply chain threat detection that catches what npm audit, Snyk, and Socket miss.
Detects obfuscated payloads, credential stealers, kernel rootkits, eBPF hooks, memory extraction, GitHub spoofing, and AI-targeted attacks.
Why npm-scan?
Traditional tools are outdated. npm audit checks CVE databases. Snyk scans dependency versions. Neither catches behavioral patterns.
The 2026 wave of attacks:
- eBPF kernel rootkits (invisible to monitoring)
- Memory-level credential extraction (OIDC tokens)
- Self-defending code (anti-debugging, anti-tampering)
- GitHub author spoofing ("claude@users.noreply.github.com")
- AI platform targeting (Claude, OpenAI, Cursor, Mistral keys)
- Worm-like propagation (auto-republish with stolen tokens)
npm-scan detects all of these. 95%+ confidence on real campaigns.
Coverage: npm-scan vs Industry Tools
| Attack Vector | npm-scan | npm audit | Snyk | Socket | Sonatype |
|---|---|---|---|---|---|
| Miasma/Hades (binding.gyp) | ✅ 95% | ❌ 0% | ❌ 0% | ⚠️ 40% | ❌ 0% |
| eBPF Kernel Rootkit | ✅ 95% | ❌ 0% | ❌ 0% | ❌ 0% | ❌ 0% |
| AI Token Targeting | ✅ 98% | ❌ 0% | ❌ 0% | ❌ 0% | ❌ 0% |
| GitHub Author Spoofing | ✅ 99% | ❌ 0% | ❌ 0% | ❌ 0% | ❌ 0% |
| Memory Credential Extraction | ✅ 95% | ❌ 0% | ❌ 0% | ⚠️ 20% | ❌ 0% |
| Self-Defending Code | ✅ 95% | ❌ 0% | ⚠️ 25% | ⚠️ 45% | ❌ 0% |
| Module-Load Execution | ✅ 95% | ❌ 0% | ❌ 0% | ⚠️ 50% | ❌ 0% |
| Known CVEs | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Legend: ✅ = 85%+ detection | ⚠️ = 15-80% detection | ❌ = 0% detection
Risk Reduction & Compliance
Single tool approach = Blind spot = Expensive liability
A compromised npm package costs your company:
- Data breach: $4.5M average (IBM, 2024)
- Regulatory fines: SOC 2 violations ($100K+), GDPR ($10M+), compliance audits
- Downtime: $5K-$50K per hour in lost revenue
- Reputation: Brand damage, customer trust erosion
- Legal: Lawsuits from affected customers, liability claims
Traditional tool alone misses behavioral attacks. If npm audit + Snyk see nothing, but attackers steal your AWS credentials via a behavioral pattern, you're liable.
npm-scan + npm audit = Complete coverage = Risk reduction
By catching the 95%+ of attacks that traditional tools miss, you reduce:
- ✅ Breach probability (behavioral detection catches attacks before damage)
- ✅ Compliance violation risk (due diligence: you used multiple detection methods)
- ✅ Financial liability (auditors will ask: "How did you verify supply chain security?")
- ✅ Customer impact (faster detection = faster remediation = fewer affected customers)
Cost-benefit: npm-scan ($2.4K/year enterprise) vs. data breach ($4.5M average). ROI: 1,875x.
What It Detects
| Category | Examples | Detection |
|---|---|---|
| Credential Theft | Env var harvesting, token exfiltration | 98% |
| Kernel Attacks | eBPF rootkits, privilege escalation | 95% |
| Code Evasion | Obfuscation, self-defending code, anti-debug | 95% |
| Memory Extraction | OIDC token access, AI key targeting | 95% |
| GitHub Attacks | Author spoofing, force-push hijacking | 99% |
| Worm Propagation | Auto-republish via stolen credentials | 95% |
Quick Start
# Install
npm install -g @lateos/npm-scan
# Scan a package with known vulnerabilities
npm-scan axios
# Scan your lockfile
npm-scan scan-lockfile
# Export findings to JSON
npm-scan express --json > findings.json
Key Features
- ✅ 23 detectors (D1-D25) covering supply chain attack vectors
- ✅ Real campaign validation (IronWorm, Miasma, Dependency Confusion)
- ✅ Runs locally - no telemetry, no cloud dependency
- ✅ Fast - <30 seconds per CI/CD run
- ✅ Policy-as-code - YAML allowlists, severity overrides
- ✅ SBOM + SARIF - CycloneDX, SPDX, GitHub Security
- ✅ GitHub Action - One-liner CI/CD integration
- ✅ Docker - Multi-arch images
Learn more: lateos.ai/npm-scan
CI/CD Integration
# GitHub Actions example
- name: Scan with npm-scan
run: |
npm install -g @lateos/npm-scan
npm-scan scan-lockfile --fail-on critical
Works with GitHub Actions, GitLab CI, Jenkins, or any CI/CD platform.
Licensing
Free (MIT): Individuals, open-source projects, and teams evaluating for production - no time limit.
Paid (BLA): Required when your team ships to production commercially.
Evaluate freely. Purchase when you're ready to ship.
See LICENSING.md for details.
Commercial use? See licensing tiers - $799/yr (small team) to $9,900/yr (enterprise). Volume discounts available.
More
Scan your first package:
npx @lateos/npm-scan scan axios
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.