@cyclonedx/cdxgen 12.3.3 → 12.4.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 (157) hide show
  1. package/README.md +64 -22
  2. package/bin/audit.js +21 -7
  3. package/bin/cdxgen.js +238 -116
  4. package/bin/convert.js +28 -13
  5. package/bin/hbom.js +490 -0
  6. package/bin/repl.js +580 -29
  7. package/bin/validate.js +34 -4
  8. package/bin/verify.js +40 -5
  9. package/data/README.md +298 -25
  10. package/data/component-tags.json +6 -0
  11. package/data/crypto-oid.json +16 -0
  12. package/data/predictive-audit-allowlist.json +11 -0
  13. package/data/queries-darwin.json +12 -1
  14. package/data/queries-win.json +7 -1
  15. package/data/queries.json +39 -2
  16. package/data/rules/ai-agent-governance.yaml +16 -0
  17. package/data/rules/asar-archives.yaml +150 -0
  18. package/data/rules/chrome-extensions.yaml +8 -0
  19. package/data/rules/ci-permissions.yaml +42 -18
  20. package/data/rules/container-risk.yaml +14 -7
  21. package/data/rules/dependency-sources.yaml +11 -0
  22. package/data/rules/hbom-compliance.yaml +325 -0
  23. package/data/rules/hbom-performance.yaml +307 -0
  24. package/data/rules/hbom-security.yaml +248 -0
  25. package/data/rules/host-topology.yaml +165 -0
  26. package/data/rules/mcp-servers.yaml +18 -3
  27. package/data/rules/obom-runtime.yaml +907 -22
  28. package/data/rules/package-integrity.yaml +14 -0
  29. package/data/rules/rootfs-hardening.yaml +179 -0
  30. package/data/rules/vscode-extensions.yaml +9 -0
  31. package/lib/audit/index.js +209 -8
  32. package/lib/audit/index.poku.js +332 -0
  33. package/lib/audit/reporters.js +222 -0
  34. package/lib/audit/targets.js +146 -1
  35. package/lib/audit/targets.poku.js +186 -0
  36. package/lib/cli/asar.poku.js +328 -0
  37. package/lib/cli/index.js +506 -88
  38. package/lib/cli/index.poku.js +1352 -212
  39. package/lib/evinser/evinser.js +14 -9
  40. package/lib/helpers/analyzer.js +1406 -29
  41. package/lib/helpers/analyzer.poku.js +342 -0
  42. package/lib/helpers/analyzerScope.js +712 -0
  43. package/lib/helpers/asarutils.js +1556 -0
  44. package/lib/helpers/asarutils.poku.js +443 -0
  45. package/lib/helpers/auditCategories.js +12 -0
  46. package/lib/helpers/auditCategories.poku.js +32 -0
  47. package/lib/helpers/cbomutils.js +271 -1
  48. package/lib/helpers/cbomutils.poku.js +248 -5
  49. package/lib/helpers/display.js +291 -1
  50. package/lib/helpers/display.poku.js +149 -0
  51. package/lib/helpers/evidenceUtils.js +58 -0
  52. package/lib/helpers/evidenceUtils.poku.js +54 -0
  53. package/lib/helpers/exportUtils.js +9 -0
  54. package/lib/helpers/gtfobins.js +142 -8
  55. package/lib/helpers/gtfobins.poku.js +24 -1
  56. package/lib/helpers/hbom.js +710 -0
  57. package/lib/helpers/hbom.poku.js +496 -0
  58. package/lib/helpers/hbomAnalysis.js +268 -0
  59. package/lib/helpers/hbomAnalysis.poku.js +249 -0
  60. package/lib/helpers/hbomLoader.js +35 -0
  61. package/lib/helpers/hostTopology.js +803 -0
  62. package/lib/helpers/hostTopology.poku.js +363 -0
  63. package/lib/helpers/inventoryStats.js +69 -0
  64. package/lib/helpers/inventoryStats.poku.js +86 -0
  65. package/lib/helpers/lolbas.js +19 -1
  66. package/lib/helpers/lolbas.poku.js +23 -0
  67. package/lib/helpers/osqueryTransform.js +47 -0
  68. package/lib/helpers/osqueryTransform.poku.js +47 -0
  69. package/lib/helpers/plugins.js +349 -0
  70. package/lib/helpers/plugins.poku.js +57 -0
  71. package/lib/helpers/protobom.js +156 -45
  72. package/lib/helpers/protobom.poku.js +140 -5
  73. package/lib/helpers/remote/dependency-track.js +36 -3
  74. package/lib/helpers/remote/dependency-track.poku.js +44 -0
  75. package/lib/helpers/source.js +24 -0
  76. package/lib/helpers/source.poku.js +32 -0
  77. package/lib/helpers/utils.js +1438 -93
  78. package/lib/helpers/utils.poku.js +846 -4
  79. package/lib/managers/binary.e2e.poku.js +367 -0
  80. package/lib/managers/binary.js +2293 -353
  81. package/lib/managers/binary.poku.js +1699 -1
  82. package/lib/managers/docker.js +201 -79
  83. package/lib/managers/docker.poku.js +337 -12
  84. package/lib/server/server.js +2 -27
  85. package/lib/stages/postgen/annotator.js +38 -0
  86. package/lib/stages/postgen/annotator.poku.js +107 -1
  87. package/lib/stages/postgen/auditBom.js +121 -18
  88. package/lib/stages/postgen/auditBom.poku.js +1366 -31
  89. package/lib/stages/postgen/hostTopologyAudit.poku.js +186 -0
  90. package/lib/stages/postgen/postgen.js +192 -1
  91. package/lib/stages/postgen/postgen.poku.js +321 -0
  92. package/lib/stages/postgen/ruleEngine.js +116 -0
  93. package/lib/stages/pregen/envAudit.js +14 -3
  94. package/package.json +23 -21
  95. package/types/bin/hbom.d.ts +3 -0
  96. package/types/bin/hbom.d.ts.map +1 -0
  97. package/types/bin/repl.d.ts.map +1 -1
  98. package/types/lib/audit/index.d.ts +44 -0
  99. package/types/lib/audit/index.d.ts.map +1 -1
  100. package/types/lib/audit/reporters.d.ts +16 -0
  101. package/types/lib/audit/reporters.d.ts.map +1 -1
  102. package/types/lib/audit/targets.d.ts.map +1 -1
  103. package/types/lib/cli/index.d.ts +16 -0
  104. package/types/lib/cli/index.d.ts.map +1 -1
  105. package/types/lib/evinser/evinser.d.ts +4 -0
  106. package/types/lib/evinser/evinser.d.ts.map +1 -1
  107. package/types/lib/helpers/analyzer.d.ts +33 -0
  108. package/types/lib/helpers/analyzer.d.ts.map +1 -1
  109. package/types/lib/helpers/analyzerScope.d.ts +11 -0
  110. package/types/lib/helpers/analyzerScope.d.ts.map +1 -0
  111. package/types/lib/helpers/asarutils.d.ts +34 -0
  112. package/types/lib/helpers/asarutils.d.ts.map +1 -0
  113. package/types/lib/helpers/auditCategories.d.ts +5 -0
  114. package/types/lib/helpers/auditCategories.d.ts.map +1 -1
  115. package/types/lib/helpers/cbomutils.d.ts +3 -2
  116. package/types/lib/helpers/cbomutils.d.ts.map +1 -1
  117. package/types/lib/helpers/display.d.ts.map +1 -1
  118. package/types/lib/helpers/evidenceUtils.d.ts +8 -0
  119. package/types/lib/helpers/evidenceUtils.d.ts.map +1 -0
  120. package/types/lib/helpers/exportUtils.d.ts.map +1 -1
  121. package/types/lib/helpers/gtfobins.d.ts +8 -0
  122. package/types/lib/helpers/gtfobins.d.ts.map +1 -1
  123. package/types/lib/helpers/hbom.d.ts +49 -0
  124. package/types/lib/helpers/hbom.d.ts.map +1 -0
  125. package/types/lib/helpers/hbomAnalysis.d.ts +62 -0
  126. package/types/lib/helpers/hbomAnalysis.d.ts.map +1 -0
  127. package/types/lib/helpers/hbomLoader.d.ts +7 -0
  128. package/types/lib/helpers/hbomLoader.d.ts.map +1 -0
  129. package/types/lib/helpers/hostTopology.d.ts +12 -0
  130. package/types/lib/helpers/hostTopology.d.ts.map +1 -0
  131. package/types/lib/helpers/inventoryStats.d.ts +11 -0
  132. package/types/lib/helpers/inventoryStats.d.ts.map +1 -0
  133. package/types/lib/helpers/lolbas.d.ts.map +1 -1
  134. package/types/lib/helpers/osqueryTransform.d.ts +3 -0
  135. package/types/lib/helpers/osqueryTransform.d.ts.map +1 -1
  136. package/types/lib/helpers/plugins.d.ts +58 -0
  137. package/types/lib/helpers/plugins.d.ts.map +1 -0
  138. package/types/lib/helpers/protobom.d.ts +3 -4
  139. package/types/lib/helpers/protobom.d.ts.map +1 -1
  140. package/types/lib/helpers/remote/dependency-track.d.ts +10 -3
  141. package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
  142. package/types/lib/helpers/source.d.ts.map +1 -1
  143. package/types/lib/helpers/utils.d.ts +45 -8
  144. package/types/lib/helpers/utils.d.ts.map +1 -1
  145. package/types/lib/managers/binary.d.ts +5 -0
  146. package/types/lib/managers/binary.d.ts.map +1 -1
  147. package/types/lib/managers/docker.d.ts.map +1 -1
  148. package/types/lib/server/server.d.ts +2 -1
  149. package/types/lib/server/server.d.ts.map +1 -1
  150. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  151. package/types/lib/stages/postgen/auditBom.d.ts +26 -1
  152. package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
  153. package/types/lib/stages/postgen/postgen.d.ts +2 -1
  154. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  155. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  156. package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
  157. package/data/spdx-model-v3.0.1.jsonld +0 -15999
package/data/queries.json CHANGED
@@ -38,12 +38,26 @@
38
38
  "apt_sources": {
39
39
  "query": "select * from apt_sources;",
40
40
  "description": "Retrieves all the APT sources to install packages from in the target Linux system.",
41
- "purlType": "deb"
41
+ "purlType": "generic",
42
+ "componentType": "data"
43
+ },
44
+ "apt_ppa_sources": {
45
+ "query": "SELECT COALESCE(name, base_uri, source) as name, release as version, maintainer as publisher, source as description, source, base_uri, release, components, architectures FROM apt_sources WHERE base_uri LIKE '%ppa.launchpadcontent.net%' OR base_uri LIKE '%ppa.launchpad.net%';",
46
+ "description": "APT Personal Package Archive (PPA) sources configured on the target Linux system.",
47
+ "purlType": "generic",
48
+ "componentType": "data"
42
49
  },
43
50
  "yum_sources": {
44
51
  "query": "select * from yum_sources;",
45
52
  "description": "Display yum package manager sources.",
46
- "purlType": "yum"
53
+ "purlType": "generic",
54
+ "componentType": "data"
55
+ },
56
+ "trusted_gpg_keys": {
57
+ "query": "SELECT COALESCE(file.filename, file.path) as name, hash.sha256 as version, file.path as description, file.path, file.directory, file.filename, file.uid, file.gid, file.mode, file.size, file.mtime, hash.sha1, hash.sha256, CASE WHEN file.path LIKE '/etc/apt/%' OR file.path LIKE '/usr/share/keyrings/%' THEN 'apt' WHEN file.path LIKE '/etc/pki/rpm-gpg/%' OR file.path LIKE '/usr/share/distribution-gpg-keys/%' THEN 'rpm' WHEN file.path LIKE '/etc/apk/keys/%' THEN 'apk' ELSE 'generic' END AS trust_domain FROM file JOIN hash USING (path) WHERE (file.path = '/etc/apt/trusted.gpg' OR file.path LIKE '/etc/apt/trusted.gpg.d/%' OR file.path LIKE '/usr/share/keyrings/%' OR file.path LIKE '/etc/pki/rpm-gpg/%' OR file.path LIKE '/usr/share/distribution-gpg-keys/%' OR file.path LIKE '/etc/apk/keys/%') AND file.type = 'regular';",
58
+ "description": "Trusted repository keyring material for APT, RPM/DNF, and APK package trust validation.",
59
+ "purlType": "generic",
60
+ "componentType": "cryptographic-asset"
47
61
  },
48
62
  "portage_packages": {
49
63
  "query": "select * from portage_packages;",
@@ -60,6 +74,11 @@
60
74
  "description": "Python packages installed on system.",
61
75
  "purlType": "pypi"
62
76
  },
77
+ "npm_packages": {
78
+ "query": "SELECT * FROM npm_packages;",
79
+ "description": "Node packages installed on the system, including recursively discovered modern package manager layouts.",
80
+ "purlType": "npm"
81
+ },
63
82
  "system_info_snapshot": {
64
83
  "query": "SELECT * FROM system_info;",
65
84
  "description": "System info snapshot query.",
@@ -108,12 +127,30 @@
108
127
  "purlType": "swid",
109
128
  "componentType": "data"
110
129
  },
130
+ "sysctl_hardening": {
131
+ "query": "SELECT name, current_value as version, name as sysctl_key, current_value FROM sysctl WHERE name IN ('kernel.randomize_va_space', 'kernel.kptr_restrict', 'net.ipv4.conf.all.accept_redirects', 'net.ipv4.conf.default.accept_redirects', 'net.ipv4.conf.all.send_redirects', 'net.ipv4.conf.default.send_redirects');",
132
+ "description": "Linux sysctl posture entries aligned with common hardening baselines.",
133
+ "purlType": "swid",
134
+ "componentType": "data"
135
+ },
111
136
  "kernel_modules": {
112
137
  "query": "SELECT * FROM kernel_modules;",
113
138
  "description": "Linux kernel modules both loaded and within the load search path.",
114
139
  "purlType": "swid",
115
140
  "componentType": "data"
116
141
  },
142
+ "secureboot_certificates": {
143
+ "query": "SELECT COALESCE(common_name, subject, sha1) as name, COALESCE(subject_key_id, sha1) as version, issuer as publisher, subject as description, common_name, subject, issuer, serial, sha1, revoked, path, is_ca, self_signed, key_usage, authority_key_id, subject_key_id, signing_algorithm, key_algorithm, key_strength, not_valid_before, not_valid_after FROM secureboot_certificates;",
144
+ "description": "UEFI Secure Boot certificate inventory, including trusted and revoked entries, for firmware trust posture reviews.",
145
+ "purlType": "swid",
146
+ "componentType": "data"
147
+ },
148
+ "mount_hardening": {
149
+ "query": "SELECT path as name, flags as version, device as description, path, device, type, flags FROM mounts WHERE path IN ('/tmp', '/var/tmp', '/dev/shm', '/home');",
150
+ "description": "Linux mount points commonly reviewed for noexec, nodev, and nosuid hardening.",
151
+ "purlType": "swid",
152
+ "componentType": "data"
153
+ },
117
154
  "systemd_units": {
118
155
  "query": "SELECT id as name, active_state as version, description, load_state, sub_state, unit_file_state, user, fragment_path, source_path FROM systemd_units;",
119
156
  "description": "Systemd unit state and execution source inventory.",
@@ -3,9 +3,11 @@
3
3
  description: "Hidden Unicode in AI agent instructions or skill files can conceal misleading prompts, hidden tool behavior, or review-evasion content."
4
4
  severity: medium
5
5
  category: ai-agent
6
+ dry-run-support: full
6
7
  standards:
7
8
  owasp-ai-top-10:
8
9
  - "LLM05: Supply Chain Vulnerabilities"
10
+ - "LLM03:2025 Supply Chain"
9
11
  nist-ai-rmf:
10
12
  - "Govern"
11
13
  - "Manage"
@@ -35,6 +37,7 @@
35
37
  description: "Public MCP endpoints referenced from agent or skill files deserve review when the instruction surface does not indicate any bearer, token, or OAuth controls."
36
38
  severity: high
37
39
  category: ai-agent
40
+ dry-run-support: full
38
41
  attack:
39
42
  tactics: [TA0001]
40
43
  techniques: [T1190]
@@ -42,6 +45,7 @@
42
45
  owasp-ai-top-10:
43
46
  - "LLM07: Insecure Plugin Design"
44
47
  - "LLM08: Excessive Agency"
48
+ - "LLM06:2025 Excessive Agency"
45
49
  nist-ai-rmf:
46
50
  - "Map"
47
51
  - "Manage"
@@ -72,10 +76,13 @@
72
76
  description: "Agent files that mention MCP servers, packages, or endpoints without corresponding MCP package inventory or source-derived MCP services can hide runtime trust dependencies from reviewers."
73
77
  severity: medium
74
78
  category: ai-agent
79
+ dry-run-support: full
75
80
  standards:
76
81
  owasp-ai-top-10:
77
82
  - "LLM05: Supply Chain Vulnerabilities"
78
83
  - "LLM08: Excessive Agency"
84
+ - "LLM03:2025 Supply Chain"
85
+ - "LLM06:2025 Excessive Agency"
79
86
  nist-ai-rmf:
80
87
  - "Map"
81
88
  - "Govern"
@@ -107,6 +114,7 @@
107
114
  description: "Localhost tunneling and reverse-proxy references in agent files can turn development-only MCP servers into remotely reachable control surfaces."
108
115
  severity: high
109
116
  category: ai-agent
117
+ dry-run-support: full
110
118
  attack:
111
119
  tactics: [TA0001, TA0011]
112
120
  techniques: [T1190, T1071]
@@ -114,6 +122,7 @@
114
122
  owasp-ai-top-10:
115
123
  - "LLM07: Insecure Plugin Design"
116
124
  - "LLM08: Excessive Agency"
125
+ - "LLM06:2025 Excessive Agency"
117
126
  nist-ai-rmf:
118
127
  - "Map"
119
128
  - "Manage"
@@ -142,10 +151,12 @@
142
151
  description: "Non-official MCP wrappers referenced directly from agent instructions deserve extra review before they are trusted in developer tooling or automation flows."
143
152
  severity: medium
144
153
  category: ai-agent
154
+ dry-run-support: full
145
155
  standards:
146
156
  owasp-ai-top-10:
147
157
  - "LLM05: Supply Chain Vulnerabilities"
148
158
  - "LLM07: Insecure Plugin Design"
159
+ - "LLM03:2025 Supply Chain"
149
160
  nist-ai-rmf:
150
161
  - "Govern"
151
162
  - "Map"
@@ -174,6 +185,7 @@
174
185
  description: "Agent or skill files that embed bearer tokens, API keys, or similar secrets create immediate review and credential-rotation risk."
175
186
  severity: critical
176
187
  category: ai-agent
188
+ dry-run-support: full
177
189
  attack:
178
190
  tactics: [TA0006]
179
191
  techniques: [T1552]
@@ -181,6 +193,7 @@
181
193
  owasp-ai-top-10:
182
194
  - "LLM05: Supply Chain Vulnerabilities"
183
195
  - "LLM07: Insecure Plugin Design"
196
+ - "LLM03:2025 Supply Chain"
184
197
  nist-ai-rmf:
185
198
  - "Govern"
186
199
  - "Manage"
@@ -210,10 +223,13 @@
210
223
  description: "Shipped AI instruction and skill files deserve explicit review because they can alter developer tooling, release-time automation, and downstream runtime behavior."
211
224
  severity: medium
212
225
  category: ai-agent
226
+ dry-run-support: full
213
227
  standards:
214
228
  owasp-ai-top-10:
215
229
  - "LLM05: Supply Chain Vulnerabilities"
216
230
  - "LLM08: Excessive Agency"
231
+ - "LLM03:2025 Supply Chain"
232
+ - "LLM06:2025 Excessive Agency"
217
233
  nist-ai-rmf:
218
234
  - "Govern"
219
235
  - "Map"
@@ -0,0 +1,150 @@
1
+ # Electron ASAR archive security rules
2
+ # Category: asar-archive
3
+ # Evaluates packaged Electron application archives for dynamic execution,
4
+ # capability overlap, integrity mismatches, and embedded install-time scripts.
5
+
6
+ - id: ASAR-001
7
+ name: "Archived JavaScript with eval or dynamic loading"
8
+ description: "ASAR-packaged JavaScript using eval, Function, or dynamic import/require deserves review for arbitrary code execution and remote payload loading risk."
9
+ severity: high
10
+ category: asar-archive
11
+ dry-run-support: full
12
+ condition: |
13
+ components[
14
+ $prop($, 'cdx:file:kind') = 'asar-entry'
15
+ and (
16
+ $propBool($, 'cdx:asar:js:hasEval') = true
17
+ or $propBool($, 'cdx:asar:js:capability:dynamicImport') = true
18
+ or $listContains($propList($, 'cdx:asar:js:executionIndicators'), 'eval')
19
+ or $listContains($propList($, 'cdx:asar:js:executionIndicators'), 'function-constructor')
20
+ )
21
+ ]
22
+ location: |
23
+ {
24
+ "bomRef": $. "bom-ref",
25
+ "srcFile": $prop($, 'SrcFile'),
26
+ "archivePath": $prop($, 'cdx:asar:path')
27
+ }
28
+ message: "Archived JavaScript '{{ name }}' uses eval-like or dynamic loading behavior inside an ASAR package"
29
+ mitigation: "Review the packaged source for eval, Function, dynamic import, or runtime module resolution. Prefer static imports and signed update channels."
30
+ evidence: |
31
+ {
32
+ "archivePath": $prop($, 'cdx:asar:path'),
33
+ "executionIndicators": $prop($, 'cdx:asar:js:executionIndicators'),
34
+ "dynamicImport": $prop($, 'cdx:asar:js:capability:dynamicImport'),
35
+ "hasEval": $prop($, 'cdx:asar:js:hasEval')
36
+ }
37
+
38
+ - id: ASAR-002
39
+ name: "Archived JavaScript with network plus file or hardware access"
40
+ description: "Packaged JavaScript that combines outbound network capability with filesystem or hardware access can materially increase exfiltration or device-control risk."
41
+ severity: high
42
+ category: asar-archive
43
+ dry-run-support: full
44
+ condition: |
45
+ components[
46
+ $prop($, 'cdx:file:kind') = 'asar-entry'
47
+ and $propBool($, 'cdx:asar:js:capability:network') = true
48
+ and (
49
+ $propBool($, 'cdx:asar:js:capability:fileAccess') = true
50
+ or $propBool($, 'cdx:asar:js:capability:hardware') = true
51
+ or $propBool($, 'cdx:asar:js:hasDynamicFetch') = true
52
+ )
53
+ ]
54
+ location: |
55
+ {
56
+ "bomRef": $. "bom-ref",
57
+ "srcFile": $prop($, 'SrcFile'),
58
+ "archivePath": $prop($, 'cdx:asar:path')
59
+ }
60
+ message: "Archived JavaScript '{{ name }}' combines network behavior with sensitive local access capabilities"
61
+ mitigation: "Review outbound endpoints, local file access, and hardware APIs. Limit packaged code to explicit allowlisted operations and sign release artifacts."
62
+ evidence: |
63
+ {
64
+ "archivePath": $prop($, 'cdx:asar:path'),
65
+ "capabilities": $prop($, 'cdx:asar:js:capabilities'),
66
+ "networkIndicators": $prop($, 'cdx:asar:js:networkIndicators'),
67
+ "hardwareIndicators": $prop($, 'cdx:asar:js:hardwareIndicators'),
68
+ "fileAccessIndicators": $prop($, 'cdx:asar:js:fileAccessIndicators')
69
+ }
70
+
71
+ - id: ASAR-003
72
+ name: "Declared ASAR integrity mismatch"
73
+ description: "An ASAR entry whose declared integrity hash does not match the computed file hash may indicate tampering or packaging defects."
74
+ severity: high
75
+ category: asar-archive
76
+ dry-run-support: full
77
+ condition: |
78
+ components[
79
+ $prop($, 'cdx:file:kind') = 'asar-entry'
80
+ and $prop($, 'cdx:asar:integrityVerified') = 'false'
81
+ ]
82
+ location: |
83
+ {
84
+ "bomRef": $. "bom-ref",
85
+ "srcFile": $prop($, 'SrcFile'),
86
+ "archivePath": $prop($, 'cdx:asar:path')
87
+ }
88
+ message: "Archived entry '{{ name }}' has a declared integrity hash mismatch inside an ASAR package"
89
+ mitigation: "Rebuild the archive from trusted sources, verify signing provenance, and compare the packaged file to the expected release artifact."
90
+ evidence: |
91
+ {
92
+ "archivePath": $prop($, 'cdx:asar:path'),
93
+ "declaredHash": $prop($, 'cdx:asar:declaredIntegrityHash'),
94
+ "verified": $prop($, 'cdx:asar:integrityVerified')
95
+ }
96
+
97
+ - id: ASAR-004
98
+ name: "Embedded npm package with install-time scripts inside ASAR"
99
+ description: "Node packages shipped inside ASAR archives that declare install/preinstall hooks are still useful compromise indicators during artifact review."
100
+ severity: high
101
+ category: asar-archive
102
+ dry-run-support: partial
103
+ condition: |
104
+ components[
105
+ $propBool($, 'cdx:npm:hasInstallScript') = true
106
+ and $contains($prop($, 'SrcFile'), '.asar#/')
107
+ ]
108
+ location: |
109
+ {
110
+ "bomRef": $. "bom-ref",
111
+ "purl": purl,
112
+ "srcFile": $prop($, 'SrcFile')
113
+ }
114
+ message: "Embedded npm package '{{ name }}@{{ version }}' inside ASAR declares install-time lifecycle scripts"
115
+ mitigation: "Review the embedded package source and build provenance. Remove unnecessary lifecycle hooks or vendor only prebuilt trusted artifacts."
116
+ evidence: |
117
+ {
118
+ "srcFile": $prop($, 'SrcFile'),
119
+ "lifecycleScripts": $prop($, 'cdx:npm:risky_scripts'),
120
+ "executionIndicators": $prop($, 'cdx:npm:lifecycleExecutionIndicators'),
121
+ "obfuscationIndicators": $prop($, 'cdx:npm:lifecycleObfuscationIndicators')
122
+ }
123
+
124
+ - id: ASAR-005
125
+ name: "Electron ASAR signing metadata failed verification"
126
+ description: "Electron Info.plist signing metadata that fails verification is a high-signal indicator of packaging defects or release-artifact tampering."
127
+ severity: high
128
+ category: asar-archive
129
+ dry-run-support: full
130
+ condition: |
131
+ components[
132
+ $prop($, 'cdx:file:kind') = 'asar-archive'
133
+ and $propBool($, 'cdx:asar:hasSigningMetadata') = true
134
+ and $prop($, 'cdx:asar:signingVerified') = 'false'
135
+ ]
136
+ location: |
137
+ {
138
+ "bomRef": $. "bom-ref",
139
+ "srcFile": $prop($, 'SrcFile')
140
+ }
141
+ message: "ASAR archive '{{ name }}' has Electron signing metadata that failed verification"
142
+ mitigation: "Rebuild the Electron package from trusted sources, verify the Info.plist ElectronAsarIntegrity data, and confirm the shipped ASAR matches the expected signed release artifact."
143
+ evidence: |
144
+ {
145
+ "signingDeclaredHash": $prop($, 'cdx:asar:signingDeclaredHash'),
146
+ "signingAlgorithm": $prop($, 'cdx:asar:signingAlgorithm'),
147
+ "signingSource": $prop($, 'cdx:asar:signingSource'),
148
+ "signingScope": $prop($, 'cdx:asar:signingScope'),
149
+ "signingVerified": $prop($, 'cdx:asar:signingVerified')
150
+ }
@@ -7,6 +7,7 @@
7
7
  description: "Browser extensions with <all_urls> or wildcard host permissions can access and manipulate content on most websites"
8
8
  severity: high
9
9
  category: chrome-extension
10
+ dry-run-support: full
10
11
  condition: |
11
12
  components[
12
13
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -35,6 +36,7 @@
35
36
  description: "Extensions that combine webRequest and webRequestBlocking can intercept and modify browser network traffic"
36
37
  severity: critical
37
38
  category: chrome-extension
39
+ dry-run-support: full
38
40
  condition: |
39
41
  components[
40
42
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -60,6 +62,7 @@
60
62
  description: "Extensions injecting content scripts at document_start together with broad host permissions increase pre-DOM execution risk"
61
63
  severity: high
62
64
  category: chrome-extension
65
+ dry-run-support: full
63
66
  condition: |
64
67
  components[
65
68
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -89,6 +92,7 @@
89
92
  description: "Autofill features handling credential or PII flows should be reviewed when broad host permissions are granted"
90
93
  severity: medium
91
94
  category: chrome-extension
95
+ dry-run-support: full
92
96
  condition: |
93
97
  components[
94
98
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -119,6 +123,7 @@
119
123
  description: "Extensions requesting file or device-adjacent capabilities alongside broad host scope can increase data collection and exfiltration risk."
120
124
  severity: high
121
125
  category: chrome-extension
126
+ dry-run-support: full
122
127
  condition: |
123
128
  components[
124
129
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -153,6 +158,7 @@
153
158
  description: "Extensions with explicit code-injection capability and broad host scope may execute arbitrary script logic across many origins."
154
159
  severity: critical
155
160
  category: chrome-extension
161
+ dry-run-support: full
156
162
  condition: |
157
163
  components[
158
164
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -183,6 +189,7 @@
183
189
  description: "Fingerprinting-related capability indicators combined with broad host access can increase tracking and privacy risk."
184
190
  severity: high
185
191
  category: chrome-extension
192
+ dry-run-support: full
186
193
  condition: |
187
194
  components[
188
195
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -213,6 +220,7 @@
213
220
  description: "Extensions targeting AI assistant domains (OpenAI/ChatGPT/Claude/Copilot) with code-injection capability should be reviewed for prompt/session manipulation risk."
214
221
  severity: high
215
222
  category: chrome-extension
223
+ dry-run-support: full
216
224
  condition: |
217
225
  components[
218
226
  $startsWith(purl, 'pkg:chrome-extension/')
@@ -7,8 +7,9 @@
7
7
  description: "GitHub Actions referenced by tag/branch in workflows with write permissions pose supply chain risk"
8
8
  severity: high
9
9
  category: ci-permission
10
+ dry-run-support: full
10
11
  attack:
11
- tactics: [TA0001, TA0004]
12
+ tactics: [TA0001]
12
13
  techniques: [T1195.001]
13
14
  condition: |
14
15
  $auditComponents($)[
@@ -37,6 +38,7 @@
37
38
  description: "Workflows or jobs granting id-token:write to third-party actions may enable token exfiltration"
38
39
  severity: high
39
40
  category: ci-permission
41
+ dry-run-support: full
40
42
  attack:
41
43
  tactics: [TA0006]
42
44
  techniques: [T1528]
@@ -68,8 +70,9 @@
68
70
  description: "GitHub Actions pinned to tags (vs SHA) can change behavior unexpectedly if tag is moved"
69
71
  severity: medium
70
72
  category: ci-permission
73
+ dry-run-support: full
71
74
  attack:
72
- tactics: [TA0001, TA0005]
75
+ tactics: [TA0001]
73
76
  techniques: [T1195.001]
74
77
  condition: |
75
78
  $auditComponents($)[
@@ -89,6 +92,7 @@
89
92
  description: "pull_request_target can execute code in the context of the base branch, risking secret exposure"
90
93
  severity: medium
91
94
  category: ci-permission
95
+ dry-run-support: full
92
96
  attack:
93
97
  tactics: [TA0001, TA0004]
94
98
  condition: |
@@ -112,8 +116,9 @@
112
116
  description: "actions/checkout with persist-credentials=true (default) exposes GITHUB_TOKEN to subsequent steps"
113
117
  severity: medium
114
118
  category: ci-permission
119
+ dry-run-support: full
115
120
  attack:
116
- tactics: [TA0004, TA0006]
121
+ tactics: [TA0006]
117
122
  techniques: [T1552]
118
123
  condition: |
119
124
  $auditComponents($)[
@@ -142,8 +147,9 @@
142
147
  description: "GitHub Actions cache can be poisoned when used in workflows triggered by untrusted input (e.g., pull_request from forks)"
143
148
  severity: high
144
149
  category: ci-permission
150
+ dry-run-support: full
145
151
  attack:
146
- tactics: [TA0001, TA0005]
152
+ tactics: [TA0001]
147
153
  techniques: [T1195.001]
148
154
  condition: |
149
155
  $auditComponents($)[
@@ -180,8 +186,9 @@
180
186
  description: "Direct interpolation of github.event.* or inputs.* into run: blocks enables command injection"
181
187
  severity: critical
182
188
  category: ci-permission
189
+ dry-run-support: full
183
190
  attack:
184
- tactics: [TA0002, TA0004]
191
+ tactics: [TA0002]
185
192
  techniques: [T1059]
186
193
  condition: |
187
194
  $auditComponents($)[
@@ -205,6 +212,7 @@
205
212
  description: "Triggers like pull_request_target, issue_comment, or workflow_run combined with write permissions enable privilege escalation"
206
213
  severity: high
207
214
  category: ci-permission
215
+ dry-run-support: full
208
216
  attack:
209
217
  tactics: [TA0001, TA0004]
210
218
  condition: |
@@ -234,6 +242,7 @@
234
242
  description: "Hidden Unicode in workflow files can disguise malicious logic, comments, or diffs and should be reviewed before merge"
235
243
  severity: medium
236
244
  category: ci-permission
245
+ dry-run-support: full
237
246
  attack:
238
247
  tactics: [TA0005]
239
248
  techniques: [T1027]
@@ -260,8 +269,9 @@
260
269
  description: "npm and PyPI publishing should prefer trusted publishing or OIDC-backed flows instead of long-lived token secrets or explicit --token arguments"
261
270
  severity: medium
262
271
  category: ci-permission
272
+ dry-run-support: full
263
273
  attack:
264
- tactics: [TA0006, TA0010]
274
+ tactics: [TA0006]
265
275
  techniques: [T1528]
266
276
  condition: |
267
277
  $auditComponents($)[
@@ -287,8 +297,9 @@
287
297
  description: "Reusable workflows invoked from external repositories with secrets: inherit expand the trust boundary and can expose repository credentials"
288
298
  severity: high
289
299
  category: ci-permission
300
+ dry-run-support: full
290
301
  attack:
291
- tactics: [TA0006, TA0008]
302
+ tactics: [TA0006]
292
303
  techniques: [T1528, T1552]
293
304
  condition: |
294
305
  $auditComponents($)[
@@ -315,8 +326,9 @@
315
326
  description: "Reusable workflows referenced by tag or branch can change behavior without review and should be pinned to immutable SHAs"
316
327
  severity: medium
317
328
  category: ci-permission
329
+ dry-run-support: full
318
330
  attack:
319
- tactics: [TA0001, TA0005]
331
+ tactics: [TA0001]
320
332
  techniques: [T1195.001]
321
333
  condition: |
322
334
  $auditComponents($)[
@@ -342,6 +354,7 @@
342
354
  description: "High-risk triggers executing on self-hosted runners can expose internal network access, credentials, and long-lived runner state"
343
355
  severity: high
344
356
  category: ci-permission
357
+ dry-run-support: full
345
358
  attack:
346
359
  tactics: [TA0004, TA0008]
347
360
  condition: |
@@ -373,8 +386,9 @@
373
386
  description: "Writing to GITHUB_ENV, GITHUB_PATH, or GITHUB_OUTPUT in privileged workflows can persist attacker-controlled state across later steps and jobs"
374
387
  severity: high
375
388
  category: ci-permission
389
+ dry-run-support: full
376
390
  attack:
377
- tactics: [TA0003, TA0004, TA0005]
391
+ tactics: [TA0002]
378
392
  techniques: [T1059]
379
393
  condition: |
380
394
  $auditComponents($)[
@@ -406,8 +420,9 @@
406
420
  description: "Run steps that invoke outbound network tools while transmitting secrets, github.token, or OIDC request context are strong exfiltration indicators"
407
421
  severity: high
408
422
  category: ci-permission
423
+ dry-run-support: full
409
424
  attack:
410
- tactics: [TA0006, TA0010]
425
+ tactics: [TA0010]
411
426
  techniques: [T1048]
412
427
  condition: |
413
428
  $auditComponents($)[
@@ -436,8 +451,9 @@
436
451
  description: "workflow_call producers that request caller-provided secrets while also holding write or OIDC permissions expand the blast radius across repositories and workflows"
437
452
  severity: high
438
453
  category: ci-permission
454
+ dry-run-support: full
439
455
  attack:
440
- tactics: [TA0006, TA0008]
456
+ tactics: [TA0006]
441
457
  techniques: [T1528, T1552]
442
458
  condition: |
443
459
  $auditWorkflows($)[
@@ -468,6 +484,7 @@
468
484
  description: "workflow_call producers that both accept caller-controlled inputs and emit outputs from privileged execution contexts can propagate unsafe values into downstream trusted jobs"
469
485
  severity: medium
470
486
  category: ci-permission
487
+ dry-run-support: full
471
488
  attack:
472
489
  tactics: [TA0003, TA0004]
473
490
  condition: |
@@ -500,8 +517,9 @@
500
517
  description: "Dispatching workflow_dispatch or repository_dispatch from fork-reachable or privileged jobs can create a lateral-movement path into downstream workflows with broader credentials"
501
518
  severity: high
502
519
  category: ci-permission
520
+ dry-run-support: full
503
521
  attack:
504
- tactics: [TA0004, TA0008]
522
+ tactics: [TA0006]
505
523
  techniques: [T1528]
506
524
  condition: |
507
525
  $auditComponents($)[
@@ -543,8 +561,9 @@
543
561
  description: "Dispatch chains that inspect pull_request head-repository or fork context before invoking downstream workflows are strong signals of fork-to-privileged lateral movement"
544
562
  severity: critical
545
563
  category: ci-permission
564
+ dry-run-support: full
546
565
  attack:
547
- tactics: [TA0004, TA0008]
566
+ tactics: [TA0006]
548
567
  techniques: [T1528, T1552]
549
568
  condition: |
550
569
  $auditComponents($)[
@@ -581,8 +600,9 @@
581
600
  description: "Checking out github.event.pull_request.head.* repository or ref inside pull_request_target executes untrusted fork code with base-repository privileges"
582
601
  severity: critical
583
602
  category: ci-permission
603
+ dry-run-support: full
584
604
  attack:
585
- tactics: [TA0001, TA0004]
605
+ tactics: [TA0001, TA0006]
586
606
  techniques: [T1195.001, T1552]
587
607
  condition: |
588
608
  $auditComponents($)[
@@ -616,8 +636,9 @@
616
636
  description: "High-risk GitHub Actions workflows that omit explicit permissions blocks while still performing sensitive operations may rely on repository-default token scopes. This is a review heuristic, not proof of write access."
617
637
  severity: medium
618
638
  category: ci-permission
639
+ dry-run-support: full
619
640
  attack:
620
- tactics: [TA0004, TA0006]
641
+ tactics: [TA0006]
621
642
  techniques: [T1528, T1552]
622
643
  condition: |
623
644
  $auditComponents($)[
@@ -649,8 +670,9 @@
649
670
  description: "Explicitly disabling setup-node caching reduces tamper resistance and reviewability when npm dependencies are resolved from remote package distributions"
650
671
  severity: medium
651
672
  category: ci-permission
673
+ dry-run-support: full
652
674
  attack:
653
- tactics: [TA0005]
675
+ tactics: [TA0001]
654
676
  techniques: [T1195.001]
655
677
  condition: |
656
678
  $auditComponents($)[
@@ -706,8 +728,9 @@
706
728
  description: "Explicitly disabling setup-python caching reduces tamper resistance and reviewability when PyPI dependencies are resolved from remote archives or VCS sources"
707
729
  severity: medium
708
730
  category: ci-permission
731
+ dry-run-support: full
709
732
  attack:
710
- tactics: [TA0005]
733
+ tactics: [TA0001]
711
734
  techniques: [T1195.001]
712
735
  condition: |
713
736
  $auditComponents($)[
@@ -747,8 +770,9 @@
747
770
  description: "Explicitly disabling Cargo setup caching reduces tamper resistance and reviewability when Cargo manifests rely on git dependencies"
748
771
  severity: medium
749
772
  category: ci-permission
773
+ dry-run-support: full
750
774
  attack:
751
- tactics: [TA0005]
775
+ tactics: [TA0001]
752
776
  techniques: [T1195.001]
753
777
  condition: |
754
778
  $auditComponents($)[