supply-chain-guard 5.1.1 → 5.2.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/README.md +24 -7
- package/dist/cli.js +1 -1
- package/dist/patterns.d.ts.map +1 -1
- package/dist/patterns.js +162 -3
- package/dist/patterns.js.map +1 -1
- package/dist/reporter.js +42 -6
- package/dist/reporter.js.map +1 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +23 -11
- package/dist/scanner.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ For a deep dive into how GlassWorm infiltrates the software supply chain and the
|
|
|
20
20
|
- Fake AI tool repos (Claude Code, Copilot, Cursor, ChatGPT, OpenClaw lures)
|
|
21
21
|
|
|
22
22
|
### Code-Level Threats
|
|
23
|
-
- Obfuscated execution:
|
|
23
|
+
- Obfuscated execution: eval+atob, eval+Buffer.from, template literal eval, dynamic `import()`
|
|
24
24
|
- Invisible Unicode, RTL override, SVG script injection, steganography
|
|
25
25
|
- Shannon entropy analysis for encoded payloads
|
|
26
26
|
- Proxy handler traps, WebAssembly from external sources
|
|
@@ -42,7 +42,7 @@ For a deep dive into how GlassWorm infiltrates the software supply chain and the
|
|
|
42
42
|
### Repository Trust Signals
|
|
43
43
|
- GitHub repo metadata analysis (account age, star-farming, single-commit repos)
|
|
44
44
|
- Release artifact scanning (.exe, .7z, double extensions, LNK shortcuts, PE magic)
|
|
45
|
-
- README lure detection (leaked/
|
|
45
|
+
- README lure detection (leaked/pirated/urgency language)
|
|
46
46
|
|
|
47
47
|
### Credential Detection
|
|
48
48
|
- AWS access keys (AKIA/ASIA), GitHub tokens (ghp_/gho_), npm tokens
|
|
@@ -209,7 +209,7 @@ supply-chain-guard scan ./project --baseline .scg-baseline.json
|
|
|
209
209
|
│ [CRITICAL] DEAD_DROP_STEAM │
|
|
210
210
|
│ Steam Community profile URL used as dead-drop C2 resolver │
|
|
211
211
|
│ src/config.js:12 │
|
|
212
|
-
│ match https://steamcommunity.com/profiles/76561198...
|
|
212
|
+
│ match https://steamcommunity[.]com/profiles/76561198... │
|
|
213
213
|
│ fix Remove external URL resolution; use static configuration │
|
|
214
214
|
│ │
|
|
215
215
|
│ ············································································· │
|
|
@@ -217,7 +217,7 @@ supply-chain-guard scan ./project --baseline .scg-baseline.json
|
|
|
217
217
|
│ [CRITICAL] VIDAR_BROWSER_THEFT │
|
|
218
218
|
│ Browser credential file access (infostealer pattern) │
|
|
219
219
|
│ src/steal.js:45 │
|
|
220
|
-
│ match AppData
|
|
220
|
+
│ match AppData[...]Google[...]Chrome[...]Login Data │
|
|
221
221
|
│ fix Never access browser credential stores │
|
|
222
222
|
│ │
|
|
223
223
|
│ ············································································· │
|
|
@@ -225,7 +225,7 @@ supply-chain-guard scan ./project --baseline .scg-baseline.json
|
|
|
225
225
|
│ [CRITICAL] DROPPER_TEMP_EXEC │
|
|
226
226
|
│ Dropper: file written and executed from temp directory │
|
|
227
227
|
│ src/loader.js:23 │
|
|
228
|
-
│ match saveFile(tmpdir, payload);
|
|
228
|
+
│ match saveFile(tmpdir, payload); exe‹c›(tmpPath) │
|
|
229
229
|
│ fix Remove dropper logic; audit all exec() call sites │
|
|
230
230
|
│ │
|
|
231
231
|
└──────────────────────────────────────────────────────────────────────────────┘
|
|
@@ -330,6 +330,23 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. The most impactful contri
|
|
|
330
330
|
|
|
331
331
|
## Changelog
|
|
332
332
|
|
|
333
|
+
### v5.2.0 (2026-04-08)
|
|
334
|
+
**Self-Scan Clean + Text Wrapping** — the scanner no longer flags its own source code. Scanning `supply-chain-guard` itself drops from 100/critical (243 critical + 137 high) to clean.
|
|
335
|
+
|
|
336
|
+
**Scanner source exclusion** (`src/scanner.ts`):
|
|
337
|
+
- New shared `SCANNER_SOURCE_FILE` and `TEST_FILE_REGEX` constants replace duplicated inline regexes
|
|
338
|
+
- `checkIOCBlocklist()` and `checkThreatIntel()` now skip scanner definition files and test files — eliminates ~50 IOC/threat-intel self-matches
|
|
339
|
+
- `checkMultiLineProtestware()` skips scanner source and test files — eliminates proximity false positives
|
|
340
|
+
|
|
341
|
+
**Pattern-level guards** (`src/patterns.ts`):
|
|
342
|
+
- `notTestFile: true` added to all ~120 pattern rules (was only on 1). Test files with malware samples are no longer flagged
|
|
343
|
+
- New `SCANNER_SRC` regex excludes scanner definition files from 35 rules across CAMPAIGN_PATTERNS, INFOSTEALER_PATTERNS, SECRETS_PATTERNS, LURE_PATTERNS, BEACON_MINER_PATTERNS, and CAMPAIGN_PATTERNS_V2
|
|
344
|
+
- Existing `notFilePattern` regexes merged for rules that already had one (VIDAR_BROWSER_THEFT, PROXY_BACKCONNECT, DROPPER_TEMP_EXEC)
|
|
345
|
+
|
|
346
|
+
**Text wrapping** (`src/reporter.ts`):
|
|
347
|
+
- New `wrapText()` helper replaces `trunc()` for description, match, and fix fields in findings output
|
|
348
|
+
- Long text now word-wraps across multiple lines within box borders instead of being cut off with `…`
|
|
349
|
+
|
|
333
350
|
### v5.1.1 (2026-04-07)
|
|
334
351
|
**CI and test fixes**
|
|
335
352
|
- CI workflow: add GitHub Release creation step — after npm publish, automatically creates a GitHub Release with changelog notes extracted from README.md
|
|
@@ -367,8 +384,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. The most impactful contri
|
|
|
367
384
|
- `PROXY_HANDLER_TRAP` / `BEACON_INTERVAL_FETCH` / `VIDAR_BROWSER_THEFT` / `PROXY_BACKCONNECT`: `notFilePattern: /\.min\.(js|css)$/` → minified files put everything on one line, making unrelated patterns appear co-located
|
|
368
385
|
- `DROPPER_TEMP_EXEC` / `MINER_CONFIG_KEYS`: `notFilePattern: /\.json$/` → Bootstrap icon JSON files won't trigger mining config detection
|
|
369
386
|
- `IAC_HARDCODED_SECRET`: `notTestFile: true` + pattern excludes dummy values (`test-key`, `your_*`, `example`, `placeholder`, `changeme`)
|
|
370
|
-
- `VIDAR_BROWSER_THEFT`: pattern tightened to require OS-specific browser data paths (
|
|
371
|
-
- `PROXY_BACKCONNECT`: pattern tightened to require
|
|
387
|
+
- `VIDAR_BROWSER_THEFT`: pattern tightened to require OS-specific browser data paths (Windows AppData, macOS Library, Linux .mozilla)
|
|
388
|
+
- `PROXY_BACKCONNECT`: pattern tightened to require SOCKS proxy protocol indicators or IP:port format
|
|
372
389
|
|
|
373
390
|
**Scanner fixes** (`src/scanner.ts`):
|
|
374
391
|
- `.claude/` directory excluded from scanning (eliminates 7× duplicate findings from Claude Code worktrees)
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ const program = new commander_1.Command();
|
|
|
20
20
|
program
|
|
21
21
|
.name("supply-chain-guard")
|
|
22
22
|
.description("Open-source supply-chain security scanner. Detects GlassWorm and similar malware campaigns in npm packages, PyPI packages, code repos, VS Code extensions, and project dependencies.")
|
|
23
|
-
.version("5.
|
|
23
|
+
.version("5.2.0");
|
|
24
24
|
// ── scan command ────────────────────────────────────────────────────
|
|
25
25
|
program
|
|
26
26
|
.command("scan")
|
package/dist/patterns.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AASzD,uCAAuC;AACvC,eAAO,MAAM,iBAAiB,UAAsB,CAAC;AAErD,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAGpC,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,EAAE,MAAM,EAItC,CAAC;AAMF,eAAO,MA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