@cyclonedx/cdxgen 12.3.3 → 12.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +69 -25
  2. package/bin/audit.js +21 -7
  3. package/bin/cdxgen.js +270 -127
  4. package/bin/convert.js +34 -15
  5. package/bin/hbom.js +495 -0
  6. package/bin/repl.js +592 -37
  7. package/bin/validate.js +31 -4
  8. package/bin/verify.js +18 -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/cyclonedx-2.0-bundled.schema.json +7182 -0
  13. package/data/predictive-audit-allowlist.json +11 -0
  14. package/data/queries-darwin.json +12 -1
  15. package/data/queries-win.json +7 -1
  16. package/data/queries.json +39 -2
  17. package/data/rules/ai-agent-governance.yaml +16 -0
  18. package/data/rules/asar-archives.yaml +150 -0
  19. package/data/rules/chrome-extensions.yaml +8 -0
  20. package/data/rules/ci-permissions.yaml +42 -18
  21. package/data/rules/container-risk.yaml +14 -7
  22. package/data/rules/dependency-sources.yaml +11 -0
  23. package/data/rules/hbom-compliance.yaml +325 -0
  24. package/data/rules/hbom-performance.yaml +307 -0
  25. package/data/rules/hbom-security.yaml +248 -0
  26. package/data/rules/host-topology.yaml +165 -0
  27. package/data/rules/mcp-servers.yaml +18 -3
  28. package/data/rules/obom-runtime.yaml +907 -22
  29. package/data/rules/package-integrity.yaml +14 -0
  30. package/data/rules/rootfs-hardening.yaml +179 -0
  31. package/data/rules/vscode-extensions.yaml +9 -0
  32. package/lib/audit/index.js +210 -8
  33. package/lib/audit/index.poku.js +332 -0
  34. package/lib/audit/reporters.js +222 -0
  35. package/lib/audit/targets.js +146 -1
  36. package/lib/audit/targets.poku.js +186 -0
  37. package/lib/cli/asar.poku.js +328 -0
  38. package/lib/cli/index.js +527 -99
  39. package/lib/cli/index.poku.js +1469 -212
  40. package/lib/evinser/evinser.js +14 -9
  41. package/lib/helpers/analyzer.js +1406 -29
  42. package/lib/helpers/analyzer.poku.js +342 -0
  43. package/lib/helpers/analyzerScope.js +712 -0
  44. package/lib/helpers/asarutils.js +1556 -0
  45. package/lib/helpers/asarutils.poku.js +443 -0
  46. package/lib/helpers/auditCategories.js +12 -0
  47. package/lib/helpers/auditCategories.poku.js +32 -0
  48. package/lib/helpers/bomUtils.js +155 -1
  49. package/lib/helpers/bomUtils.poku.js +79 -1
  50. package/lib/helpers/cbomutils.js +271 -1
  51. package/lib/helpers/cbomutils.poku.js +248 -5
  52. package/lib/helpers/display.js +291 -1
  53. package/lib/helpers/display.poku.js +149 -0
  54. package/lib/helpers/evidenceUtils.js +58 -0
  55. package/lib/helpers/evidenceUtils.poku.js +54 -0
  56. package/lib/helpers/exportUtils.js +9 -0
  57. package/lib/helpers/gtfobins.js +142 -8
  58. package/lib/helpers/gtfobins.poku.js +24 -1
  59. package/lib/helpers/hbom.js +710 -0
  60. package/lib/helpers/hbom.poku.js +496 -0
  61. package/lib/helpers/hbomAnalysis.js +268 -0
  62. package/lib/helpers/hbomAnalysis.poku.js +249 -0
  63. package/lib/helpers/hbomLoader.js +35 -0
  64. package/lib/helpers/hostTopology.js +803 -0
  65. package/lib/helpers/hostTopology.poku.js +363 -0
  66. package/lib/helpers/inventoryStats.js +69 -0
  67. package/lib/helpers/inventoryStats.poku.js +86 -0
  68. package/lib/helpers/lolbas.js +19 -1
  69. package/lib/helpers/lolbas.poku.js +23 -0
  70. package/lib/helpers/osqueryTransform.js +47 -0
  71. package/lib/helpers/osqueryTransform.poku.js +47 -0
  72. package/lib/helpers/plugins.js +350 -0
  73. package/lib/helpers/plugins.poku.js +57 -0
  74. package/lib/helpers/protobom.js +209 -45
  75. package/lib/helpers/protobom.poku.js +183 -5
  76. package/lib/helpers/protobomLoader.js +43 -0
  77. package/lib/helpers/protobomLoader.poku.js +31 -0
  78. package/lib/helpers/remote/dependency-track.js +36 -3
  79. package/lib/helpers/remote/dependency-track.poku.js +44 -0
  80. package/lib/helpers/source.js +24 -0
  81. package/lib/helpers/source.poku.js +32 -0
  82. package/lib/helpers/utils.js +1438 -93
  83. package/lib/helpers/utils.poku.js +846 -4
  84. package/lib/managers/binary.e2e.poku.js +367 -0
  85. package/lib/managers/binary.js +2293 -353
  86. package/lib/managers/binary.poku.js +1699 -1
  87. package/lib/managers/docker.js +201 -79
  88. package/lib/managers/docker.poku.js +337 -12
  89. package/lib/server/server.js +4 -28
  90. package/lib/stages/postgen/annotator.js +38 -0
  91. package/lib/stages/postgen/annotator.poku.js +107 -1
  92. package/lib/stages/postgen/auditBom.js +121 -18
  93. package/lib/stages/postgen/auditBom.poku.js +1366 -31
  94. package/lib/stages/postgen/hostTopologyAudit.poku.js +186 -0
  95. package/lib/stages/postgen/postgen.js +406 -8
  96. package/lib/stages/postgen/postgen.poku.js +484 -0
  97. package/lib/stages/postgen/ruleEngine.js +116 -0
  98. package/lib/stages/pregen/envAudit.js +14 -3
  99. package/lib/validator/bomValidator.js +90 -38
  100. package/lib/validator/bomValidator.poku.js +90 -0
  101. package/lib/validator/complianceRules.js +4 -2
  102. package/lib/validator/index.poku.js +14 -0
  103. package/package.json +23 -21
  104. package/types/bin/hbom.d.ts +3 -0
  105. package/types/bin/hbom.d.ts.map +1 -0
  106. package/types/bin/repl.d.ts +1 -1
  107. package/types/bin/repl.d.ts.map +1 -1
  108. package/types/lib/audit/index.d.ts +44 -0
  109. package/types/lib/audit/index.d.ts.map +1 -1
  110. package/types/lib/audit/reporters.d.ts +16 -0
  111. package/types/lib/audit/reporters.d.ts.map +1 -1
  112. package/types/lib/audit/targets.d.ts.map +1 -1
  113. package/types/lib/cli/index.d.ts +16 -0
  114. package/types/lib/cli/index.d.ts.map +1 -1
  115. package/types/lib/evinser/evinser.d.ts +4 -0
  116. package/types/lib/evinser/evinser.d.ts.map +1 -1
  117. package/types/lib/helpers/analyzer.d.ts +33 -0
  118. package/types/lib/helpers/analyzer.d.ts.map +1 -1
  119. package/types/lib/helpers/analyzerScope.d.ts +11 -0
  120. package/types/lib/helpers/analyzerScope.d.ts.map +1 -0
  121. package/types/lib/helpers/asarutils.d.ts +34 -0
  122. package/types/lib/helpers/asarutils.d.ts.map +1 -0
  123. package/types/lib/helpers/auditCategories.d.ts +5 -0
  124. package/types/lib/helpers/auditCategories.d.ts.map +1 -1
  125. package/types/lib/helpers/bomUtils.d.ts +10 -0
  126. package/types/lib/helpers/bomUtils.d.ts.map +1 -1
  127. package/types/lib/helpers/cbomutils.d.ts +3 -2
  128. package/types/lib/helpers/cbomutils.d.ts.map +1 -1
  129. package/types/lib/helpers/display.d.ts.map +1 -1
  130. package/types/lib/helpers/evidenceUtils.d.ts +8 -0
  131. package/types/lib/helpers/evidenceUtils.d.ts.map +1 -0
  132. package/types/lib/helpers/exportUtils.d.ts.map +1 -1
  133. package/types/lib/helpers/gtfobins.d.ts +8 -0
  134. package/types/lib/helpers/gtfobins.d.ts.map +1 -1
  135. package/types/lib/helpers/hbom.d.ts +49 -0
  136. package/types/lib/helpers/hbom.d.ts.map +1 -0
  137. package/types/lib/helpers/hbomAnalysis.d.ts +76 -0
  138. package/types/lib/helpers/hbomAnalysis.d.ts.map +1 -0
  139. package/types/lib/helpers/hbomLoader.d.ts +7 -0
  140. package/types/lib/helpers/hbomLoader.d.ts.map +1 -0
  141. package/types/lib/helpers/hostTopology.d.ts +12 -0
  142. package/types/lib/helpers/hostTopology.d.ts.map +1 -0
  143. package/types/lib/helpers/inventoryStats.d.ts +11 -0
  144. package/types/lib/helpers/inventoryStats.d.ts.map +1 -0
  145. package/types/lib/helpers/lolbas.d.ts.map +1 -1
  146. package/types/lib/helpers/osqueryTransform.d.ts +3 -0
  147. package/types/lib/helpers/osqueryTransform.d.ts.map +1 -1
  148. package/types/lib/helpers/plugins.d.ts +58 -0
  149. package/types/lib/helpers/plugins.d.ts.map +1 -0
  150. package/types/lib/helpers/protobom.d.ts +5 -4
  151. package/types/lib/helpers/protobom.d.ts.map +1 -1
  152. package/types/lib/helpers/protobomLoader.d.ts +17 -0
  153. package/types/lib/helpers/protobomLoader.d.ts.map +1 -0
  154. package/types/lib/helpers/remote/dependency-track.d.ts +10 -3
  155. package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
  156. package/types/lib/helpers/source.d.ts.map +1 -1
  157. package/types/lib/helpers/utils.d.ts +45 -8
  158. package/types/lib/helpers/utils.d.ts.map +1 -1
  159. package/types/lib/managers/binary.d.ts +5 -0
  160. package/types/lib/managers/binary.d.ts.map +1 -1
  161. package/types/lib/managers/docker.d.ts.map +1 -1
  162. package/types/lib/server/server.d.ts +2 -1
  163. package/types/lib/server/server.d.ts.map +1 -1
  164. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  165. package/types/lib/stages/postgen/auditBom.d.ts +26 -1
  166. package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
  167. package/types/lib/stages/postgen/postgen.d.ts +2 -1
  168. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  169. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  170. package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
  171. package/types/lib/third-party/arborist/lib/node.d.ts +23 -0
  172. package/types/lib/third-party/arborist/lib/node.d.ts.map +1 -1
  173. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  174. package/types/lib/validator/complianceRules.d.ts.map +1 -1
  175. package/data/spdx-model-v3.0.1.jsonld +0 -15999
@@ -0,0 +1,325 @@
1
+ # HBOM Compliance and Governance Rules
2
+ # Category: hbom-compliance
3
+ # Evaluates hardware inventory completeness, redaction posture, and governance-ready evidence.
4
+
5
+ - id: HBC-001
6
+ name: "HBOM inventory lacks firmware or board provenance"
7
+ description: "Incomplete firmware or board provenance weakens auditability for hardware refresh, attestation, and patch-governance workflows."
8
+ severity: medium
9
+ category: hbom-compliance
10
+ dry-run-support: full
11
+ standards:
12
+ nist-800-53:
13
+ - "CM-8 System Component Inventory"
14
+ - "SI-7 Software, Firmware, and Information Integrity"
15
+ cis-controls-v8:
16
+ - "1.1 Establish and Maintain Detailed Enterprise Asset Inventory"
17
+ condition: |
18
+ metadata.component[
19
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'linux'
20
+ and $count(
21
+ $$.components[
22
+ $prop($, 'cdx:hbom:hardwareClass') = 'board'
23
+ and (
24
+ $hasProp($, 'cdx:hbom:boardVendor')
25
+ or $hasProp($, 'cdx:hbom:boardName')
26
+ or $hasProp($, 'cdx:hbom:biosVendor')
27
+ or $hasProp($, 'cdx:hbom:biosVersion')
28
+ or $hasProp($, 'cdx:hbom:firmwareDate')
29
+ )
30
+ ]
31
+ ) = 0
32
+ ]
33
+ location: |
34
+ {
35
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
36
+ }
37
+ message: "HBOM for '{{ name }}' lacks board or firmware provenance fields needed for governance review"
38
+ mitigation: "Enable richer firmware/board collection on supported Linux hosts, validate SMBIOS access, and ensure the inventory captures board vendor, board name, BIOS vendor, BIOS version, and firmware date where available."
39
+ evidence: |
40
+ {
41
+ "platform": $prop($, 'cdx:hbom:platform'),
42
+ "architecture": $prop($, 'cdx:hbom:architecture'),
43
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
44
+ "boardComponentCount": $count($$.components[$prop($, 'cdx:hbom:hardwareClass') = 'board'])
45
+ }
46
+
47
+ - id: HBC-002
48
+ name: "Managed asset identity is incomplete"
49
+ description: "HBOMs used for fleet governance should capture stable host identity fields such as model, platform, and serial or asset identifiers."
50
+ severity: medium
51
+ category: hbom-compliance
52
+ dry-run-support: full
53
+ standards:
54
+ nist-800-53:
55
+ - "CM-8 System Component Inventory"
56
+ cis-controls-v8:
57
+ - "1.1 Establish and Maintain Detailed Enterprise Asset Inventory"
58
+ iso-27001:
59
+ - "A.5.9 Inventory of information and other associated assets"
60
+ condition: |
61
+ metadata.component[
62
+ type = 'device'
63
+ and (
64
+ $hasProp($, 'cdx:hbom:platform') = false
65
+ or $hasProp($, 'cdx:hbom:architecture') = false
66
+ or (
67
+ $hasProp($, 'cdx:hbom:serialNumber') = false
68
+ and $hasProp($, 'cdx:hbom:platformUuid') = false
69
+ and $hasProp($, 'cdx:hbom:assetTag') = false
70
+ )
71
+ )
72
+ ]
73
+ location: |
74
+ {
75
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
76
+ }
77
+ message: "HBOM metadata for '{{ name }}' is missing stable asset identity fields required for governance workflows"
78
+ mitigation: "Capture platform, architecture, and at least one durable host identifier (serial, platform UUID, or asset tag) so the device can be reconciled with CMDB and lifecycle systems."
79
+ evidence: |
80
+ {
81
+ "platform": $prop($, 'cdx:hbom:platform'),
82
+ "architecture": $prop($, 'cdx:hbom:architecture'),
83
+ "serialNumber": $prop($, 'cdx:hbom:serialNumber'),
84
+ "platformUuid": $prop($, 'cdx:hbom:platformUuid'),
85
+ "assetTag": $prop($, 'cdx:hbom:assetTag')
86
+ }
87
+
88
+ - id: HBC-003
89
+ name: "HBOM collector evidence is incomplete"
90
+ description: "Governance review is weaker when the BOM omits the collector command evidence used to derive the hardware inventory."
91
+ severity: medium
92
+ category: hbom-compliance
93
+ dry-run-support: full
94
+ condition: |
95
+ metadata.component[
96
+ type = 'device'
97
+ and (
98
+ $hasProp($$, 'cdx:hbom:evidence:commandCount') = false
99
+ or $number($firstNonEmpty($prop($$, 'cdx:hbom:evidence:commandCount'), '0')) = 0
100
+ or $hasProp($$, 'cdx:hbom:evidence:command') = false
101
+ )
102
+ ]
103
+ location: |
104
+ {
105
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
106
+ }
107
+ message: "HBOM for '{{ name }}' is missing collector command evidence needed for reproducible review"
108
+ mitigation: "Retain command-evidence metadata in the distributed BOM, or attach equivalent collection provenance so reviewers can understand how the hardware inventory was derived."
109
+ evidence: |
110
+ {
111
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
112
+ "commandCount": $prop(bom, 'cdx:hbom:evidence:commandCount'),
113
+ "commandEvidence": $prop(bom, 'cdx:hbom:evidence:command')
114
+ }
115
+
116
+ - id: HBC-004
117
+ name: "Storage inventory lacks encryption posture evidence"
118
+ description: "Storage volumes without explicit encryption posture make it difficult to prove compliance with device and media protection requirements."
119
+ severity: medium
120
+ category: hbom-compliance
121
+ dry-run-support: full
122
+ standards:
123
+ nist-800-53:
124
+ - "SC-28 Protection of Information at Rest"
125
+ - "CM-8 System Component Inventory"
126
+ condition: |
127
+ metadata.component[
128
+ type = 'device'
129
+ and $count($$.components[$prop($, 'cdx:hbom:hardwareClass') = 'storage-volume']) > 0
130
+ and $count(
131
+ $$.components[
132
+ $prop($, 'cdx:hbom:hardwareClass') = 'storage-volume'
133
+ and (
134
+ $hasProp($, 'cdx:hbom:isEncrypted')
135
+ or $hasProp($, 'cdx:hbom:fileVault')
136
+ )
137
+ ]
138
+ ) = 0
139
+ ]
140
+ location: |
141
+ {
142
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
143
+ }
144
+ message: "HBOM for '{{ name }}' includes storage volumes but no explicit encryption posture evidence"
145
+ mitigation: "Enable volume-level enrichment on supported platforms or pair the HBOM with equivalent host controls evidence so encryption compliance can be verified."
146
+ evidence: |
147
+ {
148
+ "storageVolumeCount": $count($$.components[$prop($, 'cdx:hbom:hardwareClass') = 'storage-volume']),
149
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
150
+ "platform": $prop($, 'cdx:hbom:platform')
151
+ }
152
+
153
+ - id: HBC-005
154
+ name: "HBOM uses non-redacted identifier policy"
155
+ description: "HBOMs intended for broad distribution should avoid a non-redacted identifier policy unless raw identifiers are explicitly required by the receiving workflow."
156
+ severity: medium
157
+ category: hbom-compliance
158
+ dry-run-support: full
159
+ condition: |
160
+ metadata.component[
161
+ type = 'device'
162
+ and $hasProp($, 'cdx:hbom:identifierPolicy')
163
+ and $not($startsWith($lowercase($safeStr($prop($, 'cdx:hbom:identifierPolicy'))), 'redacted'))
164
+ ]
165
+ location: |
166
+ {
167
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
168
+ }
169
+ message: "HBOM for '{{ name }}' uses identifier policy '{{ $prop($, 'cdx:hbom:identifierPolicy') }}' instead of a redacted posture"
170
+ mitigation: "Default distributed HBOMs to redacted identifiers and keep raw hardware identity values confined to internal asset-governance workflows with a documented need-to-know."
171
+ evidence: |
172
+ {
173
+ "identifierPolicy": $prop($, 'cdx:hbom:identifierPolicy'),
174
+ "serialNumber": $prop($, 'cdx:hbom:serialNumber'),
175
+ "platformUuid": $prop($, 'cdx:hbom:platformUuid')
176
+ }
177
+
178
+ - id: HBC-006
179
+ name: "HBOM collector is missing optional enrichment commands"
180
+ description: "Missing native utilities reduce the hardware evidence available to governance, assurance, and troubleshooting workflows."
181
+ severity: medium
182
+ category: hbom-compliance
183
+ dry-run-support: full
184
+ condition: |
185
+ metadata.component[
186
+ type = 'device'
187
+ and $number($firstNonEmpty($prop($$, 'cdx:hbom:analysis:missingCommandCount'), '0')) > 0
188
+ ]
189
+ location: |
190
+ {
191
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
192
+ }
193
+ message: "HBOM for '{{ name }}' reported missing native enrichment commands"
194
+ mitigation: "Install the reported utilities on the target host and rerun the HBOM collection so the inventory includes the richer structured hardware evidence those commands provide."
195
+ evidence: |
196
+ {
197
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
198
+ "missingCommandCount": $prop(bom, 'cdx:hbom:analysis:missingCommandCount'),
199
+ "missingCommands": $propList(bom, 'cdx:hbom:analysis:missingCommands'),
200
+ "diagnosticIssues": $propList(bom, 'cdx:hbom:analysis:diagnosticIssues')
201
+ }
202
+
203
+ - id: HBC-007
204
+ name: "HBOM collector hit permission-denied enrichments"
205
+ description: "Permission-sensitive enrichments that fail during collection often leave firmware, graphics, or SMBIOS evidence incomplete until the host is rerun with the documented privileged mode."
206
+ severity: medium
207
+ category: hbom-compliance
208
+ dry-run-support: full
209
+ standards:
210
+ nist-800-53:
211
+ - "CM-8 System Component Inventory"
212
+ - "SI-7 Software, Firmware, and Information Integrity"
213
+ condition: |
214
+ metadata.component[
215
+ type = 'device'
216
+ and $number($firstNonEmpty($prop($$, 'cdx:hbom:analysis:permissionDeniedCount'), '0')) > 0
217
+ ]
218
+ location: |
219
+ {
220
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
221
+ }
222
+ message: "HBOM for '{{ name }}' hit permission-denied enrichments that likely require a rerun with --privileged"
223
+ mitigation: "Where policy allows, rerun HBOM collection with --privileged so cdx-hbom can use the documented non-interactive sudo path for permission-sensitive Linux enrichments."
224
+ evidence: |
225
+ {
226
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
227
+ "permissionDeniedCount": $prop(bom, 'cdx:hbom:analysis:permissionDeniedCount'),
228
+ "permissionDeniedCommands": $propList(bom, 'cdx:hbom:analysis:permissionDeniedCommands'),
229
+ "requiresPrivileged": $prop(bom, 'cdx:hbom:analysis:requiresPrivileged')
230
+ }
231
+
232
+ - id: HBC-008
233
+ name: "HBOM collector is missing firmware-management enrichment"
234
+ description: "Without fwupd-derived metadata, governance teams lose update-protocol, firmware GUID, and device lifecycle context that is useful for firmware assurance and remediation planning."
235
+ severity: medium
236
+ category: hbom-compliance
237
+ dry-run-support: full
238
+ standards:
239
+ nist-800-53:
240
+ - "CM-8 System Component Inventory"
241
+ - "SI-7 Software, Firmware, and Information Integrity"
242
+ condition: |
243
+ metadata.component[
244
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'linux'
245
+ and $listContains($propList($$, 'cdx:hbom:analysis:missingCommandIds'), 'fwupdmgr-devices-json')
246
+ ]
247
+ location: |
248
+ {
249
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
250
+ }
251
+ message: "HBOM for '{{ name }}' is missing firmware-management enrichment because fwupdmgr was unavailable"
252
+ mitigation: "Install fwupd on the target host and rerun the collection so the BOM can capture protocol, flags, GUIDs, and related firmware-management properties where supported."
253
+ evidence: |
254
+ {
255
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
256
+ "missingCommandIds": $propList(bom, 'cdx:hbom:analysis:missingCommandIds'),
257
+ "missingCommands": $propList(bom, 'cdx:hbom:analysis:missingCommands'),
258
+ "installHintCount": $prop(bom, 'cdx:hbom:analysis:installHintCount')
259
+ }
260
+
261
+ - id: HBC-009
262
+ name: "HBOM board and BIOS provenance was blocked by permissions"
263
+ description: "When dmidecode-backed firmware and board enrichment is blocked, the HBOM may miss board-vendor, board-name, BIOS-version, and related governance evidence."
264
+ severity: medium
265
+ category: hbom-compliance
266
+ dry-run-support: full
267
+ standards:
268
+ nist-800-53:
269
+ - "CM-8 System Component Inventory"
270
+ - "SI-7 Software, Firmware, and Information Integrity"
271
+ condition: |
272
+ metadata.component[
273
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'linux'
274
+ and $listContains($propList($$, 'cdx:hbom:analysis:permissionDeniedIds'), 'dmidecode-firmware-board')
275
+ ]
276
+ location: |
277
+ {
278
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
279
+ }
280
+ message: "HBOM for '{{ name }}' could not capture full board and BIOS provenance because dmidecode enrichment was blocked"
281
+ mitigation: "Where policy allows, rerun with --privileged or equivalent access so the collector can gather firmware vendor, BIOS version, board vendor, and board name data."
282
+ evidence: |
283
+ {
284
+ "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
285
+ "permissionDeniedIds": $propList(bom, 'cdx:hbom:analysis:permissionDeniedIds'),
286
+ "permissionDeniedCommands": $propList(bom, 'cdx:hbom:analysis:permissionDeniedCommands'),
287
+ "boardComponentCount": $count($$.components[$prop($, 'cdx:hbom:hardwareClass') = 'board'])
288
+ }
289
+
290
+ - id: HBC-010
291
+ name: "HBOM display and DRM evidence is incomplete"
292
+ description: "Missing EDID decoding or blocked DRM enrichment reduces the fidelity of display, connector, and content-protection metadata used during workstation and kiosk governance reviews."
293
+ severity: medium
294
+ category: hbom-compliance
295
+ dry-run-support: full
296
+ condition: |
297
+ metadata.component[
298
+ $count(
299
+ $$.components[
300
+ $prop($, 'cdx:hbom:hardwareClass') = 'display-connector'
301
+ or $prop($, 'cdx:hbom:hardwareClass') = 'display-adapter'
302
+ ]
303
+ ) > 0
304
+ and (
305
+ $listContains($propList($$, 'cdx:hbom:analysis:missingCommandIds'), 'edid-decode')
306
+ or $listContains($propList($$, 'cdx:hbom:analysis:permissionDeniedIds'), 'drm-info-json')
307
+ )
308
+ ]
309
+ location: |
310
+ {
311
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
312
+ }
313
+ message: "HBOM for '{{ name }}' includes display hardware but the richer DRM or EDID evidence is incomplete"
314
+ mitigation: "Install edid-decode where available and, if policy permits, rerun with --privileged so the collector can capture connector, mode, and content-protection metadata for Linux displays."
315
+ evidence: |
316
+ {
317
+ "displayComponentCount": $count(
318
+ $$.components[
319
+ $prop($, 'cdx:hbom:hardwareClass') = 'display-connector'
320
+ or $prop($, 'cdx:hbom:hardwareClass') = 'display-adapter'
321
+ ]
322
+ ),
323
+ "missingCommandIds": $propList(bom, 'cdx:hbom:analysis:missingCommandIds'),
324
+ "permissionDeniedIds": $propList(bom, 'cdx:hbom:analysis:permissionDeniedIds')
325
+ }
@@ -0,0 +1,307 @@
1
+ # HBOM Performance Rules
2
+ # Category: hbom-performance
3
+ # Evaluates hardware inventory for storage, thermal, battery, network, and memory degradation signals.
4
+
5
+ - id: HBP-001
6
+ name: "Storage volume has low free capacity headroom"
7
+ description: "Low free storage headroom can degrade builds, patching, logging, indexing, and general host responsiveness."
8
+ severity: medium
9
+ category: hbom-performance
10
+ dry-run-support: full
11
+ condition: |
12
+ components[
13
+ $prop($, 'cdx:hbom:hardwareClass') = 'storage-volume'
14
+ and $hasProp($, 'cdx:hbom:capacityBytes')
15
+ and $hasProp($, 'cdx:hbom:freeBytes')
16
+ and $number($prop($, 'cdx:hbom:capacityBytes')) > 0
17
+ and ($number($prop($, 'cdx:hbom:freeBytes')) / $number($prop($, 'cdx:hbom:capacityBytes'))) < 0.15
18
+ ]
19
+ location: |
20
+ {
21
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
22
+ }
23
+ message: "Storage volume '{{ name }}' has less than 15% free capacity remaining"
24
+ mitigation: "Free local capacity, move caches or logs off the volume, or expand storage before performance and maintenance tasks degrade further."
25
+ evidence: |
26
+ {
27
+ "capacityBytes": $prop($, 'cdx:hbom:capacityBytes'),
28
+ "freeBytes": $prop($, 'cdx:hbom:freeBytes'),
29
+ "sizeBytes": $prop($, 'cdx:hbom:sizeBytes'),
30
+ "volumeUuid": $prop($, 'cdx:hbom:volumeUuid')
31
+ }
32
+
33
+ - id: HBP-002
34
+ name: "Storage health is degraded or wear is near exhaustion"
35
+ description: "Degraded SMART state or high wear percentage is a strong leading indicator of latency, failure, or replacement pressure."
36
+ severity: high
37
+ category: hbom-performance
38
+ dry-run-support: full
39
+ condition: |
40
+ components[
41
+ (
42
+ $prop($, 'cdx:hbom:hardwareClass') = 'storage'
43
+ or $prop($, 'cdx:hbom:hardwareClass') = 'storage-device'
44
+ or $prop($, 'cdx:hbom:hardwareClass') = 'storage-volume'
45
+ )
46
+ and (
47
+ (
48
+ $hasProp($, 'cdx:hbom:smartStatus')
49
+ and $lowercase($safeStr($prop($, 'cdx:hbom:smartStatus'))) != 'verified'
50
+ and $lowercase($safeStr($prop($, 'cdx:hbom:smartStatus'))) != 'ok'
51
+ and $lowercase($safeStr($prop($, 'cdx:hbom:smartStatus'))) != 'passed'
52
+ )
53
+ or (
54
+ $hasProp($, 'cdx:hbom:wearPercentageUsed')
55
+ and $number($prop($, 'cdx:hbom:wearPercentageUsed')) >= 80
56
+ )
57
+ )
58
+ ]
59
+ location: |
60
+ {
61
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
62
+ }
63
+ message: "Storage component '{{ name }}' shows degraded health or high wear"
64
+ mitigation: "Review SMART telemetry, schedule replacement for worn media, and move latency-sensitive workloads off the affected device."
65
+ evidence: |
66
+ {
67
+ "smartStatus": $prop($, 'cdx:hbom:smartStatus'),
68
+ "wearPercentageUsed": $prop($, 'cdx:hbom:wearPercentageUsed'),
69
+ "revision": $prop($, 'cdx:hbom:revision'),
70
+ "deviceSerial": $prop($, 'cdx:hbom:deviceSerial')
71
+ }
72
+
73
+ - id: HBP-003
74
+ name: "Thermal zone reports sustained high temperature"
75
+ description: "High thermal-zone temperatures can trigger throttling, instability, and accelerated hardware wear."
76
+ severity: high
77
+ category: hbom-performance
78
+ dry-run-support: full
79
+ condition: |
80
+ components[
81
+ (
82
+ $prop($, 'cdx:hbom:hardwareClass') = 'thermal-zone'
83
+ or $prop($, 'cdx:hbom:hardwareClass') = 'sensor'
84
+ )
85
+ and $hasProp($, 'cdx:hbom:temperatureCelsius')
86
+ and $number($prop($, 'cdx:hbom:temperatureCelsius')) >= 85
87
+ ]
88
+ location: |
89
+ {
90
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
91
+ }
92
+ message: "Thermal component '{{ name }}' reports high temperature '{{ $prop($, 'cdx:hbom:temperatureCelsius') }}°C'"
93
+ mitigation: "Inspect cooling, fan policy, dust buildup, and workload placement before the host begins sustained throttling or thermal shutdown behavior."
94
+ evidence: |
95
+ {
96
+ "temperatureCelsius": $prop($, 'cdx:hbom:temperatureCelsius'),
97
+ "temperatureReadings": $prop($, 'cdx:hbom:temperatureReadings'),
98
+ "fanCount": $prop($, 'cdx:hbom:fanCount'),
99
+ "fanReadings": $prop($, 'cdx:hbom:fanReadings')
100
+ }
101
+
102
+ - id: HBP-004
103
+ name: "Battery health is degraded"
104
+ description: "Battery packs with low maximum capacity, poor health, or extreme cycle counts can materially degrade mobile system performance and runtime."
105
+ severity: medium
106
+ category: hbom-performance
107
+ dry-run-support: full
108
+ condition: |
109
+ components[
110
+ $prop($, 'cdx:hbom:hardwareClass') = 'power'
111
+ and (
112
+ (
113
+ $hasProp($, 'cdx:hbom:maximumCapacity')
114
+ and $number($substringBefore($prop($, 'cdx:hbom:maximumCapacity'), '%')) < 80
115
+ )
116
+ or (
117
+ $hasProp($, 'cdx:hbom:health')
118
+ and $not($lowercase($safeStr($prop($, 'cdx:hbom:health'))) = 'good')
119
+ )
120
+ or (
121
+ $hasProp($, 'cdx:hbom:cycleCount')
122
+ and $number($prop($, 'cdx:hbom:cycleCount')) >= 1000
123
+ )
124
+ )
125
+ ]
126
+ location: |
127
+ {
128
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
129
+ }
130
+ message: "Battery component '{{ name }}' shows degraded health or elevated lifecycle wear"
131
+ mitigation: "Recalibrate or replace the battery, verify charging policy, and keep performance-sensitive mobile workloads off batteries nearing replacement thresholds."
132
+ evidence: |
133
+ {
134
+ "maximumCapacity": $prop($, 'cdx:hbom:maximumCapacity'),
135
+ "health": $prop($, 'cdx:hbom:health'),
136
+ "cycleCount": $prop($, 'cdx:hbom:cycleCount'),
137
+ "chargePercent": $prop($, 'cdx:hbom:chargePercent')
138
+ }
139
+
140
+ - id: HBP-005
141
+ name: "Active wired link is operating below expected duplex or bandwidth"
142
+ description: "Half-duplex or very low negotiated wired-link speed often correlates with cable, switch, or interface misconfiguration that hurts throughput and latency."
143
+ severity: medium
144
+ category: hbom-performance
145
+ dry-run-support: full
146
+ condition: |
147
+ components[
148
+ $prop($, 'cdx:hbom:hardwareClass') = 'network-interface'
149
+ and (
150
+ $lowercase($safeStr($prop($, 'cdx:hbom:status'))) = 'active'
151
+ or $lowercase($safeStr($prop($, 'cdx:hbom:operState'))) = 'up'
152
+ )
153
+ and (
154
+ $lowercase($safeStr($prop($, 'cdx:hbom:duplex'))) = 'half'
155
+ or (
156
+ $hasProp($, 'cdx:hbom:speedMbps')
157
+ and $number($prop($, 'cdx:hbom:speedMbps')) > 0
158
+ and $number($prop($, 'cdx:hbom:speedMbps')) < 1000
159
+ )
160
+ )
161
+ ]
162
+ location: |
163
+ {
164
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
165
+ }
166
+ message: "Active wired interface '{{ name }}' is operating with degraded duplex or bandwidth characteristics"
167
+ mitigation: "Check cabling, switch configuration, NIC driver/firmware, and negotiated link settings before treating application latency as purely software-related."
168
+ evidence: |
169
+ {
170
+ "duplex": $prop($, 'cdx:hbom:duplex'),
171
+ "speedMbps": $prop($, 'cdx:hbom:speedMbps'),
172
+ "status": $prop($, 'cdx:hbom:status'),
173
+ "operState": $prop($, 'cdx:hbom:operState'),
174
+ "driver": $prop($, 'cdx:hbom:driver')
175
+ }
176
+
177
+ - id: HBP-006
178
+ name: "Installed memory is only partially online"
179
+ description: "A significant gap between installed and online memory suggests capacity loss, firmware drift, or topology issues that can affect performance-critical workloads."
180
+ severity: high
181
+ category: hbom-performance
182
+ dry-run-support: full
183
+ condition: |
184
+ components[
185
+ $prop($, 'cdx:hbom:hardwareClass') = 'memory'
186
+ and $hasProp($, 'cdx:hbom:sizeBytes')
187
+ and $hasProp($, 'cdx:hbom:memoryOnlineSize')
188
+ and $number($prop($, 'cdx:hbom:sizeBytes')) > 0
189
+ and $parseSizeBytes($prop($, 'cdx:hbom:memoryOnlineSize')) != null
190
+ and ($parseSizeBytes($prop($, 'cdx:hbom:memoryOnlineSize')) / $number($prop($, 'cdx:hbom:sizeBytes'))) < 0.9
191
+ ]
192
+ location: |
193
+ {
194
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
195
+ }
196
+ message: "Memory component '{{ name }}' reports materially less online capacity than installed capacity"
197
+ mitigation: "Review DIMM population, firmware, NUMA/memory-hotplug settings, and kernel memory-online state before scaling workloads on the host."
198
+ evidence: |
199
+ {
200
+ "sizeBytes": $prop($, 'cdx:hbom:sizeBytes'),
201
+ "memoryOnlineSize": $prop($, 'cdx:hbom:memoryOnlineSize'),
202
+ "memoryRangeCount": $prop($, 'cdx:hbom:memoryRangeCount'),
203
+ "addressSizes": $prop($, 'cdx:hbom:addressSizes')
204
+ }
205
+
206
+ - id: HBP-007
207
+ name: "Battery design capacity has materially degraded"
208
+ description: "Detailed Linux battery telemetry can reveal packs whose full-charge capacity has fallen materially below their design baseline, reducing runtime and stability under load."
209
+ severity: medium
210
+ category: hbom-performance
211
+ dry-run-support: full
212
+ condition: |
213
+ components[
214
+ $prop($, 'cdx:hbom:hardwareClass') = 'power'
215
+ and (
216
+ (
217
+ $hasProp($, 'cdx:hbom:designCapacityPercent')
218
+ and $number($prop($, 'cdx:hbom:designCapacityPercent')) > 0
219
+ and $number($prop($, 'cdx:hbom:designCapacityPercent')) < 80
220
+ )
221
+ or (
222
+ $hasProp($, 'cdx:hbom:energyFull')
223
+ and $hasProp($, 'cdx:hbom:energyFullDesign')
224
+ and $number($prop($, 'cdx:hbom:energyFullDesign')) > 0
225
+ and ($number($prop($, 'cdx:hbom:energyFull')) / $number($prop($, 'cdx:hbom:energyFullDesign'))) < 0.8
226
+ )
227
+ or (
228
+ $hasProp($, 'cdx:hbom:chargeFull')
229
+ and $hasProp($, 'cdx:hbom:chargeFullDesign')
230
+ and $number($prop($, 'cdx:hbom:chargeFullDesign')) > 0
231
+ and ($number($prop($, 'cdx:hbom:chargeFull')) / $number($prop($, 'cdx:hbom:chargeFullDesign'))) < 0.8
232
+ )
233
+ )
234
+ ]
235
+ location: |
236
+ {
237
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
238
+ }
239
+ message: "Battery component '{{ name }}' has materially degraded relative to its design capacity"
240
+ mitigation: "Plan battery replacement or recalibration, review charging policy, and keep performance-sensitive mobile workloads away from hosts with heavily degraded packs."
241
+ evidence: |
242
+ {
243
+ "designCapacityPercent": $prop($, 'cdx:hbom:designCapacityPercent'),
244
+ "energyFull": $prop($, 'cdx:hbom:energyFull'),
245
+ "energyFullDesign": $prop($, 'cdx:hbom:energyFullDesign'),
246
+ "chargeFull": $prop($, 'cdx:hbom:chargeFull'),
247
+ "chargeFullDesign": $prop($, 'cdx:hbom:chargeFullDesign'),
248
+ "warningLevel": $prop($, 'cdx:hbom:warningLevel')
249
+ }
250
+
251
+ - id: HBP-008
252
+ name: "USB device requires more current than the bus reports available"
253
+ description: "A USB device that requires more current than the bus exposes as available can behave unreliably, disconnect under load, or trigger peripheral instability."
254
+ severity: medium
255
+ category: hbom-performance
256
+ dry-run-support: full
257
+ condition: |
258
+ components[
259
+ $prop($, 'cdx:hbom:hardwareClass') = 'usb-device'
260
+ and $hasProp($, 'cdx:hbom:currentRequired')
261
+ and $hasProp($, 'cdx:hbom:currentAvailable')
262
+ and $number($prop($, 'cdx:hbom:currentRequired')) > $number($prop($, 'cdx:hbom:currentAvailable'))
263
+ ]
264
+ location: |
265
+ {
266
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
267
+ }
268
+ message: "USB component '{{ name }}' reports higher current demand than the bus currently provides"
269
+ mitigation: "Move the device to a powered hub or higher-capacity port, reduce competing bus load, and verify peripheral power expectations before troubleshooting higher-layer software issues."
270
+ evidence: |
271
+ {
272
+ "currentRequired": $prop($, 'cdx:hbom:currentRequired'),
273
+ "currentAvailable": $prop($, 'cdx:hbom:currentAvailable'),
274
+ "maxPowerMilliAmps": $prop($, 'cdx:hbom:maxPowerMilliAmps'),
275
+ "selfPowered": $prop($, 'cdx:hbom:selfPowered'),
276
+ "remoteWakeup": $prop($, 'cdx:hbom:remoteWakeup')
277
+ }
278
+
279
+ - id: HBP-009
280
+ name: "Cellular modem reports weak signal quality"
281
+ description: "A modem with very weak reported signal quality can cause intermittent connectivity, poor throughput, and degraded remote-management reliability."
282
+ severity: medium
283
+ category: hbom-performance
284
+ dry-run-support: full
285
+ condition: |
286
+ components[
287
+ (
288
+ $prop($, 'cdx:hbom:hardwareClass') = 'modem'
289
+ or $hasProp($, 'cdx:hbom:signalQuality')
290
+ )
291
+ and $hasProp($, 'cdx:hbom:signalQuality')
292
+ and $number($prop($, 'cdx:hbom:signalQuality')) >= 0
293
+ and $number($prop($, 'cdx:hbom:signalQuality')) < 25
294
+ ]
295
+ location: |
296
+ {
297
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
298
+ }
299
+ message: "Cellular component '{{ name }}' reports weak signal quality that may impair connectivity"
300
+ mitigation: "Review antenna placement, carrier coverage, modem firmware, and access-technology selection before treating transport instability as an application-only issue."
301
+ evidence: |
302
+ {
303
+ "signalQuality": $prop($, 'cdx:hbom:signalQuality'),
304
+ "accessTechnologies": $prop($, 'cdx:hbom:accessTechnologies'),
305
+ "operatorName": $prop($, 'cdx:hbom:operatorName'),
306
+ "plugin": $prop($, 'cdx:hbom:plugin')
307
+ }