@lateos/npm-scan 0.16.4 → 0.17.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.
Files changed (96) hide show
  1. package/.dockerignore +20 -20
  2. package/.husky/pre-commit +1 -1
  3. package/CHANGELOG.md +199 -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 +75 -44
  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-binary-embed.js +219 -0
  52. package/backend/detectors/tier1-infostealer.js +280 -0
  53. package/backend/detectors/tier1-lifecycle-hook.js +176 -0
  54. package/backend/detectors/tier1-metadata-spoof.js +180 -0
  55. package/backend/detectors/tier1-typosquat.js +219 -0
  56. package/backend/fetch.js +175 -175
  57. package/backend/index.js +4 -4
  58. package/backend/license.js +89 -89
  59. package/backend/lockfile.js +379 -379
  60. package/backend/pdf.js +245 -245
  61. package/backend/policy.js +193 -176
  62. package/backend/report.js +254 -254
  63. package/backend/sbom.js +66 -66
  64. package/backend/siem/cef.js +32 -32
  65. package/backend/siem/ecs.js +40 -40
  66. package/backend/siem/index.js +18 -18
  67. package/backend/siem/qradar.js +56 -56
  68. package/backend/siem/sentinel.js +27 -27
  69. package/backend/vsix-scan/detectors/activation-event-risk.js +116 -116
  70. package/backend/vsix-scan/detectors/burst-publish.js +52 -52
  71. package/backend/vsix-scan/detectors/exfil-pattern.js +88 -88
  72. package/backend/vsix-scan/detectors/known-ioc.js +105 -105
  73. package/backend/vsix-scan/detectors/orphan-commit-fetch.js +69 -69
  74. package/backend/vsix-scan/detectors/publisher-anomaly.js +70 -70
  75. package/backend/vsix-scan/index.js +183 -183
  76. package/backend/vsix-scan/marketplace-client.js +145 -145
  77. package/backend/vsix-scan/vsix-iocs.json +31 -31
  78. package/cli/cli.js +458 -458
  79. package/deploy/helm/npm-scan/Chart.yaml +21 -21
  80. package/deploy/helm/npm-scan/templates/_helpers.tpl +8 -8
  81. package/deploy/helm/npm-scan/templates/api.yaml +93 -93
  82. package/deploy/helm/npm-scan/templates/ingress.yaml +27 -27
  83. package/deploy/helm/npm-scan/templates/postgresql.yaml +66 -66
  84. package/deploy/helm/npm-scan/templates/secrets.yaml +18 -18
  85. package/deploy/helm/npm-scan/templates/worker.yaml +31 -31
  86. package/deploy/helm/npm-scan/values.byoc.yaml +74 -74
  87. package/deploy/helm/npm-scan/values.yaml +102 -102
  88. package/package.json +57 -57
  89. package/scripts/download-corpus.js +30 -30
  90. package/scripts/gen-mal-corpus.js +34 -34
  91. package/scripts/generate-campaign-fixtures.js +170 -0
  92. package/src/config/top-5000.json +87 -0
  93. package/test/fixtures/lockfiles/npm-lock.json +68 -68
  94. package/test/fixtures/lockfiles/pnpm-lock.yaml +117 -117
  95. package/test/fixtures/lockfiles/yarn.lock +103 -103
  96. 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,200 @@
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
+ - `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`
200
200
  - `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.