@lateos/npm-scan 0.18.1 → 0.18.2

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.
Files changed (93) hide show
  1. package/.dockerignore +20 -20
  2. package/.husky/pre-commit +1 -1
  3. package/CHANGELOG.md +233 -199
  4. package/LICENSING.md +19 -19
  5. package/README.de.md +708 -708
  6. package/README.fr.md +707 -707
  7. package/README.ja.md +704 -704
  8. package/README.md +826 -826
  9. package/README.zh.md +708 -708
  10. package/SECURITY.md +72 -72
  11. package/backend/cra.js +68 -68
  12. package/backend/db/schema.sql +32 -32
  13. package/backend/db.js +88 -88
  14. package/backend/detectors/atk-001-lifecycle.js +17 -17
  15. package/backend/detectors/atk-002-obfusc.js +261 -261
  16. package/backend/detectors/atk-003-creds.js +13 -13
  17. package/backend/detectors/atk-004-persist.js +13 -13
  18. package/backend/detectors/atk-005-exfil.js +13 -13
  19. package/backend/detectors/atk-006-depconf.js +14 -14
  20. package/backend/detectors/atk-007-typosquat.js +34 -34
  21. package/backend/detectors/atk-008-tarball-tamper.js +91 -91
  22. package/backend/detectors/atk-009-dormant-trigger.js +62 -62
  23. package/backend/detectors/atk-010-sandbox-evasion.js +50 -50
  24. package/backend/detectors/atk-011-transitive-prop.js +76 -76
  25. package/backend/detectors/cve-2026-48710-badhost/codePattern.js +99 -99
  26. package/backend/detectors/cve-2026-48710-badhost/findings.js +105 -105
  27. package/backend/detectors/cve-2026-48710-badhost/index.js +15 -15
  28. package/backend/detectors/cve-2026-48710-badhost/manifest.js +305 -305
  29. package/backend/detectors/cve-2026-48710-badhost/transitive.js +189 -189
  30. package/backend/detectors/hf-impersonation/index.js +396 -396
  31. package/backend/detectors/hf-impersonation/jaro-winkler.js +44 -44
  32. package/backend/detectors/hf-impersonation/known-orgs.js +5 -5
  33. package/backend/detectors/hf-impersonation/simhash.js +46 -46
  34. package/backend/detectors/index.js +81 -75
  35. package/backend/detectors/megalodon/d1-workflow-scan.js +147 -147
  36. package/backend/detectors/megalodon/d2-credential-harvest.js +61 -61
  37. package/backend/detectors/megalodon/d3-publish-velocity.js +67 -67
  38. package/backend/detectors/megalodon/d4-publisher-drift.js +124 -124
  39. package/backend/detectors/megalodon/d5-bot-commit-identity.js +3 -3
  40. package/backend/detectors/megalodon/d6-date-anachronism.js +3 -3
  41. package/backend/detectors/megalodon/index.js +80 -80
  42. package/backend/detectors/megalodon/types.js +9 -9
  43. package/backend/detectors/mini-shai-hulud/d1-burst-publish.js +42 -42
  44. package/backend/detectors/mini-shai-hulud/d2-sibling-compromise.js +116 -116
  45. package/backend/detectors/mini-shai-hulud/d3-slsa-mismatch.js +72 -72
  46. package/backend/detectors/mini-shai-hulud/d4-maintainer-anomaly.js +45 -45
  47. package/backend/detectors/mini-shai-hulud/d5-ioc-check.js +95 -95
  48. package/backend/detectors/mini-shai-hulud/d6-token-exfil.js +38 -38
  49. package/backend/detectors/mini-shai-hulud/index.js +118 -118
  50. package/backend/detectors/mini-shai-hulud/iocs.json +79 -79
  51. package/backend/detectors/tier1-cloud-imds.js +124 -0
  52. package/backend/detectors/tier1-infostealer.js +36 -0
  53. package/backend/detectors/tier1-multistage-postinstall.js +81 -0
  54. package/backend/detectors/tier1-version-confusion.js +107 -0
  55. package/backend/fetch.js +175 -175
  56. package/backend/index.js +4 -4
  57. package/backend/license.js +89 -89
  58. package/backend/lockfile.js +379 -379
  59. package/backend/pdf.js +245 -245
  60. package/backend/policy.js +193 -193
  61. package/backend/report.js +254 -254
  62. package/backend/sbom.js +66 -66
  63. package/backend/siem/cef.js +32 -32
  64. package/backend/siem/ecs.js +40 -40
  65. package/backend/siem/index.js +18 -18
  66. package/backend/siem/qradar.js +56 -56
  67. package/backend/siem/sentinel.js +27 -27
  68. package/backend/vsix-scan/detectors/activation-event-risk.js +116 -116
  69. package/backend/vsix-scan/detectors/burst-publish.js +52 -52
  70. package/backend/vsix-scan/detectors/exfil-pattern.js +88 -88
  71. package/backend/vsix-scan/detectors/known-ioc.js +105 -105
  72. package/backend/vsix-scan/detectors/orphan-commit-fetch.js +69 -69
  73. package/backend/vsix-scan/detectors/publisher-anomaly.js +70 -70
  74. package/backend/vsix-scan/index.js +183 -183
  75. package/backend/vsix-scan/marketplace-client.js +145 -145
  76. package/backend/vsix-scan/vsix-iocs.json +31 -31
  77. package/cli/cli.js +458 -458
  78. package/deploy/helm/npm-scan/Chart.yaml +21 -21
  79. package/deploy/helm/npm-scan/templates/_helpers.tpl +8 -8
  80. package/deploy/helm/npm-scan/templates/api.yaml +93 -93
  81. package/deploy/helm/npm-scan/templates/ingress.yaml +27 -27
  82. package/deploy/helm/npm-scan/templates/postgresql.yaml +66 -66
  83. package/deploy/helm/npm-scan/templates/secrets.yaml +18 -18
  84. package/deploy/helm/npm-scan/templates/worker.yaml +31 -31
  85. package/deploy/helm/npm-scan/values.byoc.yaml +74 -74
  86. package/deploy/helm/npm-scan/values.yaml +102 -102
  87. package/package.json +57 -57
  88. package/scripts/download-corpus.js +30 -30
  89. package/scripts/gen-mal-corpus.js +34 -34
  90. package/test/fixtures/lockfiles/npm-lock.json +68 -68
  91. package/test/fixtures/lockfiles/pnpm-lock.yaml +117 -117
  92. package/test/fixtures/lockfiles/yarn.lock +103 -103
  93. package/test/fixtures/mock-data.js +69 -69
package/.dockerignore CHANGED
@@ -1,20 +1,20 @@
1
- node_modules
2
- .git
3
- .env
4
- *.log
5
- *.tmp
6
- *.swp
7
- coverage
8
- .nyc_output
9
- tests
10
- docs
11
- docker
12
- *.md
13
- !README.md
14
- .eslintrc*
15
- .prettierrc*
16
- tsconfig*
17
- .vscode
18
- .idea
19
- *.test.js
20
- *.spec.js
1
+ node_modules
2
+ .git
3
+ .env
4
+ *.log
5
+ *.tmp
6
+ *.swp
7
+ coverage
8
+ .nyc_output
9
+ tests
10
+ docs
11
+ docker
12
+ *.md
13
+ !README.md
14
+ .eslintrc*
15
+ .prettierrc*
16
+ tsconfig*
17
+ .vscode
18
+ .idea
19
+ *.test.js
20
+ *.spec.js
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- npx lint-staged
1
+ npx lint-staged
package/CHANGELOG.md CHANGED
@@ -1,200 +1,234 @@
1
- # Changelog
2
-
3
- All notable changes to [@lateos/npm-scan](https://github.com/lateos-ai/npm-scan) are documented here.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## [Unreleased]
8
-
9
- ### Added
10
- - `scan --file <path>` flag to analyze local `.tgz` tarballs without fetching from npm registry
11
- - `scan --fail-on <level>` flag to exit with code 1 when findings >= severity (CI/CD integration)
12
- - `scan --sarif [file]` to output SARIF v2.1 format for GitHub Advanced Security, VS Code, Azure DevOps
13
- - `scan --csv [file]` and `report --csv [file]` to export tabular CSV for Excel/Sheets import
14
- - `scan --score-only` to output only risk score (0-10), auto-added to JSON output
15
- - Government/SOC 2 features: `--audit-log`, `--fips`, `--stig`, `--cache-dir` for air-gapped/federal compliance
16
- - **BYOC (Bring Your Own Cloud)**: Helm chart v1.0.0 for enterprise/government VPC deployments with SIEM, PDF, SSO
17
-
18
- ## [0.9.7] 2026-05-12
19
-
20
- - Sigstore provenance attestation on every publish via new GitHub Actions workflow
21
- - Fix duplicate Docker section in README.md
22
- - Add SECURITY.md with vulnerability disclosure policy and PGP key
23
-
24
- ## [0.9.6]2026-05-12
25
-
26
- - Add Docker badge (`ghcr.io/lateos/npm-scan`) to all 5 READMEs
27
- - Add dedicated Docker quick-start section in all languages
28
- - Replace duplicate Docker pull instructions in Integrations with cross-references
29
-
30
- ## [0.9.5] 2026-05-12
31
-
32
- - Fix literal `\n` escape sequences in LICENSING.md (replaced with real newlines)
33
-
34
- ## [0.9.4]2026-05-11
35
-
36
- - Fix language badge links to use absolute GitHub URLs so they work from npm web UI
37
- - Fix GitHub organization links from `lateos` to `lateos-ai` across all READMEs
38
-
39
- ## [0.9.3] — 2026-05-11
40
-
41
- - Add multi-language README: Chinese (`README.zh.md`), Japanese (`README.ja.md`), French (`README.fr.md`), German (`README.de.md`)
42
- - Language-switcher badges with absolute GitHub URLs in all 5 READMEs
43
-
44
- ## [0.9.2] 2026-05-11
45
-
46
- - **222 tests across 8 test files** (212 passing, 10 skipped for known FPs)
47
- - **85% line coverage** with Node.js native test runner
48
- - New test files: `test/db.test.js`, `test/detectors-edge-cases.test.js`, `test/detectors-corpus.test.js`, `test/report-snapshots.test.js`, `test/fetch.test.js`, `test/policy-edge-cases.test.js`, `test/cli.test.js`, `test/fixtures/mock-data.js`
49
- - `backend/db.js:close()` resets `initPromise = null` for test isolation
50
- - GitHub Actions CI with Node 18/20/22 matrix, corpus tests, and self-scan
51
- - GitHub Actions PR lockfile scanner with `fail-on: high`
52
-
53
- ## [0.9.1] — 2026-05-11
54
-
55
- - Remove `node-fetch` import and dependency (replaced in 0.9.0)
56
-
57
- ## [0.9.0] — 2026-05-11
58
-
59
- - **Replace `node-fetch` with native `fetch`** (Node 18+) — removes external HTTP dependency
60
- - **Replace `better-sqlite3` with `sql.js`** (WASM) zero native compilation, fixes `npx` silent failure on systems without build tools
61
- - Add 404 check in `backend/fetch.js` for robust registry lookups
62
- - Reduce ATK-009 false positives on `lodash`/`axios`/`express`
63
- - Fix ATK-002/011 false positives — stricter eval+decode rules, remove self-referential checks
64
- - Fix ATK-008 `knownRepos` for `vue`
65
-
66
- ## [0.8.0] 2026-05-11
67
-
68
- - **YAML/JSON policy-as-code engine** — allowlists, severity overrides, suppressions, `fail_on` threshold
69
- - **Text report generator** (free tier)
70
- - **PDF report generator** (premium, via `pdf-lib`)
71
- - **Docker**: multi-stage builds, Compose profiles, health checks, validation script, Makefile
72
- - Comprehensive README rewrite with comparison table, ATK taxonomy, usage examples, integrations
73
- - `.npmignore` cleanup for smaller package
74
-
75
- ## [0.7.6] 2026-05-10
76
-
77
- - **GitHub Action** (`action.yml`) — scan on push/PR with lockfile or package mode, fail-on severity threshold, SIEM/SBOM output support
78
- - **28 comprehensive tests** covering SIEM exporters (CEF, ECS, Sentinel, QRadar), EU CRA compliance, SBOM (CycloneDX + SPDX), License key gen/validation/edition/tamper/expiry, Report/NIST (HTML, SR-series table, severity badges, all 11 ATK IDs)
79
- - Fix tampered key test determinism
80
-
81
- ## [0.7.5] 2026-05-10
82
-
83
- - Add Elastic ECS, Microsoft Sentinel, and IBM QRadar SIEM exporters
84
-
85
- ## [0.7.4] 2026-05-10
86
-
87
- - Version bump only; no functional changes
88
-
89
- ## [0.7.3] — 2026-05-10
90
-
91
- - Version bump only; no functional changes
92
-
93
- ## [0.7.2]2026-05-10
94
-
95
- - Fix duplicate Enterprise Features section in README
96
-
97
- ## [0.7.1]2026-05-10
98
-
99
- - Add SAML SSO and REST API sections to README
100
-
101
- ## [0.7.0] — 2026-05-10
102
-
103
- - **Enterprise SAML SSO integration**
104
-
105
- ## [0.6.0] 2026-05-10
106
-
107
- - **License key enforcement** HMAC-signed keys with community/premium/enterprise editions
108
- - Feature gating for SIEM, CRA, REST API, Helm, PostgreSQL backend, SSO, audit logs
109
- - **PostgreSQL schema** teams, users, RBAC, audit log, webhooks, API keys, materialized `package_risk` view
110
- - **FastAPI REST API** — scan/list/retrieve endpoints, webhook CRUD with HMAC-signed dispatch
111
- - **Webhook engine** — event dispatch with retry, signature verification header
112
- - **Helm chart** API + worker + PostgreSQL deployments, secrets, ingress, PVC
113
- - CLI hardened: premium features blocked without valid license key
114
-
115
- ## [0.5.0] — 2026-05-10
116
-
117
- - **ATK-011 (Transitive Propagation)** detector
118
- - **SIEM CEF export** for Splunk and ArcSight integration
119
- - **EU CRA compliance report** EU Cyber Resilience Act readiness assessment
120
- - Phase 3 enterprise foundation
121
-
122
- ## [0.4.1] — 2026-05-10
123
-
124
- - Update README for Phase 3 (ATK-011, SIEM, CRA)
125
-
126
- ## [0.4.0] — 2026-05-10
127
-
128
- - **ATK-008 (Tarball Tampering)**, **ATK-009 (Dormant Trigger)**, **ATK-010 (Sandbox Evasion)** detectors
129
- - **SPDX 2.3 SBOM** support alongside CycloneDX
130
- - **NIST SP 800-161 compliance report** — supply chain risk management controls
131
- - Sandbox threat model and gVisor isolation strategy
132
-
133
- ## [0.3.3] 2026-05-10
134
-
135
- - Fix report HTML/SBOM generation to use `atk_id`, description, package name, dynamic version
136
-
137
- ## [0.3.2] 2026-05-10
138
-
139
- - Update README for Phase 2 (ATK-008–010, SPDX, NIST)
140
-
141
- ## [0.3.1]2026-05-10
142
-
143
- - Fix schema literal newlines
144
- - Fix CLI SBOM defaults
145
- - Fix SBOM finding IDs
146
-
147
- ## [0.3.0] 2026-05-10
148
-
149
- - **ATK-001 (Lifecycle Script)** detector detects `preinstall`, `postinstall`, `preuninstall` hooks with suspicious commands
150
- - **ATK-002 (Obfuscated Payload)** detector — hex/base64/decode-driven eval, regex obfuscation
151
- - **ATK-003 (Credential Harvester)** detector — env var exfiltration, filesystem credential scraping
152
- - **ATK-004 (Persistence Mechanism)** detector cron jobs, startup scripts, `postinstall` service installs
153
- - **ATK-005 (Data Exfiltration)** detector DNS tunneling, HTTP beaconing, unexpected network calls
154
- - **ATK-006 (Dependency Confusion)** detector — internal package name heuristics
155
- - **ATK-007 (Typosquatting)** detector — edit-distance based package name similarity
156
-
157
- ## [0.2.5] — 2026-05-10
158
-
159
- - Fix `.npmignore` to exclude corpus tarballs from published package
160
-
161
- ## [0.2.4] — 2026-05-10
162
-
163
- - Version bump only; no functional changes
164
-
165
- ## [0.2.2] 2026-05-10
166
-
167
- - **Corpus test suite** 50 clean packages (0% FP) + 22 malicious PoC (100% detect rate)
168
- - **HTML report generator** with CLI `--html` flag
169
- - ATK-007 edit-distance typosquatting implementation
170
- - Switch from `adm-zip` to `tar` for tgz extraction
171
- - ATK detectors hardened for fewer false positives
172
- - `README.md`, `.gitignore`, corpus download scripts
173
- - **Phase 1 exit**: FP < 2%, passes unit tests + corpus
174
-
175
- ## [0.2.1] — 2026-05-10
176
-
177
- - Version bump only; no functional changes
178
-
179
- ## [0.2.0] 2026-05-10
180
-
181
- - **Commander.js CLI** with `scan`, `scan-lockfile`, `report` commands
182
- - **ATK-001–007 detector stubs** via `backend/detectors/index.js` (`runAll`)
183
- - **SQLite persistence** via `better-sqlite3` scan auto-save, report by ID/recent
184
- - **CycloneDX SBOM** — JSON and XML output with ATK vulnerability references
185
- - `.github/workflows/scan.yml`GitHub Action example for PR scanning
186
- - Dependencies: `commander`, `adm-zip`, `acorn`, `node-fetch`
187
-
188
- ## [0.1.0]2026-05-09
189
-
190
- - **Initial foundation**
191
- - Monorepo structure (`cli/`, `backend/`, `docker/`, `docs/`)
192
- - `LICENSING.md` — Apache-2.0 core + Commons Clause for premium features
193
- - `CONTRIBUTING.md`
194
- - `docs/attack-taxonomy.md` — ATK-001 through ATK-011 stubs
195
- - `backend/license.js` skeleton for HMAC-signed license key gating
196
- - `backend/db/schema.sql`
197
- - `docker/Dockerfile.cli` + `docker-compose.yml`
198
- - npm scripts (lint, test stubs)
199
- - `.github/workflows/ci.yml`
1
+ # Changelog
2
+
3
+ All notable changes to [@lateos/npm-scan](https://github.com/lateos-ai/npm-scan) are documented here.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ### Added
10
+
11
+ ## v0.18.2 June 2, 2026
12
+
13
+ ### New Detectors
14
+ - **D6a** `tier1-version-confusion.js` Detects dependency confusion via sentinel
15
+ versions (99.99.99 family HIGH) and high-version heuristic (major≥9 → MEDIUM).
16
+ Covers Sonatype-2026-003429 and Microsoft scope confusion campaigns.
17
+ - **D6b** `tier1-multistage-postinstall.js` — Detects two-stage remote download +
18
+ binary execution and detached background persistence in lifecycle scripts.
19
+ Covers Gen-2 stager patterns from the OpenSearch/ES typosquatting wave.
20
+ - **D6c** `tier1-cloud-imds.js` Detects GCP metadata server and Azure IMDS endpoint
21
+ targeting in scripts and JS files. Covers the Miasma @redhat-cloud-services campaign.
22
+
23
+ ### Detector Enhancements
24
+ - **D2** `tier1-infostealer.js`Added NAMED_SIGNATURES array with early-return
25
+ CRITICAL detection for confirmed malware campaign strings. First entry: Miasma
26
+ campaign identifier (June 2026).
27
+
28
+ ### Bug Fixes
29
+ - **D6b** `tier1-multistage-postinstall.js`
30
+ - Removed /g flag from REMOTE_FETCH_RE, BINARY_EXEC_RE, DETACHED_RE
31
+ eliminated fragile lastIndex state between hook iterations
32
+ - Added critical severity tier to severityLabel Signal A+B findings
33
+ now consistently report severity: critical / confidence: CRITICAL
34
+ - Fixed hardcoded "postinstall" in finding message now reflects
35
+ whichever hook fired and the subtype string
36
+
37
+ ### Infrastructure
38
+ - Added Detector Registry section to AGENTS.md with calibration notes.
39
+
40
+ ### Test Suite
41
+ - 656 passing, 0 failing, 19 skipping.
42
+
43
+ ### Added
44
+ - `scan --file <path>` flag to analyze local `.tgz` tarballs without fetching from npm registry
45
+ - `scan --fail-on <level>` flag to exit with code 1 when findings >= severity (CI/CD integration)
46
+ - `scan --sarif [file]` to output SARIF v2.1 format for GitHub Advanced Security, VS Code, Azure DevOps
47
+ - `scan --csv [file]` and `report --csv [file]` to export tabular CSV for Excel/Sheets import
48
+ - `scan --score-only` to output only risk score (0-10), auto-added to JSON output
49
+ - Government/SOC 2 features: `--audit-log`, `--fips`, `--stig`, `--cache-dir` for air-gapped/federal compliance
50
+ - **BYOC (Bring Your Own Cloud)**: Helm chart v1.0.0 for enterprise/government VPC deployments with SIEM, PDF, SSO
51
+
52
+ ## [0.9.7] — 2026-05-12
53
+
54
+ - Sigstore provenance attestation on every publish via new GitHub Actions workflow
55
+ - Fix duplicate Docker section in README.md
56
+ - Add SECURITY.md with vulnerability disclosure policy and PGP key
57
+
58
+ ## [0.9.6] — 2026-05-12
59
+
60
+ - Add Docker badge (`ghcr.io/lateos/npm-scan`) to all 5 READMEs
61
+ - Add dedicated Docker quick-start section in all languages
62
+ - Replace duplicate Docker pull instructions in Integrations with cross-references
63
+
64
+ ## [0.9.5] — 2026-05-12
65
+
66
+ - Fix literal `\n` escape sequences in LICENSING.md (replaced with real newlines)
67
+
68
+ ## [0.9.4] — 2026-05-11
69
+
70
+ - Fix language badge links to use absolute GitHub URLs so they work from npm web UI
71
+ - Fix GitHub organization links from `lateos` to `lateos-ai` across all READMEs
72
+
73
+ ## [0.9.3] 2026-05-11
74
+
75
+ - Add multi-language README: Chinese (`README.zh.md`), Japanese (`README.ja.md`), French (`README.fr.md`), German (`README.de.md`)
76
+ - Language-switcher badges with absolute GitHub URLs in all 5 READMEs
77
+
78
+ ## [0.9.2] 2026-05-11
79
+
80
+ - **222 tests across 8 test files** (212 passing, 10 skipped for known FPs)
81
+ - **85% line coverage** with Node.js native test runner
82
+ - New test files: `test/db.test.js`, `test/detectors-edge-cases.test.js`, `test/detectors-corpus.test.js`, `test/report-snapshots.test.js`, `test/fetch.test.js`, `test/policy-edge-cases.test.js`, `test/cli.test.js`, `test/fixtures/mock-data.js`
83
+ - `backend/db.js:close()` resets `initPromise = null` for test isolation
84
+ - GitHub Actions CI with Node 18/20/22 matrix, corpus tests, and self-scan
85
+ - GitHub Actions PR lockfile scanner with `fail-on: high`
86
+
87
+ ## [0.9.1] 2026-05-11
88
+
89
+ - Remove `node-fetch` import and dependency (replaced in 0.9.0)
90
+
91
+ ## [0.9.0] 2026-05-11
92
+
93
+ - **Replace `node-fetch` with native `fetch`** (Node 18+) removes external HTTP dependency
94
+ - **Replace `better-sqlite3` with `sql.js`** (WASM) — zero native compilation, fixes `npx` silent failure on systems without build tools
95
+ - Add 404 check in `backend/fetch.js` for robust registry lookups
96
+ - Reduce ATK-009 false positives on `lodash`/`axios`/`express`
97
+ - Fix ATK-002/011 false positives stricter eval+decode rules, remove self-referential checks
98
+ - Fix ATK-008 `knownRepos` for `vue`
99
+
100
+ ## [0.8.0] — 2026-05-11
101
+
102
+ - **YAML/JSON policy-as-code engine** — allowlists, severity overrides, suppressions, `fail_on` threshold
103
+ - **Text report generator** (free tier)
104
+ - **PDF report generator** (premium, via `pdf-lib`)
105
+ - **Docker**: multi-stage builds, Compose profiles, health checks, validation script, Makefile
106
+ - Comprehensive README rewrite with comparison table, ATK taxonomy, usage examples, integrations
107
+ - `.npmignore` cleanup for smaller package
108
+
109
+ ## [0.7.6]2026-05-10
110
+
111
+ - **GitHub Action** (`action.yml`) scan on push/PR with lockfile or package mode, fail-on severity threshold, SIEM/SBOM output support
112
+ - **28 comprehensive tests** covering SIEM exporters (CEF, ECS, Sentinel, QRadar), EU CRA compliance, SBOM (CycloneDX + SPDX), License key gen/validation/edition/tamper/expiry, Report/NIST (HTML, SR-series table, severity badges, all 11 ATK IDs)
113
+ - Fix tampered key test determinism
114
+
115
+ ## [0.7.5] — 2026-05-10
116
+
117
+ - Add Elastic ECS, Microsoft Sentinel, and IBM QRadar SIEM exporters
118
+
119
+ ## [0.7.4]2026-05-10
120
+
121
+ - Version bump only; no functional changes
122
+
123
+ ## [0.7.3] — 2026-05-10
124
+
125
+ - Version bump only; no functional changes
126
+
127
+ ## [0.7.2] — 2026-05-10
128
+
129
+ - Fix duplicate Enterprise Features section in README
130
+
131
+ ## [0.7.1] 2026-05-10
132
+
133
+ - Add SAML SSO and REST API sections to README
134
+
135
+ ## [0.7.0] 2026-05-10
136
+
137
+ - **Enterprise SAML SSO integration**
138
+
139
+ ## [0.6.0] 2026-05-10
140
+
141
+ - **License key enforcement** HMAC-signed keys with community/premium/enterprise editions
142
+ - Feature gating for SIEM, CRA, REST API, Helm, PostgreSQL backend, SSO, audit logs
143
+ - **PostgreSQL schema** teams, users, RBAC, audit log, webhooks, API keys, materialized `package_risk` view
144
+ - **FastAPI REST API** — scan/list/retrieve endpoints, webhook CRUD with HMAC-signed dispatch
145
+ - **Webhook engine** event dispatch with retry, signature verification header
146
+ - **Helm chart** — API + worker + PostgreSQL deployments, secrets, ingress, PVC
147
+ - CLI hardened: premium features blocked without valid license key
148
+
149
+ ## [0.5.0]2026-05-10
150
+
151
+ - **ATK-011 (Transitive Propagation)** detector
152
+ - **SIEM CEF export** for Splunk and ArcSight integration
153
+ - **EU CRA compliance report** — EU Cyber Resilience Act readiness assessment
154
+ - Phase 3 enterprise foundation
155
+
156
+ ## [0.4.1] — 2026-05-10
157
+
158
+ - Update README for Phase 3 (ATK-011, SIEM, CRA)
159
+
160
+ ## [0.4.0] — 2026-05-10
161
+
162
+ - **ATK-008 (Tarball Tampering)**, **ATK-009 (Dormant Trigger)**, **ATK-010 (Sandbox Evasion)** detectors
163
+ - **SPDX 2.3 SBOM** support alongside CycloneDX
164
+ - **NIST SP 800-161 compliance report** — supply chain risk management controls
165
+ - Sandbox threat model and gVisor isolation strategy
166
+
167
+ ## [0.3.3]2026-05-10
168
+
169
+ - Fix report HTML/SBOM generation to use `atk_id`, description, package name, dynamic version
170
+
171
+ ## [0.3.2] 2026-05-10
172
+
173
+ - Update README for Phase 2 (ATK-008–010, SPDX, NIST)
174
+
175
+ ## [0.3.1] — 2026-05-10
176
+
177
+ - Fix schema literal newlines
178
+ - Fix CLI SBOM defaults
179
+ - Fix SBOM finding IDs
180
+
181
+ ## [0.3.0] 2026-05-10
182
+
183
+ - **ATK-001 (Lifecycle Script)** detector — detects `preinstall`, `postinstall`, `preuninstall` hooks with suspicious commands
184
+ - **ATK-002 (Obfuscated Payload)** detector hex/base64/decode-driven eval, regex obfuscation
185
+ - **ATK-003 (Credential Harvester)** detector env var exfiltration, filesystem credential scraping
186
+ - **ATK-004 (Persistence Mechanism)** detector — cron jobs, startup scripts, `postinstall` service installs
187
+ - **ATK-005 (Data Exfiltration)** detector — DNS tunneling, HTTP beaconing, unexpected network calls
188
+ - **ATK-006 (Dependency Confusion)** detector internal package name heuristics
189
+ - **ATK-007 (Typosquatting)** detector — edit-distance based package name similarity
190
+
191
+ ## [0.2.5] 2026-05-10
192
+
193
+ - Fix `.npmignore` to exclude corpus tarballs from published package
194
+
195
+ ## [0.2.4] 2026-05-10
196
+
197
+ - Version bump only; no functional changes
198
+
199
+ ## [0.2.2] — 2026-05-10
200
+
201
+ - **Corpus test suite** — 50 clean packages (0% FP) + 22 malicious PoC (100% detect rate)
202
+ - **HTML report generator** with CLI `--html` flag
203
+ - ATK-007 edit-distance typosquatting implementation
204
+ - Switch from `adm-zip` to `tar` for tgz extraction
205
+ - ATK detectors hardened for fewer false positives
206
+ - `README.md`, `.gitignore`, corpus download scripts
207
+ - **Phase 1 exit**: FP < 2%, passes unit tests + corpus
208
+
209
+ ## [0.2.1] — 2026-05-10
210
+
211
+ - Version bump only; no functional changes
212
+
213
+ ## [0.2.0] — 2026-05-10
214
+
215
+ - **Commander.js CLI** with `scan`, `scan-lockfile`, `report` commands
216
+ - **ATK-001–007 detector stubs** via `backend/detectors/index.js` (`runAll`)
217
+ - **SQLite persistence** via `better-sqlite3` — scan auto-save, report by ID/recent
218
+ - **CycloneDX SBOM** — JSON and XML output with ATK vulnerability references
219
+ - `.github/workflows/scan.yml` — GitHub Action example for PR scanning
220
+ - Dependencies: `commander`, `adm-zip`, `acorn`, `node-fetch`
221
+
222
+ ## [0.1.0] — 2026-05-09
223
+
224
+ - **Initial foundation**
225
+ - Monorepo structure (`cli/`, `backend/`, `docker/`, `docs/`)
226
+ - `LICENSING.md` — Apache-2.0 core + Commons Clause for premium features
227
+ - `CONTRIBUTING.md`
228
+ - `docs/attack-taxonomy.md` — ATK-001 through ATK-011 stubs
229
+ - `backend/license.js` skeleton for HMAC-signed license key gating
230
+ - `backend/db/schema.sql`
231
+ - `docker/Dockerfile.cli` + `docker-compose.yml`
232
+ - npm scripts (lint, test stubs)
233
+ - `.github/workflows/ci.yml`
200
234
  - `AGENTS.md` — project instructions
package/LICENSING.md CHANGED
@@ -1,19 +1,19 @@
1
- # LICENSING.md
2
-
3
- ## Model: Apache-2.0 core + Commons Clause premium
4
-
5
- ### Core (Apache-2.0):
6
- - Static analysis engine, ATK-001–007 detectors, CLI, lockfile scanner, SBOM output (CycloneDX), GitHub Action, Docker images, JSON output, SQLite-backed local storage, basic HTML report.
7
-
8
- ### Premium (Apache-2.0 + Commons Clause):
9
- - Dynamic sandbox (ATK-008+), advanced compliance reports (PDF, regulatory templates), SIEM connectors, reachability analysis, team dashboard, SSO, audit logs, API/webhooks, on-prem/air-gapped licenses, priority support.
10
-
11
- ## Commons Clause
12
- The Commons Clause prohibits selling our open core software as a service. See https://commonsclause.com/ for details.
13
-
14
- ## Feature Flags
15
- Premium features gated by license key validated at runtime. Keys issued per-seat CLI, per-org hosted.
16
-
17
- Full Apache-2.0 license in LICENSE file (TBD).
18
-
19
- Licensing boundaries defined before external contributions. Changes require PR updating this file.
1
+ # LICENSING.md
2
+
3
+ ## Model: Apache-2.0 core + Commons Clause premium
4
+
5
+ ### Core (Apache-2.0):
6
+ - Static analysis engine, ATK-001–007 detectors, CLI, lockfile scanner, SBOM output (CycloneDX), GitHub Action, Docker images, JSON output, SQLite-backed local storage, basic HTML report.
7
+
8
+ ### Premium (Apache-2.0 + Commons Clause):
9
+ - Dynamic sandbox (ATK-008+), advanced compliance reports (PDF, regulatory templates), SIEM connectors, reachability analysis, team dashboard, SSO, audit logs, API/webhooks, on-prem/air-gapped licenses, priority support.
10
+
11
+ ## Commons Clause
12
+ The Commons Clause prohibits selling our open core software as a service. See https://commonsclause.com/ for details.
13
+
14
+ ## Feature Flags
15
+ Premium features gated by license key validated at runtime. Keys issued per-seat CLI, per-org hosted.
16
+
17
+ Full Apache-2.0 license in LICENSE file (TBD).
18
+
19
+ Licensing boundaries defined before external contributions. Changes require PR updating this file.