@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
@@ -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
+ }
@@ -0,0 +1,248 @@
1
+ # HBOM Security Rules
2
+ # Category: hbom-security
3
+ # Evaluates host hardware inventory for encryption, removable-media, wireless, and disclosure risks.
4
+
5
+ - id: HBS-001
6
+ name: "Storage component is explicitly unencrypted"
7
+ description: "System or attached storage reported as unencrypted increases exposure for lost, stolen, or offline-access devices."
8
+ severity: high
9
+ category: hbom-security
10
+ dry-run-support: full
11
+ standards:
12
+ nist-800-53:
13
+ - "SC-28 Protection of Information at Rest"
14
+ cis-controls-v8:
15
+ - "3.11 Encrypt Sensitive Data at Rest"
16
+ iso-27001:
17
+ - "A.8.24 Use of cryptography"
18
+ condition: |
19
+ components[
20
+ (
21
+ $prop($, 'cdx:hbom:hardwareClass') = 'storage'
22
+ or $prop($, 'cdx:hbom:hardwareClass') = 'storage-volume'
23
+ )
24
+ and (
25
+ $safeStr($prop($, 'cdx:hbom:isEncrypted')) = 'false'
26
+ or $safeStr($prop($, 'cdx:hbom:fileVault')) = 'false'
27
+ )
28
+ ]
29
+ location: |
30
+ {
31
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
32
+ }
33
+ message: "Storage component '{{ name }}' is reported as unencrypted"
34
+ mitigation: "Enable full-disk or volume encryption, verify escrow/recovery procedures, and confirm the device is enrolled in the intended encryption baseline."
35
+ evidence: |
36
+ {
37
+ "hardwareClass": $prop($, 'cdx:hbom:hardwareClass'),
38
+ "isEncrypted": $prop($, 'cdx:hbom:isEncrypted'),
39
+ "fileVault": $prop($, 'cdx:hbom:fileVault'),
40
+ "volumeUuid": $prop($, 'cdx:hbom:volumeUuid'),
41
+ "deviceSerial": $prop($, 'cdx:hbom:deviceSerial')
42
+ }
43
+
44
+ - id: HBS-002
45
+ name: "Connected wireless adapter uses weak or missing link security"
46
+ description: "Wireless adapters connected without strong link security indicate elevated interception and unauthorized access risk."
47
+ severity: high
48
+ category: hbom-security
49
+ dry-run-support: full
50
+ standards:
51
+ nist-800-53:
52
+ - "AC-18 Wireless Access"
53
+ - "SC-13 Cryptographic Protection"
54
+ condition: |
55
+ components[
56
+ $prop($, 'cdx:hbom:hardwareClass') = 'wireless-adapter'
57
+ and $safeStr($prop($, 'cdx:hbom:connected')) = 'true'
58
+ and (
59
+ $safeStr($prop($, 'cdx:hbom:securityMode')) = ''
60
+ or $contains($lowercase($safeStr($prop($, 'cdx:hbom:securityMode'))), 'open')
61
+ or $contains($lowercase($safeStr($prop($, 'cdx:hbom:securityMode'))), 'wep')
62
+ or $contains($lowercase($safeStr($prop($, 'cdx:hbom:securityMode'))), 'none')
63
+ )
64
+ ]
65
+ location: |
66
+ {
67
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
68
+ }
69
+ message: "Wireless adapter '{{ name }}' is connected with weak or missing security mode '{{ $firstNonEmpty($prop($, 'cdx:hbom:securityMode'), 'unknown') }}'"
70
+ mitigation: "Move the device to WPA2/WPA3-class protections, review SSID policy, and confirm that open or legacy wireless modes are not permitted for the host profile."
71
+ evidence: |
72
+ {
73
+ "securityMode": $prop($, 'cdx:hbom:securityMode'),
74
+ "channel": $prop($, 'cdx:hbom:channel'),
75
+ "phyMode": $prop($, 'cdx:hbom:phyMode'),
76
+ "countryCode": $prop($, 'cdx:hbom:countryCode'),
77
+ "firmwareVersion": $prop($, 'cdx:hbom:firmwareVersion')
78
+ }
79
+
80
+ - id: HBS-003
81
+ name: "Removable storage is attached without encryption or lock evidence"
82
+ description: "Attached removable storage that is explicitly unlocked or unencrypted increases data-exfiltration and malware-ingress risk."
83
+ severity: high
84
+ category: hbom-security
85
+ dry-run-support: full
86
+ standards:
87
+ nist-800-53:
88
+ - "MP-7 Media Use"
89
+ - "SC-28 Protection of Information at Rest"
90
+ cis-controls-v8:
91
+ - "3.9 Encrypt Data on Removable Media"
92
+ condition: |
93
+ components[
94
+ (
95
+ $prop($, 'cdx:hbom:hardwareClass') = 'storage'
96
+ or $prop($, 'cdx:hbom:hardwareClass') = 'storage-volume'
97
+ )
98
+ and $safeStr($prop($, 'cdx:hbom:isRemovable')) = 'true'
99
+ and (
100
+ $safeStr($prop($, 'cdx:hbom:isEncrypted')) = 'false'
101
+ or $safeStr($prop($, 'cdx:hbom:isLocked')) = 'false'
102
+ )
103
+ ]
104
+ location: |
105
+ {
106
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
107
+ }
108
+ message: "Removable storage '{{ name }}' is attached without encryption or lock assurance"
109
+ mitigation: "Remove unapproved removable media, require encrypted removable devices, and verify the host's removable-media control policy."
110
+ evidence: |
111
+ {
112
+ "isRemovable": $prop($, 'cdx:hbom:isRemovable'),
113
+ "isEncrypted": $prop($, 'cdx:hbom:isEncrypted'),
114
+ "isLocked": $prop($, 'cdx:hbom:isLocked'),
115
+ "connectionType": $prop($, 'cdx:hbom:connectionType'),
116
+ "transport": $prop($, 'cdx:hbom:transport')
117
+ }
118
+
119
+ - id: HBS-004
120
+ name: "HBOM exposes raw hardware identifiers"
121
+ description: "Raw serial numbers, MAC addresses, or platform UUIDs in the BOM can leak asset intelligence beyond the intended audience."
122
+ severity: medium
123
+ category: hbom-security
124
+ dry-run-support: full
125
+ condition: |
126
+ $append(
127
+ metadata.component[
128
+ (
129
+ $hasProp($, 'cdx:hbom:serialNumber')
130
+ and $startsWith($safeStr($prop($, 'cdx:hbom:serialNumber')), 'redacted') = false
131
+ )
132
+ or (
133
+ $hasProp($, 'cdx:hbom:platformUuid')
134
+ and $startsWith($safeStr($prop($, 'cdx:hbom:platformUuid')), 'redacted') = false
135
+ )
136
+ ],
137
+ components[
138
+ (
139
+ $hasProp($, 'cdx:hbom:serialNumber')
140
+ and $startsWith($safeStr($prop($, 'cdx:hbom:serialNumber')), 'redacted') = false
141
+ )
142
+ or (
143
+ $hasProp($, 'cdx:hbom:macAddress')
144
+ and $startsWith($safeStr($prop($, 'cdx:hbom:macAddress')), 'redacted') = false
145
+ )
146
+ or (
147
+ $hasProp($, 'cdx:hbom:deviceSerial')
148
+ and $startsWith($safeStr($prop($, 'cdx:hbom:deviceSerial')), 'redacted') = false
149
+ )
150
+ ]
151
+ )
152
+ location: |
153
+ {
154
+ "bomRef": $firstNonEmpty($."bom-ref", metadata.component."bom-ref", bom.serialNumber)
155
+ }
156
+ message: "HBOM entry '{{ name }}' exposes raw hardware identifiers that should be reviewed before distribution"
157
+ mitigation: "Use redacted identifier mode for externally shared HBOMs and restrict raw identifiers to tightly controlled internal asset workflows."
158
+ evidence: |
159
+ {
160
+ "identifierPolicy": $firstNonEmpty($prop($, 'cdx:hbom:identifierPolicy'), $prop(metadata.component, 'cdx:hbom:identifierPolicy')),
161
+ "serialNumber": $prop($, 'cdx:hbom:serialNumber'),
162
+ "macAddress": $prop($, 'cdx:hbom:macAddress'),
163
+ "deviceSerial": $prop($, 'cdx:hbom:deviceSerial'),
164
+ "platformUuid": $prop(metadata.component, 'cdx:hbom:platformUuid')
165
+ }
166
+
167
+ - id: HBS-005
168
+ name: "External expansion bus reports permissive security posture"
169
+ description: "A Thunderbolt or USB4 path with permissive security level or disabled IOMMU protection increases the risk of DMA-style or rogue-device attack paths."
170
+ severity: high
171
+ category: hbom-security
172
+ dry-run-support: full
173
+ standards:
174
+ nist-800-53:
175
+ - "CM-8 System Component Inventory"
176
+ - "SC-7 Boundary Protection"
177
+ - "SI-16 Memory Protection"
178
+ condition: |
179
+ components[
180
+ (
181
+ $hasProp($, 'cdx:hbom:securityLevel')
182
+ or $hasProp($, 'cdx:hbom:iommuProtection')
183
+ or $hasProp($, 'cdx:hbom:policy')
184
+ )
185
+ and (
186
+ $contains($lowercase($safeStr($prop($, 'cdx:hbom:securityLevel'))), 'none')
187
+ or $contains($lowercase($safeStr($prop($, 'cdx:hbom:securityLevel'))), 'legacy')
188
+ or $contains($lowercase($safeStr($prop($, 'cdx:hbom:securityLevel'))), 'user')
189
+ or $safeStr($prop($, 'cdx:hbom:iommuProtection')) = 'false'
190
+ )
191
+ ]
192
+ location: |
193
+ {
194
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
195
+ }
196
+ message: "External expansion component '{{ name }}' reports a permissive security posture or missing IOMMU protection"
197
+ mitigation: "Require a stronger Thunderbolt/USB4 security level, verify IOMMU protection is enabled, and review auto-authorization policy before trusting hot-plug external devices."
198
+ evidence: |
199
+ {
200
+ "securityLevel": $prop($, 'cdx:hbom:securityLevel'),
201
+ "iommuProtection": $prop($, 'cdx:hbom:iommuProtection'),
202
+ "policy": $prop($, 'cdx:hbom:policy'),
203
+ "authorized": $prop($, 'cdx:hbom:authorized'),
204
+ "bootAclCount": $prop($, 'cdx:hbom:bootAclCount')
205
+ }
206
+
207
+ - id: HBS-006
208
+ name: "HBOM exposes raw cellular or subscriber identifiers"
209
+ description: "Raw modem equipment identifiers, IMEIs, or subscriber numbers in the BOM can leak privacy-sensitive fleet and subscriber intelligence."
210
+ severity: medium
211
+ category: hbom-security
212
+ dry-run-support: full
213
+ condition: |
214
+ components[
215
+ (
216
+ $prop($, 'cdx:hbom:hardwareClass') = 'modem'
217
+ or $hasProp($, 'cdx:hbom:equipmentIdentifier')
218
+ or $hasProp($, 'cdx:hbom:imei')
219
+ or $hasProp($, 'cdx:hbom:ownNumbers')
220
+ )
221
+ and (
222
+ (
223
+ $hasProp($, 'cdx:hbom:equipmentIdentifier')
224
+ and $startsWith($lowercase($safeStr($prop($, 'cdx:hbom:equipmentIdentifier'))), 'redacted') = false
225
+ )
226
+ or (
227
+ $hasProp($, 'cdx:hbom:imei')
228
+ and $startsWith($lowercase($safeStr($prop($, 'cdx:hbom:imei'))), 'redacted') = false
229
+ )
230
+ or (
231
+ $hasProp($, 'cdx:hbom:ownNumbers')
232
+ and $startsWith($lowercase($safeStr($prop($, 'cdx:hbom:ownNumbers'))), 'redacted') = false
233
+ )
234
+ )
235
+ ]
236
+ location: |
237
+ {
238
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
239
+ }
240
+ message: "Cellular component '{{ name }}' exposes raw modem or subscriber identifiers that should be reviewed before distribution"
241
+ mitigation: "Keep modem identifiers redacted in shared HBOMs and restrict raw IMEI, equipment, or subscriber number exposure to tightly controlled internal device-management workflows."
242
+ evidence: |
243
+ {
244
+ "equipmentIdentifier": $prop($, 'cdx:hbom:equipmentIdentifier'),
245
+ "imei": $prop($, 'cdx:hbom:imei'),
246
+ "ownNumbers": $prop($, 'cdx:hbom:ownNumbers'),
247
+ "identifierPolicy": $firstNonEmpty($prop($, 'cdx:hbom:identifierPolicy'), $prop(metadata.component, 'cdx:hbom:identifierPolicy'))
248
+ }