@cyclonedx/cdxgen 12.3.2 → 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 (182) hide show
  1. package/README.md +70 -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 +171 -15
  20. package/data/rules/container-risk.yaml +14 -7
  21. package/data/rules/dependency-sources.yaml +76 -5
  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 +36 -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 +647 -127
  38. package/lib/cli/index.poku.js +1905 -187
  39. package/lib/evinser/evinser.js +14 -9
  40. package/lib/helpers/agentFormulationParser.js +6 -2
  41. package/lib/helpers/agentFormulationParser.poku.js +42 -0
  42. package/lib/helpers/analyzer.js +1444 -38
  43. package/lib/helpers/analyzer.poku.js +409 -0
  44. package/lib/helpers/analyzerScope.js +712 -0
  45. package/lib/helpers/asarutils.js +1556 -0
  46. package/lib/helpers/asarutils.poku.js +443 -0
  47. package/lib/helpers/auditCategories.js +12 -0
  48. package/lib/helpers/auditCategories.poku.js +32 -0
  49. package/lib/helpers/cbomutils.js +271 -1
  50. package/lib/helpers/cbomutils.poku.js +248 -5
  51. package/lib/helpers/chromextutils.js +25 -3
  52. package/lib/helpers/chromextutils.poku.js +68 -0
  53. package/lib/helpers/ciParsers/githubActions.js +79 -0
  54. package/lib/helpers/ciParsers/githubActions.poku.js +103 -0
  55. package/lib/helpers/communityAiConfigParser.js +15 -5
  56. package/lib/helpers/communityAiConfigParser.poku.js +71 -0
  57. package/lib/helpers/depsUtils.js +5 -0
  58. package/lib/helpers/depsUtils.poku.js +55 -0
  59. package/lib/helpers/display.js +336 -23
  60. package/lib/helpers/display.poku.js +179 -43
  61. package/lib/helpers/evidenceUtils.js +58 -0
  62. package/lib/helpers/evidenceUtils.poku.js +54 -0
  63. package/lib/helpers/exportUtils.js +9 -0
  64. package/lib/helpers/gtfobins.js +142 -8
  65. package/lib/helpers/gtfobins.poku.js +24 -1
  66. package/lib/helpers/hbom.js +710 -0
  67. package/lib/helpers/hbom.poku.js +496 -0
  68. package/lib/helpers/hbomAnalysis.js +268 -0
  69. package/lib/helpers/hbomAnalysis.poku.js +249 -0
  70. package/lib/helpers/hbomLoader.js +35 -0
  71. package/lib/helpers/hostTopology.js +803 -0
  72. package/lib/helpers/hostTopology.poku.js +363 -0
  73. package/lib/helpers/inventoryStats.js +69 -0
  74. package/lib/helpers/inventoryStats.poku.js +86 -0
  75. package/lib/helpers/lolbas.js +19 -1
  76. package/lib/helpers/lolbas.poku.js +23 -0
  77. package/lib/helpers/mcpConfigParser.js +21 -5
  78. package/lib/helpers/mcpConfigParser.poku.js +39 -2
  79. package/lib/helpers/osqueryTransform.js +47 -0
  80. package/lib/helpers/osqueryTransform.poku.js +47 -0
  81. package/lib/helpers/plugins.js +349 -0
  82. package/lib/helpers/plugins.poku.js +57 -0
  83. package/lib/helpers/propertySanitizer.js +121 -0
  84. package/lib/helpers/protobom.js +156 -45
  85. package/lib/helpers/protobom.poku.js +140 -5
  86. package/lib/helpers/remote/dependency-track.js +36 -3
  87. package/lib/helpers/remote/dependency-track.poku.js +44 -0
  88. package/lib/helpers/source.js +24 -0
  89. package/lib/helpers/source.poku.js +32 -0
  90. package/lib/helpers/utils.js +2454 -198
  91. package/lib/helpers/utils.poku.js +1798 -74
  92. package/lib/managers/binary.e2e.poku.js +367 -0
  93. package/lib/managers/binary.js +2306 -350
  94. package/lib/managers/binary.poku.js +1700 -1
  95. package/lib/managers/docker.js +441 -95
  96. package/lib/managers/docker.poku.js +1479 -14
  97. package/lib/server/server.js +2 -24
  98. package/lib/server/server.poku.js +36 -1
  99. package/lib/stages/postgen/annotator.js +38 -0
  100. package/lib/stages/postgen/annotator.poku.js +107 -1
  101. package/lib/stages/postgen/auditBom.js +121 -18
  102. package/lib/stages/postgen/auditBom.poku.js +2967 -990
  103. package/lib/stages/postgen/hostTopologyAudit.poku.js +186 -0
  104. package/lib/stages/postgen/postgen.js +192 -1
  105. package/lib/stages/postgen/postgen.poku.js +321 -0
  106. package/lib/stages/postgen/ruleEngine.js +116 -0
  107. package/lib/stages/pregen/envAudit.js +14 -3
  108. package/package.json +24 -21
  109. package/types/bin/hbom.d.ts +3 -0
  110. package/types/bin/hbom.d.ts.map +1 -0
  111. package/types/bin/repl.d.ts.map +1 -1
  112. package/types/lib/audit/index.d.ts +44 -0
  113. package/types/lib/audit/index.d.ts.map +1 -1
  114. package/types/lib/audit/reporters.d.ts +16 -0
  115. package/types/lib/audit/reporters.d.ts.map +1 -1
  116. package/types/lib/audit/targets.d.ts.map +1 -1
  117. package/types/lib/cli/index.d.ts +16 -0
  118. package/types/lib/cli/index.d.ts.map +1 -1
  119. package/types/lib/evinser/evinser.d.ts +4 -0
  120. package/types/lib/evinser/evinser.d.ts.map +1 -1
  121. package/types/lib/helpers/agentFormulationParser.d.ts.map +1 -1
  122. package/types/lib/helpers/analyzer.d.ts +33 -0
  123. package/types/lib/helpers/analyzer.d.ts.map +1 -1
  124. package/types/lib/helpers/analyzerScope.d.ts +11 -0
  125. package/types/lib/helpers/analyzerScope.d.ts.map +1 -0
  126. package/types/lib/helpers/asarutils.d.ts +34 -0
  127. package/types/lib/helpers/asarutils.d.ts.map +1 -0
  128. package/types/lib/helpers/auditCategories.d.ts +5 -0
  129. package/types/lib/helpers/auditCategories.d.ts.map +1 -1
  130. package/types/lib/helpers/cbomutils.d.ts +3 -2
  131. package/types/lib/helpers/cbomutils.d.ts.map +1 -1
  132. package/types/lib/helpers/chromextutils.d.ts.map +1 -1
  133. package/types/lib/helpers/ciParsers/githubActions.d.ts.map +1 -1
  134. package/types/lib/helpers/communityAiConfigParser.d.ts.map +1 -1
  135. package/types/lib/helpers/depsUtils.d.ts.map +1 -1
  136. package/types/lib/helpers/display.d.ts +1 -0
  137. package/types/lib/helpers/display.d.ts.map +1 -1
  138. package/types/lib/helpers/evidenceUtils.d.ts +8 -0
  139. package/types/lib/helpers/evidenceUtils.d.ts.map +1 -0
  140. package/types/lib/helpers/exportUtils.d.ts.map +1 -1
  141. package/types/lib/helpers/gtfobins.d.ts +8 -0
  142. package/types/lib/helpers/gtfobins.d.ts.map +1 -1
  143. package/types/lib/helpers/hbom.d.ts +49 -0
  144. package/types/lib/helpers/hbom.d.ts.map +1 -0
  145. package/types/lib/helpers/hbomAnalysis.d.ts +62 -0
  146. package/types/lib/helpers/hbomAnalysis.d.ts.map +1 -0
  147. package/types/lib/helpers/hbomLoader.d.ts +7 -0
  148. package/types/lib/helpers/hbomLoader.d.ts.map +1 -0
  149. package/types/lib/helpers/hostTopology.d.ts +12 -0
  150. package/types/lib/helpers/hostTopology.d.ts.map +1 -0
  151. package/types/lib/helpers/inventoryStats.d.ts +11 -0
  152. package/types/lib/helpers/inventoryStats.d.ts.map +1 -0
  153. package/types/lib/helpers/lolbas.d.ts.map +1 -1
  154. package/types/lib/helpers/mcpConfigParser.d.ts +1 -1
  155. package/types/lib/helpers/mcpConfigParser.d.ts.map +1 -1
  156. package/types/lib/helpers/osqueryTransform.d.ts +3 -0
  157. package/types/lib/helpers/osqueryTransform.d.ts.map +1 -1
  158. package/types/lib/helpers/plugins.d.ts +58 -0
  159. package/types/lib/helpers/plugins.d.ts.map +1 -0
  160. package/types/lib/helpers/propertySanitizer.d.ts +3 -0
  161. package/types/lib/helpers/propertySanitizer.d.ts.map +1 -0
  162. package/types/lib/helpers/protobom.d.ts +3 -4
  163. package/types/lib/helpers/protobom.d.ts.map +1 -1
  164. package/types/lib/helpers/remote/dependency-track.d.ts +10 -3
  165. package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
  166. package/types/lib/helpers/source.d.ts.map +1 -1
  167. package/types/lib/helpers/utils.d.ts +74 -8
  168. package/types/lib/helpers/utils.d.ts.map +1 -1
  169. package/types/lib/managers/binary.d.ts +5 -0
  170. package/types/lib/managers/binary.d.ts.map +1 -1
  171. package/types/lib/managers/docker.d.ts +3 -0
  172. package/types/lib/managers/docker.d.ts.map +1 -1
  173. package/types/lib/server/server.d.ts +2 -0
  174. package/types/lib/server/server.d.ts.map +1 -1
  175. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  176. package/types/lib/stages/postgen/auditBom.d.ts +26 -1
  177. package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
  178. package/types/lib/stages/postgen/postgen.d.ts +2 -1
  179. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  180. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  181. package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
  182. package/data/spdx-model-v3.0.1.jsonld +0 -15999
@@ -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($)[
@@ -642,5 +663,140 @@
642
663
  "sensitiveOperations": $prop($, 'cdx:github:step:sensitiveOperations'),
643
664
  "sensitiveContextRefs": $prop($, 'cdx:github:step:sensitiveContextRefs'),
644
665
  "dispatchKinds": $prop($, 'cdx:github:step:dispatchKinds')
666
+ }
667
+
668
+ - id: CI-022
669
+ name: "npm setup action disables build cache despite resolved package distributions"
670
+ description: "Explicitly disabling setup-node caching reduces tamper resistance and reviewability when npm dependencies are resolved from remote package distributions"
671
+ severity: medium
672
+ category: ci-permission
673
+ dry-run-support: full
674
+ attack:
675
+ tactics: [TA0001]
676
+ techniques: [T1195.001]
677
+ condition: |
678
+ $auditComponents($)[
679
+ $prop($, 'cdx:github:action:disablesBuildCache') = 'true'
680
+ and $prop($, 'cdx:github:action:buildCacheEcosystem') = 'npm'
681
+ and $count($$.components[
682
+ $startsWith(purl, 'pkg:npm/')
683
+ and (
684
+ $contains($lowercase($nullSafeProp($, 'cdx:npm:manifestSourceType')), 'git')
685
+ or $contains($lowercase($nullSafeProp($, 'cdx:npm:manifestSourceType')), 'url')
686
+ )
687
+ and $count(externalReferences[
688
+ type = 'distribution'
689
+ and (
690
+ $startsWith($lowercase(url), 'git+')
691
+ or $startsWith($lowercase(url), 'http://')
692
+ or $startsWith($lowercase(url), 'https://')
693
+ )
694
+ ]) > 0
695
+ ]) > 0
696
+ ]
697
+ location: |
698
+ {
699
+ "bomRef": $."bom-ref",
700
+ "purl": purl,
701
+ "file": $prop($, 'cdx:github:workflow:file')
702
+ }
703
+ message: "GitHub Action '{{ $prop($, 'cdx:github:action:uses') }}' explicitly disables npm build caching while resolved npm package distributions are present in the BOM"
704
+ mitigation: "Keep setup-node caching enabled unless you have a reviewed exception; disabling cache can weaken integrity checks and provenance review for resolved npm artifacts"
705
+ evidence: |
706
+ {
707
+ "cacheDisableInput": $prop($, 'cdx:github:action:buildCacheDisableInput'),
708
+ "cacheDisableValue": $prop($, 'cdx:github:action:buildCacheDisableValue'),
709
+ "matchingPackages": $$.components[
710
+ $startsWith(purl, 'pkg:npm/')
711
+ and (
712
+ $contains($lowercase($nullSafeProp($, 'cdx:npm:manifestSourceType')), 'git')
713
+ or $contains($lowercase($nullSafeProp($, 'cdx:npm:manifestSourceType')), 'url')
714
+ )
715
+ and $count(externalReferences[
716
+ type = 'distribution'
717
+ and (
718
+ $startsWith($lowercase(url), 'git+')
719
+ or $startsWith($lowercase(url), 'http://')
720
+ or $startsWith($lowercase(url), 'https://')
721
+ )
722
+ ]) > 0
723
+ ].purl
724
+ }
725
+
726
+ - id: CI-023
727
+ name: "Python setup action disables build cache despite resolved package distributions"
728
+ description: "Explicitly disabling setup-python caching reduces tamper resistance and reviewability when PyPI dependencies are resolved from remote archives or VCS sources"
729
+ severity: medium
730
+ category: ci-permission
731
+ dry-run-support: full
732
+ attack:
733
+ tactics: [TA0001]
734
+ techniques: [T1195.001]
735
+ condition: |
736
+ $auditComponents($)[
737
+ $prop($, 'cdx:github:action:disablesBuildCache') = 'true'
738
+ and $prop($, 'cdx:github:action:buildCacheEcosystem') = 'pypi'
739
+ and $count($$.components[
740
+ $startsWith(purl, 'pkg:pypi/')
741
+ and (
742
+ $contains($lowercase($nullSafeProp($, 'cdx:pypi:manifestSourceType')), 'git')
743
+ or $contains($lowercase($nullSafeProp($, 'cdx:pypi:manifestSourceType')), 'url')
744
+ )
745
+ ]) > 0
746
+ ]
747
+ location: |
748
+ {
749
+ "bomRef": $."bom-ref",
750
+ "purl": purl,
751
+ "file": $prop($, 'cdx:github:workflow:file')
752
+ }
753
+ message: "GitHub Action '{{ $prop($, 'cdx:github:action:uses') }}' explicitly disables Python build caching while resolved PyPI package distributions are present in the BOM"
754
+ mitigation: "Keep setup-python caching enabled when lockfiles resolve remote archives or VCS sources unless you have a reviewed exception"
755
+ evidence: |
756
+ {
757
+ "cacheDisableInput": $prop($, 'cdx:github:action:buildCacheDisableInput'),
758
+ "cacheDisableValue": $prop($, 'cdx:github:action:buildCacheDisableValue'),
759
+ "matchingPackages": $$.components[
760
+ $startsWith(purl, 'pkg:pypi/')
761
+ and (
762
+ $contains($lowercase($nullSafeProp($, 'cdx:pypi:manifestSourceType')), 'git')
763
+ or $contains($lowercase($nullSafeProp($, 'cdx:pypi:manifestSourceType')), 'url')
764
+ )
765
+ ].purl
645
766
  }
646
767
 
768
+ - id: CI-024
769
+ name: "Cargo setup action disables build cache despite manifest-declared git dependencies"
770
+ description: "Explicitly disabling Cargo setup caching reduces tamper resistance and reviewability when Cargo manifests rely on git dependencies"
771
+ severity: medium
772
+ category: ci-permission
773
+ dry-run-support: full
774
+ attack:
775
+ tactics: [TA0001]
776
+ techniques: [T1195.001]
777
+ condition: |
778
+ $auditComponents($)[
779
+ $prop($, 'cdx:github:action:disablesBuildCache') = 'true'
780
+ and $prop($, 'cdx:github:action:buildCacheEcosystem') = 'cargo'
781
+ and $count($$.components[
782
+ $startsWith(purl, 'pkg:cargo/')
783
+ and $hasProp($, 'cdx:cargo:git')
784
+ ]) > 0
785
+ ]
786
+ location: |
787
+ {
788
+ "bomRef": $."bom-ref",
789
+ "purl": purl,
790
+ "file": $prop($, 'cdx:github:workflow:file')
791
+ }
792
+ message: "GitHub Action '{{ $prop($, 'cdx:github:action:uses') }}' explicitly disables Cargo build caching while manifest-declared Cargo git dependencies are present in the BOM"
793
+ mitigation: "Keep Cargo setup caching enabled when manifests rely on git dependencies unless you have a reviewed exception"
794
+ evidence: |
795
+ {
796
+ "cacheDisableInput": $prop($, 'cdx:github:action:buildCacheDisableInput'),
797
+ "cacheDisableValue": $prop($, 'cdx:github:action:buildCacheDisableValue'),
798
+ "matchingPackages": $$.components[
799
+ $startsWith(purl, 'pkg:cargo/')
800
+ and $hasProp($, 'cdx:cargo:git')
801
+ ].purl
802
+ }
@@ -3,6 +3,7 @@
3
3
  description: "Known GTFOBins execution helpers become materially riskier when the image keeps the binary setuid or setgid."
4
4
  severity: critical
5
5
  category: container-risk
6
+ dry-run-support: full
6
7
  condition: |
7
8
  components[
8
9
  $prop($, 'cdx:gtfobins:matched') = 'true'
@@ -26,7 +27,7 @@
26
27
  message: "Executable '{{ name }}' at '{{ $prop($, 'SrcFile') }}' combines GTFOBins execution features with setuid/setgid permissions"
27
28
  mitigation: "Remove the setuid/setgid bit, replace the image with a slimmer base, and keep container privilege boundaries strict (no host mounts, no privileged mode, no extra capabilities)."
28
29
  attack:
29
- tactics: [TA0004, TA0008]
30
+ tactics: [TA0004]
30
31
  techniques: [T1548, T1611]
31
32
  evidence: |
32
33
  {
@@ -43,6 +44,7 @@
43
44
  description: "Container runtime or namespace-management helpers that are already classified as GTFOBins can accelerate container breakout when runtime isolation is weakened."
44
45
  severity: critical
45
46
  category: container-risk
47
+ dry-run-support: full
46
48
  condition: |
47
49
  components[
48
50
  $prop($, 'cdx:gtfobins:matched') = 'true'
@@ -62,7 +64,7 @@
62
64
  message: "Container-escape helper '{{ name }}' is present at '{{ $prop($, 'SrcFile') }}' with elevated execution semantics"
63
65
  mitigation: "Remove container runtime and namespace-management tooling from application images, avoid CAP_SYS_ADMIN-like capability grants, and block access to the Docker/containerd sockets."
64
66
  attack:
65
- tactics: [TA0004, TA0008]
67
+ tactics: [TA0004]
66
68
  techniques: [T1611]
67
69
  evidence: |
68
70
  {
@@ -77,6 +79,7 @@
77
79
  description: "GTFOBins entries that can load attacker-controlled shared libraries or directly escalate privileges are strong hardening failures in container images."
78
80
  severity: high
79
81
  category: container-risk
82
+ dry-run-support: full
80
83
  condition: |
81
84
  components[
82
85
  $prop($, 'cdx:gtfobins:matched') = 'true'
@@ -101,7 +104,7 @@
101
104
  message: "Binary '{{ name }}' exposes GTFOBins privilege-escalation or library-load behavior in a privileged execution context"
102
105
  mitigation: "Remove the helper from the image where possible, strip privileged bits/capabilities, and keep writable mounts away from privileged processes."
103
106
  attack:
104
- tactics: [TA0003, TA0004]
107
+ tactics: [TA0002, TA0004, TA0005]
105
108
  techniques: [T1574, T1548]
106
109
  evidence: |
107
110
  {
@@ -116,6 +119,7 @@
116
119
  description: "A GTFOBins helper that can read local files or upload data becomes especially dangerous when it also runs with setuid/setgid or other elevated contexts."
117
120
  severity: high
118
121
  category: container-risk
122
+ dry-run-support: full
119
123
  condition: |
120
124
  components[
121
125
  $prop($, 'cdx:gtfobins:matched') = 'true'
@@ -140,7 +144,7 @@
140
144
  message: "Binary '{{ name }}' can read or exfiltrate local data from a privileged execution path"
141
145
  mitigation: "Drop privileged bits, keep secrets off the image filesystem, and remove unnecessary upload/file-read helpers from runtime images."
142
146
  attack:
143
- tactics: [TA0006, TA0010]
147
+ tactics: [TA0009, TA0010]
144
148
  techniques: [T1005, T1041]
145
149
  evidence: |
146
150
  {
@@ -155,6 +159,7 @@
155
159
  description: "Remote-execution-capable GTFOBins helpers under mutable or non-standard image paths often indicate an avoidable attack toolkit or image tampering."
156
160
  severity: medium
157
161
  category: container-risk
162
+ dry-run-support: full
158
163
  condition: |
159
164
  components[
160
165
  $prop($, 'cdx:gtfobins:matched') = 'true'
@@ -191,7 +196,7 @@
191
196
  message: "GTFOBins remote-execution helper '{{ name }}' is present in mutable image path '{{ $prop($, 'SrcFile') }}'"
192
197
  mitigation: "Keep runtime images immutable and minimal, move administrative tooling to separate debug images, and investigate how the helper entered the image."
193
198
  attack:
194
- tactics: [TA0001, TA0008]
199
+ tactics: [TA0008, TA0011]
195
200
  techniques: [T1105, T1570]
196
201
  evidence: |
197
202
  {
@@ -206,6 +211,7 @@
206
211
  description: "Dedicated container or Kubernetes intrusion toolkits such as Peirates, CDK, or DEEPCE should not ship inside production runtime images."
207
212
  severity: high
208
213
  category: container-risk
214
+ dry-run-support: full
209
215
  condition: |
210
216
  components[
211
217
  $prop($, 'cdx:container:matched') = 'true'
@@ -220,7 +226,7 @@
220
226
  message: "Dedicated offensive toolkit '{{ name }}' is present at '{{ $prop($, 'SrcFile') }}'"
221
227
  mitigation: "Remove offensive testing binaries from runtime images, rebuild from a minimal trusted base, and keep container debugging or red-team tooling in separate break-glass images."
222
228
  attack:
223
- tactics: [TA0003, TA0004, TA0006, TA0007, TA0008]
229
+ tactics: [TA0002, TA0004, TA0006, TA0007]
224
230
  techniques: [T1552.007, T1609, T1611, T1613]
225
231
  evidence: |
226
232
  {
@@ -237,6 +243,7 @@
237
243
  description: "Helpers that rely on syscalls blocked by Docker's default seccomp profile become materially riskier when operators use `seccomp=unconfined` or permissive custom profiles."
238
244
  severity: medium
239
245
  category: container-risk
246
+ dry-run-support: full
240
247
  condition: |
241
248
  components[
242
249
  $prop($, 'cdx:container:matched') = 'true'
@@ -256,7 +263,7 @@
256
263
  message: "Seccomp-sensitive escape helper '{{ name }}' is present at '{{ $prop($, 'SrcFile') }}' and depends on syscalls blocked by the Docker default seccomp profile"
257
264
  mitigation: "Keep Docker or OCI runtimes on the default seccomp profile, never use `seccomp=unconfined` for app workloads, and review custom profiles so they do not allow namespace or host-escape syscalls without a clear need."
258
265
  attack:
259
- tactics: [TA0004, TA0008]
266
+ tactics: [TA0004]
260
267
  techniques: [T1611]
261
268
  evidence: |
262
269
  {
@@ -2,21 +2,24 @@
2
2
  # Category: dependency-source
3
3
  # Evaluates package manager data for non-registry, local, or mutable sources
4
4
  - id: PKG-001
5
- name: "Install script from non-registry source"
6
- description: "npm packages with install scripts from git/file/local sources increase supply chain attack surface"
5
+ name: "Install script from direct manifest source"
6
+ description: "npm packages with install scripts declared from git, URL, or local path sources in the manifest increase supply chain attack surface"
7
7
  severity: high
8
8
  category: dependency-source
9
+ dry-run-support: full
9
10
  condition: |
10
11
  components[
11
12
  $prop($, 'cdx:npm:hasInstallScript') = 'true'
12
- and $prop($, 'cdx:npm:isRegistryDependency') = 'false'
13
+ and $hasProp($, 'cdx:npm:manifestSourceType')
13
14
  ]
14
15
  location: |
15
16
  { "bomRef": $."bom-ref", "purl": purl }
16
- message: "npm package '{{ name }}@{{ version }}' executes install script from non-registry source"
17
- mitigation: "Avoid git/file dependencies with lifecycle hooks; use registry dependencies or vendor explicitly"
17
+ message: "npm package '{{ name }}@{{ version }}' executes install script from manifest-declared source type(s): {{ $prop($, 'cdx:npm:manifestSourceType') }}"
18
+ mitigation: "Avoid git, URL, or local-path dependencies with lifecycle hooks; use registry-published dependencies or vendor explicitly"
18
19
  evidence: |
19
20
  {
21
+ "manifestSourceType": $prop($, 'cdx:npm:manifestSourceType'),
22
+ "manifestSource": $prop($, 'cdx:npm:manifestSource'),
20
23
  "riskyScripts": $prop($, 'cdx:npm:risky_scripts'),
21
24
  "resolvedPath": $prop($, 'cdx:npm:resolvedPath'),
22
25
  "isLink": $prop($, 'cdx:npm:isLink')
@@ -26,6 +29,7 @@
26
29
  description: "Go modules with local_dir replacements are non-hermetic and may not be reproducible"
27
30
  severity: high
28
31
  category: dependency-source
32
+ dry-run-support: full
29
33
  condition: |
30
34
  components[
31
35
  $hasProp($, 'cdx:go:local_dir')
@@ -44,6 +48,7 @@
44
48
  description: "Swift packages with localCheckoutPath indicate developer-only dependencies not suitable for release"
45
49
  severity: high
46
50
  category: dependency-source
51
+ dry-run-support: full
47
52
  condition: |
48
53
  components[
49
54
  $hasProp($, 'cdx:swift:localCheckoutPath')
@@ -62,6 +67,7 @@
62
67
  description: "Nix dependencies without revision or nar_hash cannot be verified for content integrity"
63
68
  severity: high
64
69
  category: dependency-source
70
+ dry-run-support: full
65
71
  condition: |
66
72
  components[
67
73
  $startsWith(purl, 'pkg:nix/')
@@ -86,6 +92,7 @@
86
92
  description: "Ruby gems sourced from git branches (without revision pin) can change unexpectedly"
87
93
  severity: medium
88
94
  category: dependency-source
95
+ dry-run-support: full
89
96
  condition: |
90
97
  components[
91
98
  $hasProp($, 'cdx:gem:remoteBranch')
@@ -106,6 +113,7 @@
106
113
  description: "PyPI packages from unapproved registries may introduce unvetted code"
107
114
  severity: low
108
115
  category: dependency-source
116
+ dry-run-support: full
109
117
  condition: |
110
118
  components[
111
119
  $hasProp($, 'cdx:pypi:registry')
@@ -126,6 +134,7 @@
126
134
  description: "Cargo git dependencies without revision or tag pinning can change unexpectedly and reduce build reproducibility"
127
135
  severity: high
128
136
  category: dependency-source
137
+ dry-run-support: full
129
138
  condition: |
130
139
  components[
131
140
  $hasProp($, 'cdx:cargo:git')
@@ -148,6 +157,7 @@
148
157
  description: "Cargo path dependencies are local source references that reduce release reproducibility and may bypass registry review controls"
149
158
  severity: high
150
159
  category: dependency-source
160
+ dry-run-support: full
151
161
  condition: |
152
162
  components[
153
163
  $hasProp($, 'cdx:cargo:path')
@@ -162,3 +172,64 @@
162
172
  "dependencyKind": $prop($, 'cdx:cargo:dependencyKind'),
163
173
  "target": $prop($, 'cdx:cargo:target')
164
174
  }
175
+ - id: PKG-009
176
+ name: "Collider package resolved from insecure HTTP origin"
177
+ description: "Collider lock entries that resolve from HTTP origins can be observed or modified in transit before wrap-hash verification occurs"
178
+ severity: medium
179
+ category: dependency-source
180
+ dry-run-support: full
181
+ condition: |
182
+ components[
183
+ $prop($, 'cdx:collider:originScheme') = 'http'
184
+ ]
185
+ location: |
186
+ { "bomRef": $."bom-ref", "purl": purl }
187
+ message: "Collider package '{{ name }}@{{ version }}' resolves from insecure origin '{{ $prop($, 'cdx:collider:origin') }}'"
188
+ mitigation: "Prefer HTTPS, trusted file:// repositories, or an authenticated internal mirror for Collider package origins"
189
+ evidence: |
190
+ {
191
+ "origin": $prop($, 'cdx:collider:origin'),
192
+ "originHost": $prop($, 'cdx:collider:originHost'),
193
+ "dependencyKind": $prop($, 'cdx:collider:dependencyKind')
194
+ }
195
+ - id: PKG-010
196
+ name: "Collider origin required sanitization before BOM emission"
197
+ description: "Collider lock origin URLs should not carry credentials, query strings, or fragments because those values may embed secrets or unstable signed URLs"
198
+ severity: low
199
+ category: dependency-source
200
+ dry-run-support: full
201
+ condition: |
202
+ components[
203
+ $prop($, 'cdx:collider:originSanitized') = 'true'
204
+ ]
205
+ location: |
206
+ { "bomRef": $."bom-ref", "purl": purl }
207
+ message: "Collider package '{{ name }}@{{ version }}' had sensitive origin fields stripped before BOM emission"
208
+ mitigation: "Avoid embedding credentials or signed query parameters in Collider repository origin URLs; prefer stable repository base URLs"
209
+ evidence: |
210
+ {
211
+ "origin": $prop($, 'cdx:collider:origin'),
212
+ "originHost": $prop($, 'cdx:collider:originHost'),
213
+ "dependencyKind": $prop($, 'cdx:collider:dependencyKind')
214
+ }
215
+ - id: PKG-011
216
+ name: "Python dependency uses direct manifest source"
217
+ description: "Python dependencies declared via git, direct URL, or local path in requirements or pyproject files bypass normal registry version mediation"
218
+ severity: high
219
+ category: dependency-source
220
+ dry-run-support: full
221
+ condition: |
222
+ components[
223
+ $hasProp($, 'cdx:pypi:manifestSourceType')
224
+ ]
225
+ location: |
226
+ { "bomRef": $."bom-ref", "purl": purl }
227
+ message: "Python package '{{ name }}@{{ version }}' is declared from manifest {{ $prop($, 'cdx:pypi:manifestSourceType') }} source '{{ $prop($, 'cdx:pypi:manifestSource') }}'"
228
+ mitigation: "Prefer registry-published releases for production builds, or pin and review direct git/URL/path sources explicitly"
229
+ evidence: |
230
+ {
231
+ "manifestSourceType": $prop($, 'cdx:pypi:manifestSourceType'),
232
+ "manifestSource": $prop($, 'cdx:pypi:manifestSource'),
233
+ "registry": $prop($, 'cdx:pypi:registry'),
234
+ "resolvedFrom": $prop($, 'cdx:pypi:resolved_from')
235
+ }