supply-chain-guard 6.2.5 → 6.3.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 (183) hide show
  1. package/README.md +192 -39
  2. package/action.yml +3 -3
  3. package/dist/attack-graph.d.ts.map +1 -1
  4. package/dist/attack-graph.js +7 -2
  5. package/dist/attack-graph.js.map +1 -1
  6. package/dist/broad-gap-pattern-matchers.d.ts +24 -0
  7. package/dist/broad-gap-pattern-matchers.d.ts.map +1 -1
  8. package/dist/broad-gap-pattern-matchers.js +287 -12
  9. package/dist/broad-gap-pattern-matchers.js.map +1 -1
  10. package/dist/cargo-scanner.d.ts +8 -0
  11. package/dist/cargo-scanner.d.ts.map +1 -1
  12. package/dist/cargo-scanner.js +70 -4
  13. package/dist/cargo-scanner.js.map +1 -1
  14. package/dist/catalog-digest.d.ts +4 -4
  15. package/dist/catalog-digest.js +4 -4
  16. package/dist/cli.js +2 -2
  17. package/dist/cli.js.map +1 -1
  18. package/dist/composer-scanner.js +4 -2
  19. package/dist/composer-scanner.js.map +1 -1
  20. package/dist/config-scanner.js +2 -1
  21. package/dist/config-scanner.js.map +1 -1
  22. package/dist/container-image.d.ts +63 -0
  23. package/dist/container-image.d.ts.map +1 -0
  24. package/dist/container-image.js +409 -0
  25. package/dist/container-image.js.map +1 -0
  26. package/dist/dependency-confusion.d.ts +23 -1
  27. package/dist/dependency-confusion.d.ts.map +1 -1
  28. package/dist/dependency-confusion.js +102 -20
  29. package/dist/dependency-confusion.js.map +1 -1
  30. package/dist/dependency-governance.d.ts +11 -0
  31. package/dist/dependency-governance.d.ts.map +1 -1
  32. package/dist/dependency-governance.js +39 -13
  33. package/dist/dependency-governance.js.map +1 -1
  34. package/dist/disguised-asset.d.ts +31 -0
  35. package/dist/disguised-asset.d.ts.map +1 -0
  36. package/dist/disguised-asset.js +79 -0
  37. package/dist/disguised-asset.js.map +1 -0
  38. package/dist/dockerfile-scanner.d.ts.map +1 -1
  39. package/dist/dockerfile-scanner.js +7 -1
  40. package/dist/dockerfile-scanner.js.map +1 -1
  41. package/dist/ecosystem-registry.d.ts +51 -0
  42. package/dist/ecosystem-registry.d.ts.map +1 -0
  43. package/dist/ecosystem-registry.js +873 -0
  44. package/dist/ecosystem-registry.js.map +1 -0
  45. package/dist/entropy.d.ts +13 -0
  46. package/dist/entropy.d.ts.map +1 -1
  47. package/dist/entropy.js +44 -1
  48. package/dist/entropy.js.map +1 -1
  49. package/dist/extension-identity.d.ts +56 -0
  50. package/dist/extension-identity.d.ts.map +1 -0
  51. package/dist/extension-identity.js +172 -0
  52. package/dist/extension-identity.js.map +1 -0
  53. package/dist/feed.js +2 -1
  54. package/dist/feed.js.map +1 -1
  55. package/dist/github-actions-scanner.d.ts +24 -1
  56. package/dist/github-actions-scanner.d.ts.map +1 -1
  57. package/dist/github-actions-scanner.js +173 -40
  58. package/dist/github-actions-scanner.js.map +1 -1
  59. package/dist/go-scanner.d.ts +7 -0
  60. package/dist/go-scanner.d.ts.map +1 -1
  61. package/dist/go-scanner.js +66 -3
  62. package/dist/go-scanner.js.map +1 -1
  63. package/dist/install-guard.d.ts +1 -1
  64. package/dist/install-guard.d.ts.map +1 -1
  65. package/dist/install-guard.js +16 -3
  66. package/dist/install-guard.js.map +1 -1
  67. package/dist/install-hook-scanner.d.ts +26 -0
  68. package/dist/install-hook-scanner.d.ts.map +1 -1
  69. package/dist/install-hook-scanner.js +114 -7
  70. package/dist/install-hook-scanner.js.map +1 -1
  71. package/dist/internal-disclosure.d.ts.map +1 -1
  72. package/dist/internal-disclosure.js +289 -12
  73. package/dist/internal-disclosure.js.map +1 -1
  74. package/dist/ioc-blocklist.d.ts +1 -1
  75. package/dist/ioc-blocklist.d.ts.map +1 -1
  76. package/dist/ioc-blocklist.js +64 -7
  77. package/dist/ioc-blocklist.js.map +1 -1
  78. package/dist/lockfile-checker.d.ts +14 -4
  79. package/dist/lockfile-checker.d.ts.map +1 -1
  80. package/dist/lockfile-checker.js +86 -12
  81. package/dist/lockfile-checker.js.map +1 -1
  82. package/dist/lockfile-feed.d.ts +60 -0
  83. package/dist/lockfile-feed.d.ts.map +1 -0
  84. package/dist/lockfile-feed.js +131 -0
  85. package/dist/lockfile-feed.js.map +1 -0
  86. package/dist/maven-scanner.d.ts +52 -0
  87. package/dist/maven-scanner.d.ts.map +1 -0
  88. package/dist/maven-scanner.js +494 -0
  89. package/dist/maven-scanner.js.map +1 -0
  90. package/dist/mcp-scanner.d.ts +7 -0
  91. package/dist/mcp-scanner.d.ts.map +1 -1
  92. package/dist/mcp-scanner.js +5 -2
  93. package/dist/mcp-scanner.js.map +1 -1
  94. package/dist/mcp-server.d.ts +28 -0
  95. package/dist/mcp-server.d.ts.map +1 -1
  96. package/dist/mcp-server.js +114 -22
  97. package/dist/mcp-server.js.map +1 -1
  98. package/dist/nested-manifests.d.ts +28 -0
  99. package/dist/nested-manifests.d.ts.map +1 -0
  100. package/dist/nested-manifests.js +69 -0
  101. package/dist/nested-manifests.js.map +1 -0
  102. package/dist/npm-scanner.d.ts.map +1 -1
  103. package/dist/npm-scanner.js +12 -4
  104. package/dist/npm-scanner.js.map +1 -1
  105. package/dist/nuget-scanner.d.ts +5 -0
  106. package/dist/nuget-scanner.d.ts.map +1 -1
  107. package/dist/nuget-scanner.js +47 -5
  108. package/dist/nuget-scanner.js.map +1 -1
  109. package/dist/osv-export.d.ts.map +1 -1
  110. package/dist/osv-export.js +3 -5
  111. package/dist/osv-export.js.map +1 -1
  112. package/dist/pattern-applicability.d.ts +7 -0
  113. package/dist/pattern-applicability.d.ts.map +1 -1
  114. package/dist/pattern-applicability.js +51 -1
  115. package/dist/pattern-applicability.js.map +1 -1
  116. package/dist/patterns.d.ts +25 -0
  117. package/dist/patterns.d.ts.map +1 -1
  118. package/dist/patterns.js +93 -20
  119. package/dist/patterns.js.map +1 -1
  120. package/dist/policy-engine.d.ts +13 -0
  121. package/dist/policy-engine.d.ts.map +1 -1
  122. package/dist/policy-engine.js +24 -1
  123. package/dist/policy-engine.js.map +1 -1
  124. package/dist/pub-scanner.d.ts +42 -0
  125. package/dist/pub-scanner.d.ts.map +1 -0
  126. package/dist/pub-scanner.js +395 -0
  127. package/dist/pub-scanner.js.map +1 -0
  128. package/dist/publishing-anomaly-detector.d.ts +8 -0
  129. package/dist/publishing-anomaly-detector.d.ts.map +1 -1
  130. package/dist/publishing-anomaly-detector.js +12 -3
  131. package/dist/publishing-anomaly-detector.js.map +1 -1
  132. package/dist/pypi-scanner.js +1 -1
  133. package/dist/python-lockfile-scanner.d.ts +16 -1
  134. package/dist/python-lockfile-scanner.d.ts.map +1 -1
  135. package/dist/python-lockfile-scanner.js +67 -4
  136. package/dist/python-lockfile-scanner.js.map +1 -1
  137. package/dist/remediation-engine.d.ts +15 -0
  138. package/dist/remediation-engine.d.ts.map +1 -1
  139. package/dist/remediation-engine.js +27 -4
  140. package/dist/remediation-engine.js.map +1 -1
  141. package/dist/reporter.d.ts.map +1 -1
  142. package/dist/reporter.js +74 -12
  143. package/dist/reporter.js.map +1 -1
  144. package/dist/rubygems-scanner.js +4 -2
  145. package/dist/rubygems-scanner.js.map +1 -1
  146. package/dist/sbom-generator.js +1 -1
  147. package/dist/scanner.d.ts.map +1 -1
  148. package/dist/scanner.js +265 -114
  149. package/dist/scanner.js.map +1 -1
  150. package/dist/skills-scanner.d.ts +52 -0
  151. package/dist/skills-scanner.d.ts.map +1 -1
  152. package/dist/skills-scanner.js +386 -63
  153. package/dist/skills-scanner.js.map +1 -1
  154. package/dist/terraform-scanner.d.ts +88 -0
  155. package/dist/terraform-scanner.d.ts.map +1 -0
  156. package/dist/terraform-scanner.js +410 -0
  157. package/dist/terraform-scanner.js.map +1 -0
  158. package/dist/text-lines.d.ts +49 -0
  159. package/dist/text-lines.d.ts.map +1 -0
  160. package/dist/text-lines.js +119 -0
  161. package/dist/text-lines.js.map +1 -0
  162. package/dist/threat-intel.d.ts +25 -2
  163. package/dist/threat-intel.d.ts.map +1 -1
  164. package/dist/threat-intel.js +841 -545
  165. package/dist/threat-intel.js.map +1 -1
  166. package/dist/types.d.ts +22 -1
  167. package/dist/types.d.ts.map +1 -1
  168. package/dist/types.js.map +1 -1
  169. package/dist/vscode-scanner.d.ts.map +1 -1
  170. package/dist/vscode-scanner.js +17 -5
  171. package/dist/vscode-scanner.js.map +1 -1
  172. package/dist/workflow-ast.d.ts.map +1 -1
  173. package/dist/workflow-ast.js +24 -8
  174. package/dist/workflow-ast.js.map +1 -1
  175. package/dist/workflow-graph.d.ts.map +1 -1
  176. package/dist/workflow-graph.js +4 -2
  177. package/dist/workflow-graph.js.map +1 -1
  178. package/dist/workflow-modeler.d.ts +42 -0
  179. package/dist/workflow-modeler.d.ts.map +1 -1
  180. package/dist/workflow-modeler.js +585 -22
  181. package/dist/workflow-modeler.js.map +1 -1
  182. package/package.json +20 -6
  183. package/self-scan-manifest.json +18 -18
package/README.md CHANGED
@@ -1,20 +1,67 @@
1
1
  # supply-chain-guard
2
2
 
3
- Open-source supply-chain security scanner for npm, PyPI, Cargo, Go, RubyGems, Composer, NuGet, Docker, Terraform, VS Code extensions, GitHub Actions and GitHub repositories. Detects malware campaigns (GlassWorm, Vidar, Shai-Hulud), fake AI tool repos, account takeovers, and 350+ threat indicators across all major lockfile formats (npm, pnpm, yarn, bun). Generates CycloneDX 1.6 SBOMs with real dependency inventories, grades SLSA provenance (parses and structurally validates in-toto/DSSE attestations), and correlates findings into attack-chain incidents. Supports EU Cyber Resilience Act SBOM and component-documentation work, and NIS2 supply chain risk-management measures.
3
+ Open-source supply-chain security scanner that runs locally and offline. It matches known-malicious packages, extensions, plugins, providers, container images and CI actions in 15 ecosystems, with tested matchers ready for more (see Ecosystem Coverage), reading manifests and lockfiles at any depth of a repository, including the transitive dependencies a lockfile pins; and it analyses what you install for malware behavior: GlassWorm, Vidar, Shai-Hulud, fake AI tool repos, account takeovers and 350+ threat indicators in all. It generates CycloneDX 1.6 SBOMs with real dependency inventories, grades SLSA provenance (parses and structurally validates in-toto/DSSE attestations), and correlates findings into attack-chain incidents. Supports EU Cyber Resilience Act SBOM and component-documentation work, and NIS2 supply chain risk-management measures.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/supply-chain-guard?logo=npm)](https://www.npmjs.com/package/supply-chain-guard)
6
6
  [![npm downloads](https://img.shields.io/npm/dw/supply-chain-guard?logo=npm&label=weekly%20downloads)](https://www.npmjs.com/package/supply-chain-guard)
7
7
  [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D22-green?logo=node.js)](https://nodejs.org)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-Strict-blue?logo=typescript)](https://www.typescriptlang.org/)
9
9
  [![CI](https://img.shields.io/github/actions/workflow/status/homeofe/supply-chain-guard/ci.yml?branch=main&label=CI&logo=github)](https://github.com/homeofe/supply-chain-guard/actions/workflows/ci.yml)
10
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/homeofe/supply-chain-guard/badge)](https://scorecard.dev/viewer/?uri=github.com/homeofe/supply-chain-guard)
11
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14934/badge)](https://www.bestpractices.dev/projects/14934)
10
12
  [![AAHP Verify](https://github.com/homeofe/supply-chain-guard/actions/workflows/aahp-verify.yml/badge.svg)](https://github.com/homeofe/supply-chain-guard/actions/workflows/aahp-verify.yml)
11
13
  [![AAHP conformant](https://img.shields.io/badge/AAHP-conformant-5b47d6)](https://github.com/homeofe/AAHP)
12
14
  [![Last commit](https://img.shields.io/github/last-commit/homeofe/supply-chain-guard?logo=github)](https://github.com/homeofe/supply-chain-guard/commits/main)
13
- [![scanned by supply-chain-guard](https://img.shields.io/badge/scanned%20by-supply--chain--guard-2ea44f?logo=npm&logoColor=white)](https://github.com/homeofe/supply-chain-guard)
15
+ [![scanned by supply-chain-guard](https://github.com/homeofe/supply-chain-guard/actions/workflows/self-scan.yml/badge.svg?branch=main)](https://github.com/homeofe/supply-chain-guard/actions/workflows/self-scan.yml)
14
16
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
15
17
 
16
18
  ![supply-chain-guard scanning a malicious npm package: risk gauges, GlassWorm incident correlation, and a remediation plan](assets/demo.gif)
17
19
 
20
+ ## Start in 30 seconds
21
+
22
+ Scan a project. No account, no configuration, and the scan itself makes no
23
+ network request:
24
+
25
+ ```bash
26
+ npx supply-chain-guard scan .
27
+ ```
28
+
29
+ It exits `1` on a high finding or a scan that could not examine everything, and
30
+ `2` on a critical finding, so it can gate a script as it is. To add the historical
31
+ package catalog, run `npx supply-chain-guard feed refresh` with network access in
32
+ the directory you scan from. The catalog is cached there in `.scg-cache` and
33
+ belongs to the installed version, so refresh again after an upgrade.
34
+
35
+ Gate every pull request:
36
+
37
+ ```yaml
38
+ - uses: actions/checkout@v4
39
+ - uses: homeofe/supply-chain-guard@v6.3.0
40
+ ```
41
+
42
+ Let your AI coding agent check a package before it installs it (MCP):
43
+
44
+ ```bash
45
+ npm install -g supply-chain-guard
46
+ claude mcp add supply-chain-guard supply-chain-guard mcp
47
+ ```
48
+
49
+ Every release is published to npm from this repository's CI with a signed
50
+ [SLSA provenance attestation](https://www.npmjs.com/package/supply-chain-guard),
51
+ and the Action installs that exact version. Each GitHub Release also carries
52
+ the tarball with that provenance as a Sigstore bundle (`.sigstore.json`). To check
53
+ one yourself:
54
+
55
+ ```bash
56
+ gh attestation verify supply-chain-guard-X.Y.Z.tgz \
57
+ --bundle supply-chain-guard-X.Y.Z.tgz.sigstore.json \
58
+ --repo homeofe/supply-chain-guard --digest-alg sha512
59
+ ```
60
+
61
+ Everything else, from output
62
+ formats to policies, is further down: [Quickstart](#quickstart),
63
+ [GitHub Action](#github-action), [For AI Coding Agents (MCP)](#for-ai-coding-agents-mcp).
64
+
18
65
  ## Contents
19
66
 
20
67
  - [Background](#background)
@@ -28,7 +75,7 @@ Open-source supply-chain security scanner for npm, PyPI, Cargo, Go, RubyGems, Co
28
75
  - [Policy Configuration](#policy-configuration-v44)
29
76
  - [Baseline Diffing](#baseline-diffing-v44)
30
77
  - [Example Output](#example-output)
31
- - [Supported Ecosystems](#supported-ecosystems)
78
+ - [Ecosystem Coverage](#ecosystem-coverage)
32
79
  - [How It Compares](#how-it-compares)
33
80
  - [GitHub Action](#github-action)
34
81
  - [For AI Coding Agents (MCP)](#for-ai-coding-agents-mcp)
@@ -48,6 +95,24 @@ For a deep dive into how GlassWorm infiltrates the software supply chain and the
48
95
 
49
96
  ## What It Detects
50
97
 
98
+ ### Known-Malicious Packages and Components
99
+ Package, extension, plugin and image identities are matched against the threat feed. This list is
100
+ generated from the indicators that actually ship, so an ecosystem is only named as covered once there
101
+ is something to match:
102
+
103
+ <!-- ecosystem-list:begin (generated by scripts/generate-coverage-table.mjs; edit src/ecosystem-coverage.json) -->
104
+ - Known-malicious indicators ship for 15 ecosystems: npm, PyPI, RubyGems, Composer (PHP), NuGet (.NET), Cargo (Rust), Go modules, Maven / Gradle / SBT / Bazel, Dart / Flutter (pub), Terraform / OpenTofu providers, Container images, GitHub Actions, VS Code / Open VSX extensions, Browser extensions (Chrome, Edge, Firefox) and JetBrains plugins.
105
+ - Homebrew has a tested matcher and ships an indicator, but is not counted: its one indicator (the compromised Trivy tap release 0.69.4) needs a version, and only the legacy Brewfile.lock.json records one; current Homebrew writes no lock file, so a Brewfile alone cannot match it.
106
+ - Matchers are built and tested, but no malicious package is publicly known yet, for 8 more: Swift Package Manager, CocoaPods, Hex (Elixir / Erlang), CRAN (R), Conan (C / C++), Terraform / OpenTofu modules, Helm charts and Ansible Galaxy. They report the day an indicator is published, through the importer or a curated entry.
107
+ <!-- ecosystem-list:end -->
108
+
109
+ - The files read per ecosystem are in [Ecosystem Coverage](#ecosystem-coverage).
110
+ - Manifests and lockfiles are read wherever they sit in the tree, so a monorepo service or a .NET project
111
+ in `src/App/` is covered, and a lockfile's transitive dependencies are matched, not only direct ones.
112
+ - A version pin fires only on the exact malicious release; a hijacked legitimate package is never blocked
113
+ by name. Registry-specific identities stay separate (Marketplace vs Open VSX, Chrome vs Edge, public vs
114
+ private registries), and a commit SHA or image digest matches under any repository name.
115
+
51
116
  ### Malware Campaigns
52
117
  - GlassWorm campaign markers and Solana blockchain C2
53
118
  - Vidar/GhostSocks infostealers (April 2026 Claude Code leak campaign)
@@ -73,10 +138,12 @@ For a deep dive into how GlassWorm infiltrates the software supply chain and the
73
138
  ### Infrastructure & CI/CD
74
139
  - GitHub Actions: unpinned actions, secrets exfiltration, encoded payloads, curl piping
75
140
  - Agentic workflows (GitLost class): AI-agent steps and gh-aw `.github/workflows/*.md` that ingest untrusted issue/PR text, hold a cross-repo token, and can post publicly - the prompt-injection data-leak posture
76
- - Dockerfile / Containerfile: curl pipe, base images on a moving channel tag or without a digest,
77
- hardcoded secrets, SUID bits. Compose `image:` values are out of scope for every Docker rule
78
- (see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md#base-image-pinning-decision-record))
79
- - Terraform/IaC: inline scripts, external modules, hardcoded secrets
141
+ - Dockerfile / Containerfile hardening: curl pipe, base images on a moving channel tag or without a
142
+ digest, hardcoded secrets, SUID bits. These rules read Dockerfile instructions only
143
+ (see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md#base-image-pinning-decision-record)); known-malicious
144
+ images are matched separately in Dockerfiles and in every YAML `image:` value (Compose, Kubernetes,
145
+ workflow containers), see [Ecosystem Coverage](#ecosystem-coverage)
146
+ - Terraform/IaC: inline scripts, external modules, hardcoded secrets; known-malicious providers and registry modules are matched as listed in [Ecosystem Coverage](#ecosystem-coverage)
80
147
  - Package manager configs (.npmrc, .yarnrc, pip.conf): HTTP registries, exposed tokens
81
148
  - Git hooks and submodule security
82
149
 
@@ -142,7 +209,7 @@ Run the scanner as a [pre-commit](https://pre-commit.com) hook (Python-ecosystem
142
209
  ```yaml
143
210
  repos:
144
211
  - repo: https://github.com/homeofe/supply-chain-guard
145
- rev: v6.2.5
212
+ rev: v6.3.0
146
213
  hooks:
147
214
  - id: supply-chain-guard
148
215
  ```
@@ -174,7 +241,7 @@ The hook scans the repository root on every commit and fails on high or critical
174
241
  Run the scanner without a Node toolchain via the official multi-arch image (linux/amd64, linux/arm64), published to GHCR on every release tag:
175
242
 
176
243
  ```bash
177
- docker run --rm -v ${PWD}:/scan ghcr.io/homeofe/supply-chain-guard:6.2.5 scan /scan
244
+ docker run --rm -v ${PWD}:/scan ghcr.io/homeofe/supply-chain-guard:6.3.0 scan /scan
178
245
  ```
179
246
 
180
247
  `${PWD}` works in bash, zsh, and PowerShell; in cmd.exe use `%cd%` instead.
@@ -212,7 +279,7 @@ supply-chain-guard org my-github-org
212
279
  # Scan only files changed since a commit (diff mode)
213
280
  supply-chain-guard scan ./project --since HEAD~5
214
281
 
215
- # Scan with registry version-drift check (requires network)
282
+ # Opt in to public registry queries (requires network; sends package names to npm and PyPI)
216
283
  supply-chain-guard scan ./project --check-registry
217
284
 
218
285
  # Expand every repeated text finding (text groups by rule and file by default)
@@ -659,22 +726,68 @@ supply-chain-guard scan ./project --baseline .scg-baseline.json
659
726
  └──────────────────────────────────────────────────────────────────────────────┘
660
727
  ```
661
728
 
662
- ## Supported Ecosystems
663
-
664
- | Ecosystem | Command | What It Scans |
665
- |-----------|---------|---------------|
666
- | npm | `scan`, `npm` | package.json, install scripts, tarball; lockfiles: package-lock.json, pnpm-lock.yaml, yarn.lock (v1 + Berry), bun.lock |
667
- | PyPI | `pypi` | setup.py, setup.cfg, pyproject.toml, install hooks |
668
- | Cargo/Rust | `scan` | Cargo.toml, build.rs, proc macros |
669
- | Go | `scan` | go.mod, init() functions, CGo, plugin loading |
670
- | RubyGems | `scan` | Gemfile, Gemfile.lock (malicious-gem IOCs, http/git sources) |
671
- | Composer/PHP | `scan` | composer.json, composer.lock (malicious-package IOCs, http repos) |
672
- | NuGet/.NET | `scan` | packages.lock.json, *.csproj, nuget.config (malicious-package IOCs, http feeds) |
673
- | Docker | `scan` | Dockerfile, Dockerfile.*, Containerfile. `docker-compose.yml` is read, but every Docker rule is anchored on a Dockerfile instruction keyword, so Compose `image:` values are not covered |
674
- | Terraform | `scan` | .tf, .hcl files (provisioners, modules, secrets) |
675
- | VS Code | `vscode` | .vsix files, activation events, dangerous APIs |
676
- | GitHub Actions | `scan` | .github/workflows/*.yml |
677
- | GitHub Repos | `repo` | Trust signals, releases, README lures |
729
+ ## Ecosystem Coverage
730
+
731
+ Two different claims live here, and they are proven differently.
732
+
733
+ **Known-malicious identity matching.** For every ecosystem below, a directory scan reads the listed files
734
+ at the scan root and at any depth below it, extracts the package, extension, plugin, provider, image or
735
+ action identities, and matches them against the threat feed: the bundled indicators, and the downloadable
736
+ catalog after `feed refresh`. A version pin fires only on the exact malicious release; a range or a
737
+ constraint in a manifest leaves the version unknown, so only a whole-name entry can match there.
738
+
739
+ This table is generated from [`src/ecosystem-coverage.json`](src/ecosystem-coverage.json) and checked by
740
+ the build (`check:coverage`); it is not written by hand. Every row is proven by
741
+ [`coverage-matrix.test.ts`](src/__tests__/coverage-matrix.test.ts), which puts an indicator into each
742
+ listed file format, at the scan root and one directory down, runs a real scan and requires the rule to
743
+ report it exactly once. A format listed here without such a test fails the test suite. "Indicators shipped"
744
+ says whether any indicator exists today; "none yet (matcher ready)" means the matcher is proven but no
745
+ malicious package is known in that ecosystem yet, and the importer or a curated entry will fill it.
746
+
747
+ <!-- ecosystem-coverage:begin (generated by scripts/generate-coverage-table.mjs; edit src/ecosystem-coverage.json) -->
748
+ | Ecosystem | Files read | Rule | Indicators shipped | Imported automatically from |
749
+ | --- | --- | --- | --- | --- |
750
+ | npm | `package.json`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `bun.lock` | `MALICIOUS_DEPENDENCY`, `LOCKFILE_MALICIOUS_VERSION`, `LOCKFILE_MALICIOUS_PACKAGE` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
751
+ | PyPI | `requirements.txt`, `pyproject.toml`, `poetry.lock`, `uv.lock`, `Pipfile.lock` | `PYTHON_MALICIOUS_PACKAGE` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
752
+ | RubyGems | `Gemfile`, `Gemfile.lock` | `RUBY_MALICIOUS_GEM` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
753
+ | Composer (PHP) | `composer.json`, `composer.lock` | `COMPOSER_MALICIOUS_PACKAGE` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
754
+ | NuGet (.NET) | `packages.lock.json`, `*.csproj`, `packages.config` | `NUGET_MALICIOUS_PACKAGE` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
755
+ | Cargo (Rust) | `Cargo.toml`, `Cargo.lock` | `CARGO_MALICIOUS_CRATE` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
756
+ | Go modules | `go.mod`, `go.sum` | `GO_MALICIOUS_MODULE` | bundle | GitHub Advisory Database, OpenSSF / OSV |
757
+ | Maven / Gradle / SBT / Bazel | `pom.xml`, `gradle.lockfile`, `build.gradle`, `build.gradle.kts`, `libs.versions.toml`, `build.sbt`, `maven_install.json` | `MAVEN_MALICIOUS_PACKAGE` | bundle + catalog | GitHub Advisory Database, OpenSSF / OSV |
758
+ | Dart / Flutter (pub) | `pubspec.lock`, `pubspec.yaml` | `PUB_MALICIOUS_PACKAGE` | bundle | GitHub Advisory Database, OSV |
759
+ | Swift Package Manager | `Package.resolved`, `Package.swift` | `SWIFT_MALICIOUS_PACKAGE` | none yet (matcher ready) | GitHub Advisory Database, OSV (SwiftURL) |
760
+ | CocoaPods | `Podfile.lock`, `Podfile` | `COCOAPODS_MALICIOUS_POD` | none yet (matcher ready) | curated only |
761
+ | Hex (Elixir / Erlang) | `mix.lock`, `mix.exs` | `HEX_MALICIOUS_PACKAGE` | none yet (matcher ready) | GitHub Advisory Database, OSV |
762
+ | CRAN (R) | `renv.lock`, `DESCRIPTION` | `CRAN_MALICIOUS_PACKAGE` | none yet (matcher ready) | OSV |
763
+ | Conan (C / C++) | `conan.lock`, `conanfile.txt`, `conanfile.py` | `CONAN_MALICIOUS_PACKAGE` | none yet (matcher ready) | curated only |
764
+ | Terraform / OpenTofu providers | `*.tf (required_providers)`, `.terraform.lock.hcl` | `TERRAFORM_MALICIOUS_PROVIDER` | bundle | curated only |
765
+ | Terraform / OpenTofu modules | `*.tf (module)`, `.terraform/modules/modules.json` | `TERRAFORM_MALICIOUS_MODULE` | none yet (matcher ready) | curated only |
766
+ | Helm charts | `Chart.yaml`, `Chart.lock` | `HELM_MALICIOUS_CHART` | none yet (matcher ready) | curated only |
767
+ | Ansible Galaxy | `requirements.yml`, `galaxy.yml` | `ANSIBLE_MALICIOUS_CONTENT` | none yet (matcher ready) | curated only |
768
+ | Container images | `Dockerfile`, `docker-compose.yml`, `Kubernetes manifest (image:)` | `DOCKER_MALICIOUS_IMAGE` | bundle | curated only |
769
+ | GitHub Actions | `.github/workflows/*.yml`, `action.yml (composite)` | `GHA_KNOWN_MALICIOUS_SHA` | bundle | curated only |
770
+ | Homebrew | `Brewfile`, `Brewfile.lock.json` | `HOMEBREW_MALICIOUS_PACKAGE` | bundle (legacy format only) | curated only |
771
+ | VS Code / Open VSX extensions | `.vscode/extensions.json`, `devcontainer.json`, `installed extension package.json` | `VSCODE_MALICIOUS_EXTENSION` | bundle + catalog | OpenSSF / OSV (VSCode) |
772
+ | Browser extensions (Chrome, Edge, Firefox) | `Chromium policy JSON`, `Firefox policies.json`, `installed Chromium extension`, `Firefox extension manifest` | `BROWSER_MALICIOUS_EXTENSION` | bundle | curated only |
773
+ | JetBrains plugins | `.idea/externalDependencies.xml`, `META-INF/plugin.xml` | `JETBRAINS_MALICIOUS_PLUGIN` | bundle | curated only |
774
+ <!-- ecosystem-coverage:end -->
775
+
776
+ **Behavior and hardening analysis.** Independent of the feed, these read what a package or repository
777
+ actually does:
778
+
779
+ | Target | Command | What It Scans |
780
+ |--------|---------|---------------|
781
+ | npm package | `npm <pkg>`, `scan` | package.json install scripts and tarball contents: install-hook chains, obfuscation, exfiltration |
782
+ | PyPI package | `pypi <pkg>` | setup.py, setup.cfg, pyproject.toml build hooks and package contents |
783
+ | VS Code / Open VSX extension | `vscode <id or .vsix>` | activation events, dangerous APIs and bundled code, plus the extension's own identity |
784
+ | Source trees | `scan` | code patterns across JavaScript, TypeScript, Python, shell, Go, Rust and more |
785
+ | Cargo / Go | `scan` | build.rs, proc macros, go.mod replace directives, init() functions, CGo |
786
+ | Docker | `scan` | Dockerfile, Dockerfile.*, Containerfile hardening (instructions only) |
787
+ | Terraform | `scan` | provisioners, external module sources, hardcoded secrets |
788
+ | GitHub Actions | `scan` | .github/workflows: unpinned actions, secrets exfiltration, injection, agentic workflows |
789
+ | npm lockfiles | `scan` | integrity hashes, non-registry resolved URLs, version downgrades (package-lock.json, pnpm-lock.yaml, yarn.lock v1 and Berry, bun.lock) |
790
+ | GitHub repositories | `repo` | trust signals, releases, README lures |
678
791
  | Solana | `monitor` | C2 wallet memo transactions |
679
792
 
680
793
  ## How It Compares
@@ -685,7 +798,7 @@ There is one axis where it goes somewhere the others do not go at all. Credentia
685
798
 
686
799
  | Tool | Focus | Malware / behavior detection | Known-CVE lookup | Ecosystems | Open source | Account needed |
687
800
  |---|---|---|---|---|---|---|
688
- | **supply-chain-guard** | Malware campaigns, IOCs, behavior heuristics in installed artifacts; SBOM + SLSA provenance grading (in-toto/DSSE structural validation) | Yes: 350+ static heuristics plus multi-source GHSA/OpenSSF package verdicts and campaign-IOC matching, fully local/offline at scan time | No | npm (incl. pnpm/yarn/bun lockfiles), PyPI, Cargo, Go, RubyGems, Composer, NuGet, Docker, Terraform/IaC, VS Code extensions, GitHub Actions, GitHub repos | Yes (Apache-2.0) | No |
801
+ | **supply-chain-guard** | Malware campaigns, IOCs, behavior heuristics in installed artifacts; SBOM + SLSA provenance grading (in-toto/DSSE structural validation) | Yes: 350+ static heuristics plus multi-source GHSA/OpenSSF package verdicts and campaign-IOC matching, local at scan time (recent and curated indicators offline, the historical package catalog after a `feed refresh`) | No | 15 ecosystems of packages, extensions, plugins, providers, images and CI actions with shipped indicators, and tested matchers for more (see [Ecosystem Coverage](#ecosystem-coverage)), plus GitHub repos | Yes (Apache-2.0) | No |
689
802
  | [OSV-Scanner](https://github.com/google/osv-scanner) | Known vulnerabilities in dependency inventories (OSV.dev database lookup) | Known-malicious versions via OSV MAL- entries only; no behavior or IOC analysis | Yes (offline mode available) | 11+ ecosystems, 19+ lockfile formats, container images, SBOM input | Yes (Apache-2.0) | No |
690
803
  | [Socket](https://socket.dev) | Proactive behavioral analysis of entire registries (SaaS) | Yes: 70+ risk types registry-wide, before advisories exist; engine is closed source and cloud-side | Yes | npm, PyPI, Maven, Go, Cargo, RubyGems, NuGet, more; Actions workflows | CLI only (MIT); detection engine proprietary | Yes (except Firewall Free) |
691
804
  | [GuardDog](https://github.com/DataDog/guarddog) | Heuristic 0-10 risk scoring of individual packages (YARA + registry metadata) | Yes: heuristics only, no known-malware or campaign-IOC database; sandboxed scanning | No | npm, PyPI, Go, RubyGems, GitHub Actions, VS Code extensions | Yes (Apache-2.0) | No |
@@ -836,10 +949,20 @@ Apache-2.0, no account required, and no telemetry: the scanner reports only to
836
949
  its own output.
837
950
 
838
951
  **Offline by default:**
839
- `scan` on a local path runs fully offline against the bundled threat feed (unless
840
- the opt-in `--check-registry` flag is passed), as do `guard`, `feed stats`, and
841
- all report formatters. These commands make zero network requests and are suitable
842
- for air-gapped and data-egress-restricted environments.
952
+ `scan` on a local path runs fully offline (unless one of the opt-in flags
953
+ `--check-registry` or `--external-intel` is passed), as do `guard`, `feed stats`,
954
+ and all report formatters. These
955
+ commands make zero network requests and are suitable for air-gapped and
956
+ data-egress-restricted environments.
957
+
958
+ An offline scan matches against the bundled indicator set: every domain, URL, IP
959
+ and hash, every curated campaign, and the recent package indicators. Older
960
+ package indicators live in the historical catalog, which is much larger than the
961
+ bundle and is downloaded by `supply-chain-guard feed refresh` into `.scg-cache`
962
+ in the working directory (or `--cache-dir`). A scan without that cache, or with
963
+ one left over from another release, runs against the bundled set only, and every
964
+ `scan` report says so in its Catalog line (see
965
+ [THREAT_FEED_CATALOG_MISSING](#threat_feed_catalog_missing)).
843
966
 
844
967
  **Networked commands and external disclosures:**
845
968
  The commands that reach the network do so deliberately for their specific functions:
@@ -849,7 +972,8 @@ The commands that reach the network do so deliberately for their specific functi
849
972
  - `supply-chain-guard monitor <wallet>`: polls public Solana RPC nodes for C2 wallet transaction activity.
850
973
  - `supply-chain-guard feed refresh`: downloads updated threat intelligence from the upstream repository into the local cache.
851
974
  - `supply-chain-guard scan <github-url>`: clones a remote repository via Git for analysis.
852
- - `supply-chain-guard scan . --check-registry`: opt-in flag that queries the public npm registry for the package's latest published version to detect version drift.
975
+ - `supply-chain-guard scan . --check-registry`: opt-in flag that queries the public npm registry for the package's latest published version to detect version drift, and **transmits each Python dependency name** from `requirements.txt` / `pyproject.toml` to the public PyPI registry for dependency-confusion signals. Up to v6.2.5 the PyPI lookups ran on every scan of a Python project, contrary to the offline guarantee above; they now need this flag.
976
+ - `supply-chain-guard scan . --external-intel`: opt-in flag for the two-tier score. It **sends each dependency's name, ecosystem and version to the OSV API**, the CVE ids found to FIRST's EPSS API, and the project's GitHub `owner/repo` to the OpenSSF Scorecard API, and downloads the public CISA KEV catalog.
853
977
 
854
978
  Offline runs use the feed bundled with the installed version, so pin the version
855
979
  you intend to audit against.
@@ -874,7 +998,7 @@ jobs:
874
998
  runs-on: ubuntu-latest
875
999
  steps:
876
1000
  - uses: actions/checkout@v4
877
- - uses: homeofe/supply-chain-guard@v6.2.5
1001
+ - uses: homeofe/supply-chain-guard@v6.3.0
878
1002
  with:
879
1003
  fail-on: critical
880
1004
  comment-on-pr: true
@@ -962,7 +1086,7 @@ two are never confused. If a deliberately frozen rule set is the intent, exclude
962
1086
  the rule by name:
963
1087
 
964
1088
  ```yaml
965
- - uses: homeofe/supply-chain-guard@v6.2.5
1089
+ - uses: homeofe/supply-chain-guard@v6.3.0
966
1090
  with:
967
1091
  exclude-rules: THREAT_FEED_STALE
968
1092
  ```
@@ -981,12 +1105,14 @@ catalog is narrower than a scan with it, and without this rule it reports exactl
981
1105
  the same success.
982
1106
 
983
1107
  `supply-chain-guard feed refresh` downloads the catalog and caches it for later
984
- scans. The finding names how many historical indicators were not consulted and
1108
+ scans, in `.scg-cache` under the working directory unless `--cache-dir` names
1109
+ another. The cache belongs to one release, so an upgrade needs a new refresh.
1110
+ The finding names how many historical indicators were not consulted and
985
1111
  why, and the reason matters:
986
1112
 
987
1113
  | Reason | Severity | What it means |
988
1114
  |--------|----------|---------------|
989
- | not downloaded yet | info | No catalog on this machine. Run a refresh. |
1115
+ | not downloaded yet | info | No catalog in the cache directory. Run a refresh there. |
990
1116
  | unreadable | medium | The cache could not be parsed. |
991
1117
  | built for a different release | low | Left over from an older version. |
992
1118
  | does not match the pinned digest | high | Not the catalog this release expects. |
@@ -996,6 +1122,23 @@ The last two are not normal states. They say the scanner's own detection data is
996
1122
  either corrupt or has been modified in place, which is a different problem from
997
1123
  "not downloaded yet" and is worth looking at the machine for.
998
1124
 
1125
+ "Not downloaded yet" is `info` so that it does not turn every first run yellow,
1126
+ and that also means `--min-severity low`, the Action's default, filters the
1127
+ finding out. The same state is therefore recorded as provenance, independent of
1128
+ any severity filter:
1129
+
1130
+ - every `scan` report carries a Catalog line in every format, in bold in the
1131
+ Markdown report (and so in the Action's pull request comment whenever one is
1132
+ posted) when the catalog was not consulted. The `npm`, `pypi` and `vscode`
1133
+ commands, which vet one remote package, carry no Catalog line;
1134
+ - JSON and SARIF carry `detectionSet.catalog` (`consulted`, `entryCount`,
1135
+ `reason`), and the CycloneDX SBOM carries
1136
+ `supply-chain-guard:detection-set:catalog-consulted`;
1137
+ - the MCP `ioc_lookup` result carries `checkedAgainst.catalog`, plus a
1138
+ `coverageNote` on a clean package verdict reached without the catalog.
1139
+
1140
+ None of these changes the score, the risk level, the badge or the exit code.
1141
+
999
1142
  The cache checksum is also compared with an entries digest compiled into the
1000
1143
  package. A cache with the right public header, recomputed checksum and entry
1001
1144
  count is still refused when its actual indicators differ from this release.
@@ -1014,7 +1157,7 @@ preceding `feed refresh` in the workflow does not count. `catalog: required`
1014
1157
  on the Action therefore needs:
1015
1158
 
1016
1159
  ```yaml
1017
- - uses: homeofe/supply-chain-guard@v6.2.5
1160
+ - uses: homeofe/supply-chain-guard@v6.3.0
1018
1161
  with:
1019
1162
  refresh-catalog: true
1020
1163
  ```
@@ -1025,7 +1168,7 @@ setting rather than firing on every scan. If scanning against the bundled set
1025
1168
  alone is the intent, exclude the rule by name:
1026
1169
 
1027
1170
  ```yaml
1028
- - uses: homeofe/supply-chain-guard@v6.2.5
1171
+ - uses: homeofe/supply-chain-guard@v6.3.0
1029
1172
  with:
1030
1173
  exclude-rules: THREAT_FEED_CATALOG_MISSING
1031
1174
  ```
@@ -1092,7 +1235,9 @@ note that PowerShell swallows the bare `--` itself, so on Windows prefer the
1092
1235
  global-install form above.
1093
1236
 
1094
1237
  Exposes three tools over stdio: `ioc_lookup` (offline IOC + known-bad-version check
1095
- for npm/PyPI/RubyGems/Composer/NuGet), `scan_directory`, and `scan_npm_package`.
1238
+ for every supported ecosystem; package verdicts include the historical catalog only
1239
+ after `feed refresh`, and the result says which), `scan_directory`, and
1240
+ `scan_npm_package`.
1096
1241
  Client config snippets for Claude Code, Claude Desktop, and Cursor: [docs/mcp.md](docs/mcp.md).
1097
1242
 
1098
1243
  ## Live Threat Feed
@@ -1242,6 +1387,14 @@ If supply-chain-guard runs in your CI, add the badge to your README:
1242
1387
  [![scanned by supply-chain-guard](https://img.shields.io/badge/scanned%20by-supply--chain--guard-2ea44f?logo=npm&logoColor=white)](https://github.com/homeofe/supply-chain-guard)
1243
1388
  ```
1244
1389
 
1390
+ A static badge only claims the scan. To make it prove one, point it at the
1391
+ status of the workflow that runs the scan, the way this repository's own
1392
+ badge shows [its self-scan](.github/workflows/self-scan.yml):
1393
+
1394
+ ```markdown
1395
+ [![scanned by supply-chain-guard](https://github.com/OWNER/REPO/actions/workflows/supply-chain-guard.yml/badge.svg?branch=main)](https://github.com/OWNER/REPO/actions/workflows/supply-chain-guard.yml)
1396
+ ```
1397
+
1245
1398
  ## Contributing
1246
1399
 
1247
1400
  See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. The most impactful contribution is adding new detection patterns for emerging threats.
package/action.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: "Supply Chain Guard"
2
- description: "Scan your repository for supply-chain malware indicators. Detects GlassWorm and similar campaigns."
2
+ description: "Scan a repository for supply-chain malware and known-malicious dependencies in 15 ecosystems."
3
3
  author: "Elvatis <emre.kohler@elvatis.com>"
4
4
 
5
5
  branding:
@@ -79,12 +79,12 @@ runs:
79
79
  - name: Setup Node.js
80
80
  uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
81
81
  with:
82
- node-version: "22"
82
+ node-version: "24"
83
83
  package-manager-cache: false
84
84
 
85
85
  - name: Install supply-chain-guard
86
86
  shell: bash
87
- run: npm install -g supply-chain-guard@6.2.5 --ignore-scripts --no-audit --no-fund
87
+ run: npm install -g supply-chain-guard@6.3.0 --ignore-scripts --no-audit --no-fund
88
88
 
89
89
  - name: Run scan
90
90
  id: scan
@@ -1 +1 @@
1
- {"version":3,"file":"attack-graph.d.ts","sourceRoot":"","sources":["../src/attack-graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,OAAO,EAAE,WAAW,EACrB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,MAAM,GACb,WAAW,CAyDb;AAgGD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAyB7D"}
1
+ {"version":3,"file":"attack-graph.d.ts","sourceRoot":"","sources":["../src/attack-graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,OAAO,EAAE,WAAW,EACrB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,MAAM,GACb,WAAW,CAyDb;AAoGD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAyB7D"}
@@ -121,11 +121,16 @@ function addNode(map, nodes, id, type, label, findingRules) {
121
121
  if (map.has(id)) {
122
122
  const existing = map.get(id);
123
123
  if (findingRules) {
124
- existing.findings = [...(existing.findings ?? []), ...findingRules];
124
+ // Appended in place: copying the list for every finding is quadratic
125
+ // when one file carries many findings.
126
+ existing.findings ??= [];
127
+ for (const rule of findingRules)
128
+ existing.findings.push(rule);
125
129
  }
126
130
  return;
127
131
  }
128
- const node = { id, type, label, findings: findingRules };
132
+ // A copy: the list grows in place above and must not alias the caller's array.
133
+ const node = { id, type, label, findings: findingRules?.slice() };
129
134
  map.set(id, node);
130
135
  nodes.push(node);
131
136
  }
@@ -1 +1 @@
1
- {"version":3,"file":"attack-graph.js","sourceRoot":"","sources":["../src/attack-graph.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAMH;;GAEG;AACH,0BACE,QAAmB,EACnB,MAAc;IAEd,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAqB,CAAC;IAE7C,YAAY;IACZ,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAElD,sCAAsC;IACtC,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;QACzB,aAAa;QACb,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;YACX,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;YAChC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI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AC1B,CAAC;AAED,SAAS,UAAU,CAAC,EAAU;IAC5B,OAAO,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAC5C,CAAC"}
@@ -1,4 +1,13 @@
1
1
  import type { CorrelatedPatternMatcher } from "./types.js";
2
+ /**
3
+ * Network transport for the beacon rules, shared with their pattern strings in
4
+ * patterns.ts so matcher and regex cannot drift. Identifier boundaries and a
5
+ * call shape keep `fetchNotifications` and `forgotPassword` out, while member
6
+ * calls such as `axios.post(` and `got.get(` still count.
7
+ */
8
+ export declare const WALLET_NAME_SOURCE: string;
9
+ export declare const WALLET_TARGET_SOURCE: string;
10
+ export declare const BEACON_TRANSPORT_SOURCE: string;
2
11
  /**
3
12
  * Whole-file Shai-Hulud corroboration without repeated-prefix correlations.
4
13
  * This is deliberately symmetric: the legacy reverse-order branch accidentally
@@ -11,6 +20,21 @@ export declare function hasShaiHuludCorroboration(content: string): boolean;
11
20
  * `Buffer.from\([^)]*base64` branch and linear repeated-prefix behaviour.
12
21
  */
13
22
  export declare function hasDropperPayloadPreparation(content: string): boolean;
23
+ /**
24
+ * True when an anchored regex can only accept [A-Za-z0-9_-]. That excludes
25
+ * `/`, `\`, `.` and `%` (a percent-encoded dot segment still resolves), so an
26
+ * accepted value cannot leave the static prefix's directory. Anything outside
27
+ * this small grammar, including alternation, groups and negated classes, is
28
+ * refused rather than interpreted.
29
+ */
30
+ export declare function isPathSafeAllowlistRegex(body: string, flags: string): boolean;
31
+ /**
32
+ * True when every template import() on a hit line has a static prefix and
33
+ * extension, interpolates one bare identifier, and that identifier was tested
34
+ * earlier in the same function against an anchored allowlist that admits no
35
+ * path characters. IMPORT_EXPRESSION then reports at info.
36
+ */
37
+ export declare function isAllowlistGuardedImportLine(content: string, line: number): boolean;
14
38
  export declare const CORE_BROAD_GAP_RULES: readonly ["EVAL_HEX", "ENV_EXFILTRATION", "DNS_EXFILTRATION", "SCRIPT_NODE_INLINE", "XZ_BUILD_INJECT", "CODECOV_EXFIL", "SUNBURST_DELAYED_EXEC", "UAPARSER_PREINSTALL_DL", "MINI_SHAI_HULUD_PREINSTALL", "ANTV_WAVE_OTEL_C2", "COA_RC_POSTINSTALL", "PYPI_ENV_EXFILTRATION", "PYPI_HOSTNAME_EXFIL", "BEACON_INTERVAL_FETCH", "BEACON_TIMEOUT_FETCH", "PROTESTWARE_LOCALE_DESTRUCT", "PROTESTWARE_GEOIP_DESTRUCT", "BUILD_PLUGIN_DOWNLOAD", "BUILD_ENV_EXFIL", "WORKSPACE_ROOT_POSTINSTALL", "WORKSPACE_PRIVATE_PUBLISH", "SHAI_HULUD_WORM", "IMPORT_EXPRESSION", "STEGANOGRAPHY_DECODE", "SVG_SCRIPT_INJECTION", "IAC_HARDCODED_SECRET", "DEAD_DROP_DNS_TXT", "VIDAR_BROWSER_THEFT", "VIDAR_WALLET_THEFT", "DROPPER_ANTIVM", "README_LURE_URGENCY", "CAMPAIGN_CLAUDE_LURE", "CAMPAIGN_AI_TOOL_LURE", "C2_DYNAMIC_CONFIG", "SECRETS_SSH_KEY_READ", "CODE_RUNTIME_DEOBFUSCATION"];
15
39
  export type CoreBroadGapRule = typeof CORE_BROAD_GAP_RULES[number];
16
40
  export declare function createCoreBroadGapMatchers(isLikelyRealSecretValue: (value: string) => boolean): Readonly<Record<CoreBroadGapRule, CorrelatedPatternMatcher>>;
@@ -1 +1 @@
1
- {"version":3,"file":"broad-gap-pattern-matchers.d.ts","sourceRoot":"","sources":["../src/broad-gap-pattern-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAsqBpB;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAElE;AAMD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAoBrE;AAED,eAAO,MAAM,oBAAoB,YAC/B,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,EACjB,4BAA4B,EAC5B,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,4BAA4B,CACpB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEnE,wBAAgB,0BAA0B,CACxC,uBAAuB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GAClD,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,CAAC,CAyU9D"}
1
+ {"version":3,"file":"broad-gap-pattern-matchers.d.ts","sourceRoot":"","sources":["../src/broad-gap-pattern-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,YAAY,CAAC;AA6DpB;;;;;GAKG;AAMH,eAAO,MAAM,kBAAkB,QACmE,CAAC;AACnG,eAAO,MAAM,oBAAoB,QAC+B,CAAC;AAEjE,eAAO,MAAM,uBAAuB,QAC0H,CAAC;AA0mB/J;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAElE;AAMD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAoBrE;AAwED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IA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