@lateos/npm-scan 0.9.9 → 0.10.1

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/CHANGELOG.md CHANGED
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
13
13
  - `scan --csv [file]` and `report --csv [file]` to export tabular CSV for Excel/Sheets import
14
14
  - `scan --score-only` to output only risk score (0-10), auto-added to JSON output
15
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
16
17
 
17
18
  ## [0.9.7] — 2026-05-12
18
19
 
package/README.de.md CHANGED
@@ -12,6 +12,7 @@
12
12
  [![Tests](https://img.shields.io/badge/tests-222%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
13
13
  [![Coverage](https://img.shields.io/badge/coverage-85%25-yellowgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
14
14
  [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Flateos%2Fnpm--scan-2496ED?style=flat-square&logo=docker)](https://github.com/lateos-ai/npm-scan/pkgs/container/npm-scan)
15
+ [![Sigstore](https://img.shields.io/static/v1?label=Sigstore&message=Provenance&color=green&style=flat-square&logo=sigstore)](https://github.com/lateos-ai/npm-scan/actions/workflows/publish.yml)
15
16
 
16
17
  **Moderne Lieferkettensicherheit für das npm-Ökosystem.**
17
18
  Statische + verhaltensbasierte Analyse, die erkennt, was npm audit, Snyk und Socket übersehen — obfuskierte Payloads, Credential-Stealer, bedingte Auslöser, Sandbox-Evasion und wurmartige Verbreitung.
package/README.fr.md CHANGED
@@ -12,6 +12,7 @@
12
12
  [![Tests](https://img.shields.io/badge/tests-222%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
13
13
  [![Coverage](https://img.shields.io/badge/coverage-85%25-yellowgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
14
14
  [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Flateos%2Fnpm--scan-2496ED?style=flat-square&logo=docker)](https://github.com/lateos-ai/npm-scan/pkgs/container/npm-scan)
15
+ [![Sigstore](https://img.shields.io/static/v1?label=Sigstore&message=Provenance&color=green&style=flat-square&logo=sigstore)](https://github.com/lateos-ai/npm-scan/actions/workflows/publish.yml)
15
16
 
16
17
  **Sécurité moderne de la chaîne d'approvisionnement pour l'écosystème npm.**
17
18
  Analyse statique + comportementale qui détecte ce que npm audit, Snyk et Socket manquent — charges utiles obfusquées, voleurs d'identifiants, déclencheurs conditionnels, contournement de sandbox et propagation de type ver.
package/README.ja.md CHANGED
@@ -12,6 +12,7 @@
12
12
  [![Tests](https://img.shields.io/badge/tests-222%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
13
13
  [![Coverage](https://img.shields.io/badge/coverage-85%25-yellowgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
14
14
  [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Flateos%2Fnpm--scan-2496ED?style=flat-square&logo=docker)](https://github.com/lateos-ai/npm-scan/pkgs/container/npm-scan)
15
+ [![Sigstore](https://img.shields.io/static/v1?label=Sigstore&message=Provenance&color=green&style=flat-square&logo=sigstore)](https://github.com/lateos-ai/npm-scan/actions/workflows/publish.yml)
15
16
 
16
17
  **npmエコシステムのためのモダンなサプライチェーンセキュリティ。**
17
18
  静的解析+行動分析で、npm audit、Snyk、Socketが見逃す脅威——難読化ペイロード、認証情報窃取、条件付きトリガー、サンドボックス回避、ワーム型伝播——を検出します。
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![Tests](https://img.shields.io/badge/tests-222%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
7
7
  [![Coverage](https://img.shields.io/badge/coverage-85%25-yellowgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
8
8
  [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Flateos%2Fnpm--scan-2496ED?style=flat-square&logo=docker)](https://github.com/lateos-ai/npm-scan/pkgs/container/npm-scan)
9
+ [![Sigstore](https://img.shields.io/static/v1?label=Sigstore&message=Provenance&color=green&style=flat-square&logo=sigstore)](https://github.com/lateos-ai/npm-scan/actions/workflows/publish.yml)
9
10
 
10
11
  [![中文](https://img.shields.io/badge/lang-zh--CN-red?style=flat-square)](https://github.com/lateos-ai/npm-scan/blob/main/README.zh.md)
11
12
  [![日本語](https://img.shields.io/badge/lang-ja-purple?style=flat-square)](https://github.com/lateos-ai/npm-scan/blob/main/README.ja.md)
@@ -129,6 +130,39 @@ npm-scan report --stig
129
130
 
130
131
  ---
131
132
 
133
+ ## ☁️ BYOC — Bring Your Own Cloud
134
+
135
+ Deploy npm-scan in your VPC with full data sovereignty. No data leaves your infrastructure.
136
+
137
+ | Feature | Description |
138
+ |---------|-------------|
139
+ | **Self-hosted** | Run on EKS/GKE/AKS in your AWS/Azure/GCP account |
140
+ | **SIEM Export** | CEF/ECS/Sentinel/QRadar to your existing SIEM |
141
+ | **SSO/OIDC** | SAML/OIDC integration with your identity provider |
142
+ | **PDF Reports** | Generate NIST-compliant PDF reports locally |
143
+ | **External DB** | Connect to your existing PostgreSQL/Redis |
144
+
145
+ ```bash
146
+ # Deploy to your VPC with Helm
147
+ git clone https://github.com/lateos-ai/npm-scan.git
148
+ cd npm-scan/deploy/helm
149
+ helm install npm-scan -f values.byoc.yaml .
150
+
151
+ # BYOC values example (see values.byoc.yaml)
152
+ premium:
153
+ enabled: true
154
+ edition: enterprise
155
+ byoc:
156
+ enabled: true
157
+ cloudProvider: aws
158
+ vpcId: vpc-xxx
159
+ region: us-east-1
160
+ ```
161
+
162
+ **Pricing**: Enterprise license $10k/yr — self-supported (docs + GitHub issues).
163
+
164
+ ---
165
+
132
166
  ## 📖 Usage Examples
133
167
 
134
168
  ### Scan a single package
package/README.zh.md CHANGED
@@ -12,6 +12,7 @@
12
12
  [![Tests](https://img.shields.io/badge/tests-222%20passing-brightgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
13
13
  [![Coverage](https://img.shields.io/badge/coverage-85%25-yellowgreen?style=flat-square)](https://github.com/lateos-ai/npm-scan)
14
14
  [![Docker](https://img.shields.io/badge/docker-ghcr.io%2Flateos%2Fnpm--scan-2496ED?style=flat-square&logo=docker)](https://github.com/lateos-ai/npm-scan/pkgs/container/npm-scan)
15
+ [![Sigstore](https://img.shields.io/static/v1?label=Sigstore&message=Provenance&color=green&style=flat-square&logo=sigstore)](https://github.com/lateos-ai/npm-scan/actions/workflows/publish.yml)
15
16
 
16
17
  **适用于 npm 生态系统的现代供应链安全工具。**
17
18
  静态 + 行为分析,捕获 npm audit、Snyk 和 Socket 遗漏的威胁——混淆载荷、凭证窃取器、条件触发器、沙箱逃逸以及蠕虫式传播。
package/cli/cli.js CHANGED
@@ -265,4 +265,64 @@ program
265
265
  }
266
266
  });
267
267
 
268
+ program
269
+ .command('serve')
270
+ .description('Start API server (premium feature)')
271
+ .option('-p, --port <port>', 'Port', '8000')
272
+ .option('-h, --host <host>', 'Host', '0.0.0.0')
273
+ .action(async (options) => {
274
+ const licenseKey = process.env.NPM_SCAN_LICENSE_KEY || options.licenseKey;
275
+ requirePremium('rest-api', licenseKey);
276
+
277
+ const { createServer } = await import('http');
278
+ const server = createServer(async (req, res) => {
279
+ const headers = { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' };
280
+
281
+ if (req.url === '/health') {
282
+ res.writeHead(200, headers);
283
+ res.end(JSON.stringify({ status: 'ok', version: program.version() }));
284
+ return;
285
+ }
286
+
287
+ if (req.url === '/scan' && req.method === 'POST') {
288
+ let body = '';
289
+ req.on('data', chunk => body += chunk);
290
+ req.on('end', async () => {
291
+ try {
292
+ const { package: pkg, options: scanOpts } = JSON.parse(body);
293
+ const { scan } = await import('../backend/fetch.js');
294
+ const results = await scan(pkg, { ...scanOpts, licenseKey });
295
+ res.writeHead(200, headers);
296
+ res.end(JSON.stringify({ results }));
297
+ } catch (e) {
298
+ res.writeHead(500, headers);
299
+ res.end(JSON.stringify({ error: e.message }));
300
+ }
301
+ });
302
+ return;
303
+ }
304
+
305
+ if (req.url.startsWith('/siem') && options.siemEnabled) {
306
+ requirePremium('siem', licenseKey);
307
+ res.writeHead(200, headers);
308
+ res.end(JSON.stringify({ siem: 'enabled', endpoint: process.env.SIEM_ENDPOINT }));
309
+ return;
310
+ }
311
+
312
+ if (req.url.startsWith('/pdf') && options.pdfEnabled) {
313
+ requirePremium('nist-pdf', licenseKey);
314
+ res.writeHead(200, headers);
315
+ res.end(JSON.stringify({ pdf: 'enabled' }));
316
+ return;
317
+ }
318
+
319
+ res.writeHead(404, headers);
320
+ res.end(JSON.stringify({ error: 'Not found' }));
321
+ });
322
+
323
+ server.listen(options.port, options.host, () => {
324
+ console.log(`npm-scan API server running on http://${options.host}:${options.port}`);
325
+ });
326
+ });
327
+
268
328
  program.parse();
@@ -1,16 +1,22 @@
1
1
  apiVersion: v2
2
2
  name: npm-scan
3
- description: npm supply chain security scanner — Helm chart for Kubernetes deployment
3
+ description: npm supply chain security scanner — BYOC Helm chart for enterprise/government deployments
4
4
  type: application
5
- version: 0.5.0
6
- appVersion: "0.5.0"
5
+ version: 1.0.0
6
+ appVersion: "1.0.0"
7
7
  keywords:
8
8
  - npm
9
9
  - security
10
10
  - supply-chain
11
11
  - scanner
12
+ - byoc
13
+ - stig
14
+ - fips
15
+ - soc2
16
+ - fedramp
12
17
  sources:
13
- - https://github.com/YOUR_GITHUB_USERNAME/npm-scan
18
+ - https://github.com/lateos-ai/npm-scan
14
19
  maintainers:
15
20
  - name: Lateos
16
- email: hello@lateos.ai
21
+ email: hello@lateos.ai
22
+ dependencies: []
@@ -5,6 +5,8 @@ metadata:
5
5
  labels:
6
6
  app: {{ include "npm-scan.name" . }}-api
7
7
  {{- include "npm-scan.labels" . | nindent 4 }}
8
+ annotations:
9
+ stig: "SRG-APP-000141"
8
10
  spec:
9
11
  replicas: {{ .Values.api.replicas }}
10
12
  selector:
@@ -19,7 +21,7 @@ spec:
19
21
  - name: api
20
22
  image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
21
23
  imagePullPolicy: {{ .Values.image.pullPolicy }}
22
- command: ["python", "-m", "api.main"]
24
+ command: ["node", "cli/cli.js", "serve"]
23
25
  ports:
24
26
  - containerPort: {{ .Values.api.port }}
25
27
  env:
@@ -33,6 +35,32 @@ spec:
33
35
  name: {{ include "npm-scan.name" . }}-license
34
36
  key: key
35
37
  optional: true
38
+ - name: NPM_SCAN_PREMIUM
39
+ value: "{{ .Values.premium.enabled }}"
40
+ {{- if .Values.premium.byoc.enabled }}
41
+ - name: NPM_SCAN_BYOC
42
+ value: "true"
43
+ - name: NPM_SCAN_CLOUD_PROVIDER
44
+ value: "{{ .Values.premium.byoc.cloudProvider }}"
45
+ {{- end }}
46
+ {{- if .Values.siem.enabled }}
47
+ - name: SIEM_ENABLED
48
+ value: "true"
49
+ - name: SIEM_TYPE
50
+ value: "{{ .Values.siem.type }}"
51
+ - name: SIEM_ENDPOINT
52
+ value: "{{ .Values.siem.endpoint }}"
53
+ - name: SIEM_PORT
54
+ value: "{{ .Values.siem.port }}"
55
+ {{- end }}
56
+ {{- if .Values.sso.enabled }}
57
+ - name: SSO_ENABLED
58
+ value: "true"
59
+ - name: SSO_PROVIDER
60
+ value: "{{ .Values.sso.provider }}"
61
+ - name: SSO_ISSUER_URL
62
+ value: "{{ .Values.sso.issuerUrl }}"
63
+ {{- end }}
36
64
  {{- if .Values.postgresql.enabled }}
37
65
  - name: PG_HOST
38
66
  value: "{{ .Values.postgresql.host }}"
@@ -0,0 +1,75 @@
1
+ # BYOC Enterprise values example
2
+ # Deploy to your VPC: helm install -f values.byoc.yaml npm-scan ./
3
+
4
+ image:
5
+ repository: ghcr.io/lateos/npm-scan
6
+ tag: "1.0.0"
7
+
8
+ premium:
9
+ enabled: true
10
+ edition: enterprise
11
+ byoc:
12
+ enabled: true
13
+ cloudProvider: aws
14
+ vpcId: vpc-0123456789abcdef0
15
+ region: us-east-1
16
+ clusterName: npm-scan-enterprise
17
+ externalDb: true
18
+ externalRedis: true
19
+
20
+ license:
21
+ key: "npm-scan-enterprise-XXXXX.YOUR-SIGNATURE-HERE"
22
+ secret: "your-license-secret"
23
+
24
+ siem:
25
+ enabled: true
26
+ type: cef
27
+ endpoint: log-collector.your-company.com
28
+ port: 514
29
+ protocol: tcp
30
+
31
+ pdf:
32
+ enabled: true
33
+
34
+ sso:
35
+ enabled: true
36
+ provider: oidc
37
+ clientId: npm-scan-enterprise
38
+ issuerUrl: https://sso.your-company.com/realms/enterprise
39
+
40
+ postgresql:
41
+ enabled: false
42
+ host: your-rds-endpoint.rds.amazonaws.com
43
+ port: 5432
44
+ database: npm_scan
45
+ username: npm_scan
46
+ password: ""
47
+
48
+ redis:
49
+ enabled: false
50
+ host: your-redis-endpoint.cache.amazonaws.com
51
+ port: 6379
52
+
53
+ ingress:
54
+ enabled: true
55
+ className: nginx
56
+ host: npm-scan.your-company.com
57
+ tls:
58
+ - secretName: npm-scan-tls
59
+ hosts:
60
+ - npm-scan.your-company.com
61
+
62
+ persistence:
63
+ enabled: true
64
+ size: 50Gi
65
+ storageClass: gp3
66
+
67
+ worker:
68
+ replicas: 4
69
+ resources:
70
+ requests:
71
+ cpu: 500m
72
+ memory: 1Gi
73
+ limits:
74
+ cpu: 2
75
+ memory: 2Gi
@@ -1,4 +1,4 @@
1
- # Helm values for npm-scan
1
+ # Helm values for npm-scan BYOC
2
2
  # Override per environment: helm install -f values-prod.yaml
3
3
 
4
4
  image:
@@ -9,10 +9,40 @@ image:
9
9
  replicaCount: 1
10
10
 
11
11
  license:
12
- # --license-key or NPM_SCAN_LICENSE_KEY env var
13
12
  key: ""
14
13
  secret: ""
15
14
 
15
+ premium:
16
+ enabled: false
17
+ edition: premium
18
+ byoc:
19
+ enabled: false
20
+ cloudProvider: ""
21
+ vpcId: ""
22
+ region: ""
23
+ clusterName: ""
24
+ externalDb: true
25
+ externalRedis: true
26
+
27
+ siem:
28
+ enabled: false
29
+ type: cef
30
+ endpoint: ""
31
+ port: 514
32
+ protocol: tcp
33
+ apiKey: ""
34
+
35
+ pdf:
36
+ enabled: false
37
+
38
+ sso:
39
+ enabled: false
40
+ provider: oidc
41
+ clientId: ""
42
+ clientSecret: ""
43
+ issuerUrl: ""
44
+ allowedDomains: []
45
+
16
46
  postgresql:
17
47
  enabled: true
18
48
  host: ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lateos/npm-scan",
3
- "version": "0.9.9",
3
+ "version": "0.10.1",
4
4
  "description": "Modern npm supply chain security scanner — detects obfuscated payloads, credential stealers, conditional triggers, sandbox evasion, and worm-like propagation. 11 attack types, SBOM, NIST/EU CRA compliance reporting.",
5
5
  "main": "backend/index.js",
6
6
  "bin": {
@@ -10,8 +10,9 @@
10
10
  "license": "Apache-2.0",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/lateos-ai/npm-scan.git"
13
+ "url": "git+https://github.com/lateos-ai/npm-scan.git"
14
14
  },
15
+ "readmeFilename": "README.md",
15
16
  "keywords": [
16
17
  "npm",
17
18
  "security",