@lateos/npm-scan 0.7.5 β 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +20 -0
- package/README.md +342 -81
- package/backend/pdf.js +245 -0
- package/backend/policy.js +111 -0
- package/backend/report.js +45 -0
- package/cli/cli.js +58 -4
- package/lateos-npm-scan-0.8.0.tgz +0 -0
- package/package.json +5 -3
- package/.github/workflows/ci.yml +0 -1
- package/.github/workflows/scan.yml +0 -1
- package/AGENTS.md +0 -1
- package/CONTRIBUTING.md +0 -1
- package/api/README.md +0 -80
- package/api/__init__.py +0 -0
- package/api/api_keys.py +0 -55
- package/api/deps.py +0 -164
- package/api/main.py +0 -44
- package/api/requirements.txt +0 -9
- package/api/routers/__init__.py +0 -0
- package/api/routers/auth.py +0 -80
- package/api/routers/health.py +0 -10
- package/api/routers/scans.py +0 -66
- package/api/routers/sso.py +0 -385
- package/api/routers/webhooks.py +0 -78
- package/api/saml-config.yaml +0 -58
- package/api/saml.py +0 -184
- package/backend/db/pg-schema.sql +0 -155
- package/backend/detectors.test.js +0 -88
- package/docker/Dockerfile.cli +0 -1
- package/docker/docker-compose.yml +0 -1
- package/docs/attack-taxonomy.md +0 -53
- package/docs/project-plan.md +0 -372
- package/docs/sandbox-threat-model.md +0 -91
- package/tests/corpus/run.js +0 -93
package/.dockerignore
ADDED
package/README.md
CHANGED
|
@@ -1,122 +1,383 @@
|
|
|
1
|
-
# npm-scan
|
|
1
|
+
# @lateos/npm-scan
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@lateos/npm-scan)
|
|
4
|
+
[](LICENSING.md)
|
|
5
|
+
[](package.json)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Modern supply chain security for the npm ecosystem.**
|
|
8
|
+
Static + behavioral analysis that catches what npm audit, Snyk, and Socket miss β obfuscated payloads, credential stealers, conditional triggers, sandbox evasion, and worm-like propagation.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## π The Problem
|
|
13
|
+
|
|
14
|
+
The 2025β2026 wave of npm supply chain attacks proved that traditional tooling is no longer enough.
|
|
15
|
+
|
|
16
|
+
Attackers have moved past simple typosquatting. They now ship **obfuscated preinstall hooks**, **credential harvesters hidden behind environment detection**, **dormant backdoors with time-based activation**, and **worm-style transitive propagation** that spreads through peer dependencies.
|
|
17
|
+
|
|
18
|
+
**npm audit** checks known CVEs. **Snyk** scans for vulnerabilities. **Socket** looks at package behavior. None of them were designed for the generation of attacks that emerged in 2025 β attacks that look benign until they reach production.
|
|
19
|
+
|
|
20
|
+
**@lateos/npm-scan** was built for this moment.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## π¬ Why @lateos/npm-scan?
|
|
25
|
+
|
|
26
|
+
| Capability | npm audit | Snyk | Socket | **@lateos/npm-scan** |
|
|
27
|
+
|---|---|---|---|---|
|
|
28
|
+
| Known CVE matching | β
| β
| β | β
|
|
|
29
|
+
| Static analysis | β | β
| β
| β
|
|
|
30
|
+
| Obfuscated payload detection | β | β | β | β
|
|
|
31
|
+
| Behavioral / heuristic analysis | β | β | Partial | β
|
|
|
32
|
+
| Conditional trigger detection (ATK-009) | β | β | β | β
|
|
|
33
|
+
| Sandbox evasion detection (ATK-010) | β | β | β | β
|
|
|
34
|
+
| Transitive worm propagation (ATK-011) | β | β | β | β
|
|
|
35
|
+
| Attack taxonomy (ATK series) | β | β | β | β
|
|
|
36
|
+
| SBOM output (CycloneDX + SPDX) | β | β
| β | β
|
|
|
37
|
+
| NIST 800-161 compliance reporting | β | β | β | β
|
|
|
38
|
+
| EU CRA compliance reporting | β | β | β | β
|
|
|
39
|
+
| SIEM export (CEF / ECS / Sentinel / QRadar) | β | β | β | β
|
|
|
40
|
+
| Runs entirely locally β no telemetry | β
| β | β | β
|
|
|
41
|
+
| Policy-as-code (YAML allowlists) | β | β | β | β
|
|
|
42
|
+
|
|
43
|
+
> **Privacy first.** All scanning happens on your machine. No code leaves your environment. No telemetry. No cloud dependency.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## β¨ Key Features
|
|
48
|
+
|
|
49
|
+
| Icon | Feature | Description |
|
|
50
|
+
|------|---------|-------------|
|
|
51
|
+
| π΅οΈ | **Heuristic static analysis** | AST-level inspection catches obfuscation, eval chains, env probing, and suspicious lifecycle scripts that regex-based tools miss |
|
|
52
|
+
| π§ | **Behavioral detection** | Identifies conditional triggers (time-based, CI-aware), sandbox evasion, and dormant activation patterns |
|
|
53
|
+
| 𧬠| **ATK attack taxonomy** | 11 classified attack types with NIST 800-161 mappings β versioned, documented, and PR-able |
|
|
54
|
+
| π¦ | **SBOM generation** | CycloneDX 1.5 and SPDX 2.3 with findings embedded as vulnerabilities |
|
|
55
|
+
| π§Ύ | **Compliance reporting** | NIST SP 800-161 traceability matrix + EU Cyber Resilience Act mapping (free tier) |
|
|
56
|
+
| π | **SIEM export** | Splunk CEF, Elastic ECS, Microsoft Sentinel, IBM QRadar formats (premium) |
|
|
57
|
+
| π | **Policy-as-code** | YAML/JSON policy engine with allowlists, severity overrides, suppressions, and fail-on thresholds |
|
|
58
|
+
| π³ | **Docker + GitHub Action** | Multi-arch images, one-command Compose pipeline, PR scan action |
|
|
59
|
+
| π‘οΈ | **Zero telemetry** | No data leaves your machine. No cloud. No callbacks. |
|
|
60
|
+
| πΎ | **Local scan history** | SQLite-backed persistence, zero external dependencies |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## β‘ Quick Start
|
|
6
65
|
|
|
7
66
|
```bash
|
|
67
|
+
# Install globally
|
|
8
68
|
npm install -g @lateos/npm-scan
|
|
69
|
+
|
|
70
|
+
# Scan a single package
|
|
9
71
|
npm-scan scan lodash
|
|
72
|
+
|
|
73
|
+
# Scan your lockfile
|
|
74
|
+
npm-scan scan-lockfile
|
|
75
|
+
|
|
76
|
+
# View latest scans
|
|
77
|
+
npm-scan report
|
|
10
78
|
```
|
|
11
79
|
|
|
12
|
-
|
|
80
|
+
**No install? No problem:**
|
|
13
81
|
|
|
14
82
|
```bash
|
|
15
|
-
npx @lateos/npm-scan scan
|
|
83
|
+
npx @lateos/npm-scan scan commander
|
|
16
84
|
```
|
|
17
85
|
|
|
18
|
-
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## π Usage Examples
|
|
89
|
+
|
|
90
|
+
### Scan a single package
|
|
19
91
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
- **EU CRA Compliance** β report maps findings to Cyber Resilience Act articles and Annex I requirements
|
|
24
|
-
- **SIEM Export** β Splunk CEF, Elastic ECS, Microsoft Sentinel, IBM QRadar formats (premium)
|
|
25
|
-
- **EU CRA Compliance** β report maps findings to Cyber Resilience Act articles (premium)
|
|
26
|
-
- **License Key Gating** β premium features locked behind signed license keys
|
|
27
|
-
- **REST API** β FastAPI-based API with webhooks, auth, scan management (premium)
|
|
28
|
-
- **SAML SSO** β enterprise single sign-on via Okta, Azure AD, OneLogin, Keycloak (enterprise)
|
|
29
|
-
- **Kubernetes / Helm** β Helm chart for deploying the full pipeline on K8s (premium)
|
|
30
|
-
- **SQLite Storage** β local scan history, zero external dependencies
|
|
31
|
-
- **CLI** β `scan`, `scan-lockfile`, `report --sbom --html --nist --cra --siem`
|
|
32
|
-
- **Dynamic Sandbox** β gVisor-based isolation (premium, documented in `docs/sandbox-threat-model.md`)
|
|
33
|
-
- **GitHub Action** β scans lockfile on PRs
|
|
34
|
-
- **Docker** β multi-arch images via GHCR
|
|
92
|
+
```bash
|
|
93
|
+
# Default JSON output with all findings
|
|
94
|
+
npm-scan scan axios
|
|
35
95
|
|
|
36
|
-
|
|
96
|
+
# Generate an SBOM alongside the scan
|
|
97
|
+
npm-scan scan express --sbom # CycloneDX JSON
|
|
98
|
+
npm-scan scan express --sbom xml # CycloneDX XML
|
|
99
|
+
npm-scan scan express --sbom spdx # SPDX 2.3
|
|
37
100
|
|
|
101
|
+
# Apply a YAML policy
|
|
102
|
+
npm-scan scan some-package --policy .npm-scan.yml
|
|
38
103
|
```
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
npm-scan
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
npm-scan
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
npm-scan report
|
|
104
|
+
|
|
105
|
+
### Scan a lockfile
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Scan the current project's dependencies
|
|
109
|
+
npm-scan scan-lockfile
|
|
110
|
+
|
|
111
|
+
# Scan a specific lockfile
|
|
112
|
+
npm-scan scan-lockfile -f ./path/to/package-lock.json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Generate reports
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# List all recent scans
|
|
119
|
+
npm-scan report
|
|
120
|
+
|
|
121
|
+
# View a specific scan
|
|
122
|
+
npm-scan report -i 42
|
|
123
|
+
|
|
124
|
+
# Generate an HTML report (free) with full findings + NIST table
|
|
125
|
+
npm-scan report -i 42 --html
|
|
126
|
+
|
|
127
|
+
# Print NIST 800-161 compliance table
|
|
128
|
+
npm-scan report -i 42 --nist
|
|
129
|
+
|
|
130
|
+
# Print EU CRA compliance table
|
|
131
|
+
npm-scan report --cra
|
|
132
|
+
|
|
133
|
+
# Text report (free)
|
|
134
|
+
npm-scan report --text
|
|
135
|
+
|
|
136
|
+
# PDF report (premium)
|
|
137
|
+
npm-scan report --pdf --license-key <key>
|
|
138
|
+
|
|
139
|
+
# SIEM export (premium)
|
|
140
|
+
npm-scan report --siem cef # Splunk CEF
|
|
141
|
+
npm-scan report --siem ecs # Elastic ECS
|
|
142
|
+
npm-scan report --siem sentinel # Microsoft Sentinel
|
|
143
|
+
npm-scan report --siem qradar # IBM QRadar
|
|
144
|
+
|
|
145
|
+
# Combine all scans into a single report
|
|
146
|
+
npm-scan report --html # all scans
|
|
147
|
+
npm-scan report --pdf # all scans (premium)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 𧬠Detection Capabilities (ATK Taxonomy)
|
|
153
|
+
|
|
154
|
+
| ID | Attack Class | Detection Method | Severity | NIST 800-161 |
|
|
155
|
+
|---|---|---|---|---|
|
|
156
|
+
| **ATK-001** | Malicious lifecycle scripts (`preinstall`, `postinstall`, `install`) | Static | π΄ high | SR-3.1 |
|
|
157
|
+
| **ATK-002** | Obfuscated payload delivery (hex, base64, eval chains) | Static | π medium | SR-4.2 |
|
|
158
|
+
| **ATK-003** | Credential harvesting (env vars, .npmrc, SSH keys) | Static + Dynamic | π΄ high | SR-5.3 |
|
|
159
|
+
| **ATK-004** | Persistence via editor/config dirs (.vscode, .claude, .cursor) | Static | π΄ high | SR-6.4 |
|
|
160
|
+
| **ATK-005** | Network exfiltration (GitHub API, DNS tunneling, HTTP C2) | Static + Dynamic | β« critical | SR-7.5 |
|
|
161
|
+
| **ATK-006** | Dependency confusion / namespace squatting | Static (lockfile) | π medium | SR-2.2 |
|
|
162
|
+
| **ATK-007** | Typosquatting (edit-distance matching) | Static | π’ low | SR-2.1 |
|
|
163
|
+
| **ATK-008** | Tarball tampering (published β source) | Static | π΄ high | SR-8.1 |
|
|
164
|
+
| **ATK-009** | Conditional/dormant triggers (CI detection, time-based) | Behavioral | π΄ high | SR-9.2 |
|
|
165
|
+
| **ATK-010** | Sandbox evasion / anti-analysis | Behavioral | π medium | SR-10.3 |
|
|
166
|
+
| **ATK-011** | Transitive propagation (worm-style lateral spread) | Behavioral | π΄ high | SR-11.4 |
|
|
167
|
+
|
|
168
|
+
> **How evasive attacks are caught:** ATK-009 detects packages that check `process.env.CI`, probe hostnames, or use time-based activation. ATK-010 flags `debugger` statements, `os.hostname()` probes, and env fingerprinting. ATK-011 traces peer dependency graphs to detect worm-like propagation patterns.
|
|
169
|
+
> See [`docs/attack-taxonomy.md`](docs/attack-taxonomy.md) for full evasion surface documentation and PoC examples.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## π Output & Reports
|
|
174
|
+
|
|
175
|
+
### Formats
|
|
176
|
+
|
|
177
|
+
| Format | Availability | Description |
|
|
178
|
+
|--------|-------------|-------------|
|
|
179
|
+
| JSON | β
Free | Structured machine-readable findings |
|
|
180
|
+
| HTML | β
Free | Rich HTML report with NIST compliance table, severity badges, control matrix |
|
|
181
|
+
| Text | β
Free | Clean terminal-friendly text report |
|
|
182
|
+
| CycloneDX SBOM | β
Free | Industry-standard SBOM with findings as vulnerabilities |
|
|
183
|
+
| SPDX SBOM | β
Free | SPDX 2.3 document format |
|
|
184
|
+
| NIST 800-161 | β
Free | Control traceability matrix (SR-2.1 β SR-11.4) |
|
|
185
|
+
| EU CRA | β
Free | Cyber Resilience Act article mapping |
|
|
186
|
+
| PDF | π Premium | Multi-page PDF with title page, findings table, NIST compliance matrix |
|
|
187
|
+
| Splunk CEF | π Premium | Common Event Format for Splunk ingestion |
|
|
188
|
+
| Elastic ECS | π Premium | Elastic Common Schema format |
|
|
189
|
+
| Microsoft Sentinel | π Premium | Sentinel-ready formatted output |
|
|
190
|
+
| IBM QRadar | π Premium | QRadar DSM-ready format with QID mappings |
|
|
191
|
+
|
|
192
|
+
### Sample output
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"scanId": 1,
|
|
197
|
+
"findings": [
|
|
198
|
+
{
|
|
199
|
+
"id": "ATK-003",
|
|
200
|
+
"severity": "high",
|
|
201
|
+
"title": "Credential harvesting",
|
|
202
|
+
"evidence": "process.env.NPM_TOKEN detected in postinstall.js:17"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
55
206
|
```
|
|
56
207
|
|
|
57
|
-
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## βοΈ Configuration & Advanced Usage
|
|
211
|
+
|
|
212
|
+
### Policy-as-code
|
|
213
|
+
|
|
214
|
+
Define allowlists, severity overrides, suppressions, and fail thresholds in a YAML file:
|
|
215
|
+
|
|
216
|
+
```yaml
|
|
217
|
+
# .npm-scan.yml
|
|
218
|
+
allowlist:
|
|
219
|
+
- lodash
|
|
220
|
+
- chalk
|
|
58
221
|
|
|
222
|
+
severity_overrides:
|
|
223
|
+
- id: ATK-001
|
|
224
|
+
severity: medium
|
|
225
|
+
|
|
226
|
+
suppress:
|
|
227
|
+
- atk_id: ATK-009
|
|
228
|
+
- package: some-package
|
|
229
|
+
|
|
230
|
+
fail_on: high
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npm-scan scan target --policy .npm-scan.yml
|
|
59
235
|
```
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
236
|
+
|
|
237
|
+
### Environment variables
|
|
238
|
+
|
|
239
|
+
| Variable | Description | Default |
|
|
240
|
+
|----------|-------------|---------|
|
|
241
|
+
| `NPM_SCAN_LICENSE_KEY` | Premium / enterprise license key | β |
|
|
242
|
+
| `NPM_SCAN_DATA_DIR` | Scan history directory | `./.npm-scan` |
|
|
243
|
+
| `NPM_SCAN_LOG_LEVEL` | Log verbosity | `info` |
|
|
244
|
+
|
|
245
|
+
### Premium licensing
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Generate a development key
|
|
249
|
+
node -e "console.log(require('@lateos/npm-scan/backend/license').generateKey('premium'))"
|
|
250
|
+
|
|
251
|
+
# Use it
|
|
252
|
+
npm-scan scan target --license-key <key>
|
|
253
|
+
npm-scan report --pdf --license-key <key>
|
|
254
|
+
npm-scan report --siem cef --license-key <key>
|
|
67
255
|
```
|
|
68
256
|
|
|
69
|
-
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## π Integrations
|
|
70
260
|
|
|
71
|
-
|
|
72
|
-
|---------|--------------------------------------------|----------|
|
|
73
|
-
| ATK-001 | Malicious lifecycle scripts | high |
|
|
74
|
-
| ATK-002 | Obfuscated payloads | medium |
|
|
75
|
-
| ATK-003 | Credential harvesting | high |
|
|
76
|
-
| ATK-004 | Persistence via editor configs | high |
|
|
77
|
-
| ATK-005 | Network exfiltration | critical |
|
|
78
|
-
| ATK-006 | Dependency confusion | medium |
|
|
79
|
-
| ATK-007 | Typosquatting | low |
|
|
80
|
-
| ATK-008 | Tarball tampering (published β source) | high |
|
|
81
|
-
| ATK-009 | Conditional/dormant triggers (CI, time) | high |
|
|
82
|
-
| ATK-010 | Sandbox evasion / anti-analysis | medium |
|
|
83
|
-
| ATK-011 | Transitive propagation (worm) | high |
|
|
261
|
+
### GitHub Action
|
|
84
262
|
|
|
85
|
-
|
|
263
|
+
Scan your lockfile on every PR. Add to `.github/workflows/scan.yml`:
|
|
86
264
|
|
|
87
|
-
|
|
265
|
+
```yaml
|
|
266
|
+
name: npm-scan
|
|
267
|
+
on: [pull_request]
|
|
268
|
+
jobs:
|
|
269
|
+
scan:
|
|
270
|
+
runs-on: ubuntu-latest
|
|
271
|
+
steps:
|
|
272
|
+
- uses: actions/checkout@v4
|
|
273
|
+
- uses: lateos/npm-scan-action@v1
|
|
274
|
+
with:
|
|
275
|
+
lockfile: package-lock.json
|
|
276
|
+
policy: .npm-scan.yml # optional
|
|
277
|
+
license-key: ${{ secrets.NPM_SCAN_LICENSE_KEY }} # optional (premium)
|
|
278
|
+
```
|
|
88
279
|
|
|
89
|
-
###
|
|
280
|
+
### Docker
|
|
90
281
|
|
|
91
|
-
|
|
282
|
+
```bash
|
|
283
|
+
# Pull and run
|
|
284
|
+
docker pull ghcr.io/lateos/npm-scan:cli
|
|
285
|
+
docker run --rm ghcr.io/lateos/npm-scan:cli scan lodash
|
|
92
286
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
- **Provisioning:** auto-creates users from SAML attributes with RBAC (admin/editor/viewer)
|
|
96
|
-
- **Security:** signed AuthnRequests, verified assertions, HMAC-SHA256 JWTs, Single Logout
|
|
287
|
+
# Full pipeline with Compose (Redis-based queue)
|
|
288
|
+
docker compose --profile pipeline up -d
|
|
97
289
|
|
|
290
|
+
# CLI with persistent storage
|
|
291
|
+
docker compose --profile cli up -d
|
|
98
292
|
```
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
293
|
+
|
|
294
|
+
Multi-arch images available for `linux/amd64` and `linux/arm64`.
|
|
295
|
+
|
|
296
|
+
### CI/CD
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# Fail the build if critical findings exist
|
|
300
|
+
npm-scan scan express --policy .npm-scan.yml || exit 1
|
|
103
301
|
```
|
|
104
302
|
|
|
105
|
-
|
|
303
|
+
---
|
|
106
304
|
|
|
107
|
-
|
|
305
|
+
## πΊοΈ Roadmap & Enterprise Features
|
|
108
306
|
|
|
109
|
-
|
|
307
|
+
### Free tier (shipped)
|
|
110
308
|
|
|
111
|
-
|
|
309
|
+
- All 11 ATK detectors (static + behavioral)
|
|
310
|
+
- SBOM output (CycloneDX + SPDX)
|
|
311
|
+
- HTML, text, and compliance reports (NIST + EU CRA)
|
|
312
|
+
- Policy-as-code engine (YAML)
|
|
313
|
+
- Local SQLite scan history
|
|
314
|
+
- GitHub Action
|
|
315
|
+
- Docker images + Compose pipeline
|
|
316
|
+
|
|
317
|
+
### Premium (π license key)
|
|
318
|
+
|
|
319
|
+
- PDF compliance reports with NIST traceability matrix
|
|
320
|
+
- SIEM export (Splunk CEF, Elastic ECS, Microsoft Sentinel, IBM QRadar)
|
|
321
|
+
- Dynamic sandbox (gVisor-based β ATK-008β010)
|
|
322
|
+
- Reachability analysis (call graph filtering)
|
|
323
|
+
|
|
324
|
+
### Enterprise (π’ custom license)
|
|
325
|
+
|
|
326
|
+
- SAML 2.0 SSO (Okta, Azure AD, OneLogin, Keycloak)
|
|
327
|
+
- REST API + webhooks (FastAPI)
|
|
328
|
+
- Team RBAC + audit logs
|
|
329
|
+
- Helm chart for Kubernetes deployment
|
|
330
|
+
- PostgreSQL backend for hosted/team tier
|
|
331
|
+
- SLA-backed priority support
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## π€ Contributing
|
|
336
|
+
|
|
337
|
+
We welcome contributions β especially new detectors, improved evasion resistance, and compliance templates.
|
|
338
|
+
|
|
339
|
+
See [`docs/attack-taxonomy.md`](docs/attack-taxonomy.md) for the ATK governance process. Every new detector requires:
|
|
340
|
+
|
|
341
|
+
1. A proof-of-concept sample
|
|
342
|
+
2. A detection rule with tests
|
|
343
|
+
3. False-positive analysis on top-500 npm packages
|
|
344
|
+
4. NIST 800-161 control mapping
|
|
112
345
|
|
|
113
346
|
```bash
|
|
347
|
+
git clone https://github.com/lateos/npm-scan.git
|
|
114
348
|
npm install
|
|
115
|
-
npm
|
|
116
|
-
npm run test # Unit tests (14)
|
|
117
|
-
npm run corpus # False-positive corpus test (33 malicious, 5 clean)
|
|
349
|
+
npm test
|
|
118
350
|
```
|
|
119
351
|
|
|
120
|
-
|
|
352
|
+
### Need help?
|
|
353
|
+
|
|
354
|
+
- π Read the [project plan](docs/project-plan.md)
|
|
355
|
+
- 𧬠Review the [attack taxonomy](docs/attack-taxonomy.md)
|
|
356
|
+
- π Open an issue or PR
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## π License
|
|
121
361
|
|
|
122
|
-
Apache-2.0 core + Commons Clause
|
|
362
|
+
Apache-2.0 core + Commons Clause.
|
|
363
|
+
See [`LICENSING.md`](LICENSING.md) for the exact boundary between free and premium features.
|
|
364
|
+
|
|
365
|
+
```
|
|
366
|
+
@lateos/npm-scan β npm supply chain security scanner
|
|
367
|
+
Copyright (C) 2026 Lateos
|
|
368
|
+
|
|
369
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
370
|
+
you may not use this file except in compliance with the License.
|
|
371
|
+
|
|
372
|
+
Unless required by applicable law or agreed to in writing, software
|
|
373
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
374
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
**Scan your first package now:**
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
npx @lateos/npm-scan scan lodash
|
|
383
|
+
```
|