@cdxgen/cdxgen 13.3.0 → 13.5.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 (372) hide show
  1. package/README.md +12 -9
  2. package/bin/cdxgen-secure.js +15 -0
  3. package/bin/cdxgen.js +115 -31
  4. package/bin/evinse.js +23 -1
  5. package/bin/hbom.js +15 -7
  6. package/bin/repl.js +115 -0
  7. package/bin/sign.js +45 -15
  8. package/bin/tracebom.js +5 -1
  9. package/bin/validate.js +84 -18
  10. package/bin/verify.js +155 -86
  11. package/data/cbomosdb-queries.json +13 -1
  12. package/data/component-tags.json +8 -0
  13. package/data/helpers/init.gradle +46 -21
  14. package/data/queries-darwin.json +25 -1
  15. package/data/queries-win.json +19 -1
  16. package/data/queries.json +41 -0
  17. package/data/remediations.json +344 -1
  18. package/data/rules/cbom-security.yaml +235 -4
  19. package/data/rules/dependency-sources.yaml +67 -0
  20. package/data/rules/go-binaries.yaml +46 -0
  21. package/data/rules/golem-go.yaml +80 -0
  22. package/data/rules/hbom-compliance.yaml +40 -22
  23. package/data/rules/hbom-performance.yaml +7 -1
  24. package/data/rules/host-topology.yaml +1 -1
  25. package/data/rules/obom-runtime.yaml +31 -2
  26. package/data/rules/php-runtime.yaml +143 -0
  27. package/data/rules/scala-evidence.yaml +115 -0
  28. package/lib/audit/index.js +52 -6
  29. package/lib/cli/bomAssembly.js +28 -3
  30. package/lib/cli/cliOptions.js +110 -3
  31. package/lib/cli/index.js +186 -58
  32. package/lib/cli/jsBom.js +50 -29
  33. package/lib/cli/jvmBom.js +779 -146
  34. package/lib/cli/managedBom.js +1021 -261
  35. package/lib/cli/nativeBom.js +364 -58
  36. package/lib/core/activity.js +12 -0
  37. package/lib/core/env.js +47 -17
  38. package/lib/core/fs.js +31 -21
  39. package/lib/core/httpClient.js +233 -69
  40. package/lib/core/pluginRun.js +184 -0
  41. package/lib/core/processTree.js +100 -0
  42. package/lib/core/projectConfig.js +1 -0
  43. package/lib/core/projectTooling.js +97 -0
  44. package/lib/core/propertySanitizer.js +72 -0
  45. package/lib/core/runState.js +39 -0
  46. package/lib/core/toml.js +72 -0
  47. package/lib/ecosystems/asarutils.js +4 -2
  48. package/lib/ecosystems/bunutils.js +5 -7
  49. package/lib/ecosystems/cargoCache.js +231 -8
  50. package/lib/ecosystems/cmakeResolver.js +10 -21
  51. package/lib/ecosystems/cppBuildContext.js +631 -0
  52. package/lib/ecosystems/cppEvidence.js +337 -22
  53. package/lib/ecosystems/cppIncludeResolver.js +294 -0
  54. package/lib/ecosystems/denoutils.js +93 -66
  55. package/lib/ecosystems/ecosystems.js +1967 -788
  56. package/lib/ecosystems/golem.js +578 -18
  57. package/lib/ecosystems/gradleutils.js +340 -46
  58. package/lib/ecosystems/jsEvidence.js +85 -24
  59. package/lib/ecosystems/kosi.js +21 -4
  60. package/lib/ecosystems/npmutils.js +64 -0
  61. package/lib/ecosystems/parsers-dotnet.js +668 -153
  62. package/lib/ecosystems/parsers-elm.js +46 -28
  63. package/lib/ecosystems/parsers-gleam.js +3 -4
  64. package/lib/ecosystems/parsers-go.js +1283 -297
  65. package/lib/ecosystems/parsers-js.js +92 -26
  66. package/lib/ecosystems/parsers-julia.js +2 -3
  67. package/lib/ecosystems/parsers-jvm.js +463 -29
  68. package/lib/ecosystems/parsers-misc.js +405 -93
  69. package/lib/ecosystems/parsers-python.js +152 -20
  70. package/lib/ecosystems/parsers-rust.js +4 -4
  71. package/lib/ecosystems/parsers-terraform.js +1573 -19
  72. package/lib/ecosystems/pythonutils.js +102 -6
  73. package/lib/ecosystems/remote/huggingface.js +3 -0
  74. package/lib/ecosystems/rubyutils.js +73 -20
  75. package/lib/ecosystems/rusi.js +32 -9
  76. package/lib/ecosystems/sbtutils.js +243 -187
  77. package/lib/ecosystems/scalacliutils.js +343 -0
  78. package/lib/ecosystems/scalasem.js +2620 -0
  79. package/lib/ecosystems/terraformRegistry.js +288 -0
  80. package/lib/ecosystems/utils.js +2 -0
  81. package/lib/ecosystems/vendoredCode.js +156 -0
  82. package/lib/evinser/evinser.js +695 -78
  83. package/lib/evinser/swiftsem.js +68 -5
  84. package/lib/helpers/agenticToolutils.js +2 -2
  85. package/lib/helpers/bomSigner.js +576 -128
  86. package/lib/inventory/agentSkillSpec.js +17 -0
  87. package/lib/inventory/aiCollector.js +4 -1
  88. package/lib/inventory/analyzer.js +110 -127
  89. package/lib/inventory/apkInstalledDb.js +243 -0
  90. package/lib/inventory/atomUtils.js +204 -48
  91. package/lib/inventory/auditCategories.js +10 -3
  92. package/lib/inventory/buildToolRateLimit.js +144 -0
  93. package/lib/inventory/cacheCommands.js +2 -1
  94. package/lib/inventory/cacheDir.js +52 -9
  95. package/lib/inventory/certificates.js +2371 -0
  96. package/lib/inventory/cmakeBuildDirs.js +254 -0
  97. package/lib/inventory/communityAiConfigParser.js +4 -9
  98. package/lib/inventory/deps.js +507 -128
  99. package/lib/inventory/display.js +200 -3
  100. package/lib/inventory/dosai.js +747 -101
  101. package/lib/inventory/dosaiParsers.js +310 -15
  102. package/lib/inventory/dynamic.js +96 -8
  103. package/lib/inventory/envcontext.js +168 -5
  104. package/lib/inventory/evidenceUtils.js +590 -132
  105. package/lib/inventory/fetchBatch.js +574 -38
  106. package/lib/inventory/fetchDiskCache.js +597 -0
  107. package/lib/inventory/forgeEnricher.js +14 -5
  108. package/lib/inventory/formulationParsers.js +3 -2
  109. package/lib/inventory/goBuildInfo.js +140 -0
  110. package/lib/inventory/hbom.js +67 -7
  111. package/lib/inventory/hbomAnalysis.js +16 -0
  112. package/lib/inventory/hostTopology.js +21 -0
  113. package/lib/inventory/jvmLocalRepos.js +917 -0
  114. package/lib/inventory/mcpConfigParser.js +2 -3
  115. package/lib/inventory/osPackagePurl.js +244 -0
  116. package/lib/inventory/osPackageResolver.js +89 -87
  117. package/lib/inventory/osinfo.js +79 -31
  118. package/lib/inventory/osqueryTransform.js +114 -5
  119. package/lib/inventory/parentSelection.js +146 -0
  120. package/lib/inventory/phpBuildInfo.js +487 -0
  121. package/lib/inventory/phpHostProbe.js +641 -0
  122. package/lib/inventory/rootfsCerts.js +426 -0
  123. package/lib/inventory/rustFormulationParser.js +3 -4
  124. package/lib/inventory/scalaCoords.js +153 -0
  125. package/lib/inventory/source.js +215 -11
  126. package/lib/inventory/spdx.js +245 -0
  127. package/lib/inventory/traceRunner.js +93 -8
  128. package/lib/inventory/tracedCrypto.js +423 -0
  129. package/lib/managers/binary.js +529 -183
  130. package/lib/managers/docker.js +199 -44
  131. package/lib/managers/oci.js +24 -2
  132. package/lib/parsers/cmakeCache.js +69 -0
  133. package/lib/parsers/cmakeLists.js +16 -2
  134. package/lib/parsers/cmakePresets.js +400 -0
  135. package/lib/parsers/compileCommands.js +557 -0
  136. package/lib/parsers/email.js +277 -0
  137. package/lib/parsers/largeJson.js +34 -2
  138. package/lib/parsers/strictJson.js +322 -0
  139. package/lib/parsers/terraformConfig.js +1073 -0
  140. package/lib/parsers/terraformSource.js +652 -0
  141. package/lib/server/server.js +209 -1
  142. package/lib/stages/postgen/annotator.js +17 -1
  143. package/lib/stages/postgen/introspection/markers.js +1 -1
  144. package/lib/stages/postgen/introspection/reflect.js +4 -1
  145. package/lib/stages/postgen/postgen.js +20 -6
  146. package/lib/stages/postgen/ruleEngine.js +58 -1
  147. package/lib/stages/postgen/specVersionCompat.js +62 -0
  148. package/lib/stages/pregen/pregen.js +117 -5
  149. package/lib/validator/bomValidator.js +26 -5
  150. package/lib/validator/generated/runtime.mjs +13 -0
  151. package/lib/validator/generated/validate-1.6.mjs +26 -7
  152. package/lib/validator/generated/validate-1.7.mjs +31 -12
  153. package/lib/validator/generated/validate-2.0.mjs +30 -11
  154. package/lib/validator/index.js +25 -10
  155. package/lib/validator/reporters/json.js +1 -0
  156. package/package.json +23 -23
  157. package/types/bin/cdxgen-secure.d.ts +3 -0
  158. package/types/bin/cdxgen-secure.d.ts.map +1 -0
  159. package/types/bin/repl.d.ts.map +1 -1
  160. package/types/lib/audit/index.d.ts.map +1 -1
  161. package/types/lib/cli/bomAssembly.d.ts +9 -2
  162. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  163. package/types/lib/cli/cliOptions.d.ts +43 -0
  164. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  165. package/types/lib/cli/index.d.ts.map +1 -1
  166. package/types/lib/cli/jsBom.d.ts.map +1 -1
  167. package/types/lib/cli/jvmBom.d.ts +44 -1
  168. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  169. package/types/lib/cli/managedBom.d.ts +7 -4
  170. package/types/lib/cli/managedBom.d.ts.map +1 -1
  171. package/types/lib/cli/nativeBom.d.ts +3 -1
  172. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  173. package/types/lib/core/activity.d.ts.map +1 -1
  174. package/types/lib/core/env.d.ts +27 -2
  175. package/types/lib/core/env.d.ts.map +1 -1
  176. package/types/lib/core/fs.d.ts.map +1 -1
  177. package/types/lib/core/httpClient.d.ts +13 -8
  178. package/types/lib/core/httpClient.d.ts.map +1 -1
  179. package/types/lib/core/pluginRun.d.ts +97 -0
  180. package/types/lib/core/pluginRun.d.ts.map +1 -0
  181. package/types/lib/core/processTree.d.ts +36 -0
  182. package/types/lib/core/processTree.d.ts.map +1 -0
  183. package/types/lib/core/projectConfig.d.ts.map +1 -1
  184. package/types/lib/core/projectTooling.d.ts +41 -0
  185. package/types/lib/core/projectTooling.d.ts.map +1 -0
  186. package/types/lib/core/propertySanitizer.d.ts +26 -0
  187. package/types/lib/core/propertySanitizer.d.ts.map +1 -1
  188. package/types/lib/core/runState.d.ts +29 -0
  189. package/types/lib/core/runState.d.ts.map +1 -0
  190. package/types/lib/core/toml.d.ts +20 -0
  191. package/types/lib/core/toml.d.ts.map +1 -0
  192. package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
  193. package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
  194. package/types/lib/ecosystems/cargoCache.d.ts +12 -0
  195. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
  196. package/types/lib/ecosystems/cmakeResolver.d.ts +5 -3
  197. package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
  198. package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
  199. package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
  200. package/types/lib/ecosystems/cppEvidence.d.ts +19 -3
  201. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  202. package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
  203. package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
  204. package/types/lib/ecosystems/denoutils.d.ts +9 -3
  205. package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
  206. package/types/lib/ecosystems/ecosystems.d.ts +62 -13
  207. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  208. package/types/lib/ecosystems/golem.d.ts +81 -1
  209. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  210. package/types/lib/ecosystems/gradleutils.d.ts +59 -7
  211. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  212. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  213. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  214. package/types/lib/ecosystems/npmutils.d.ts +15 -0
  215. package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
  216. package/types/lib/ecosystems/parsers-dotnet.d.ts +155 -5
  217. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  218. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
  219. package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
  220. package/types/lib/ecosystems/parsers-go.d.ts +119 -5
  221. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  222. package/types/lib/ecosystems/parsers-js.d.ts +6 -1
  223. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  224. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
  225. package/types/lib/ecosystems/parsers-jvm.d.ts +74 -3
  226. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  227. package/types/lib/ecosystems/parsers-misc.d.ts +21 -59
  228. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  229. package/types/lib/ecosystems/parsers-python.d.ts +57 -6
  230. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  231. package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
  232. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
  233. package/types/lib/ecosystems/pythonutils.d.ts +26 -1
  234. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  235. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  236. package/types/lib/ecosystems/rubyutils.d.ts +21 -1
  237. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  238. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  239. package/types/lib/ecosystems/sbtutils.d.ts +88 -2
  240. package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
  241. package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
  242. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
  243. package/types/lib/ecosystems/scalasem.d.ts +311 -0
  244. package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
  245. package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
  246. package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
  247. package/types/lib/ecosystems/utils.d.ts +2 -2
  248. package/types/lib/ecosystems/utils.d.ts.map +1 -1
  249. package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
  250. package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
  251. package/types/lib/evinser/evinser.d.ts +100 -8
  252. package/types/lib/evinser/evinser.d.ts.map +1 -1
  253. package/types/lib/evinser/swiftsem.d.ts +10 -0
  254. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  255. package/types/lib/helpers/bomSigner.d.ts +80 -4
  256. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  257. package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
  258. package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
  259. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  260. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  261. package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
  262. package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
  263. package/types/lib/inventory/atomUtils.d.ts +96 -10
  264. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  265. package/types/lib/inventory/auditCategories.d.ts +3 -0
  266. package/types/lib/inventory/auditCategories.d.ts.map +1 -1
  267. package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
  268. package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
  269. package/types/lib/inventory/cacheCommands.d.ts +2 -1
  270. package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
  271. package/types/lib/inventory/cacheDir.d.ts +12 -4
  272. package/types/lib/inventory/cacheDir.d.ts.map +1 -1
  273. package/types/lib/inventory/certificates.d.ts +205 -0
  274. package/types/lib/inventory/certificates.d.ts.map +1 -0
  275. package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
  276. package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
  277. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  278. package/types/lib/inventory/deps.d.ts +61 -2
  279. package/types/lib/inventory/deps.d.ts.map +1 -1
  280. package/types/lib/inventory/display.d.ts +18 -0
  281. package/types/lib/inventory/display.d.ts.map +1 -1
  282. package/types/lib/inventory/dosai.d.ts +202 -14
  283. package/types/lib/inventory/dosai.d.ts.map +1 -1
  284. package/types/lib/inventory/dosaiParsers.d.ts +53 -7
  285. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  286. package/types/lib/inventory/dynamic.d.ts +16 -1
  287. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  288. package/types/lib/inventory/envcontext.d.ts +40 -2
  289. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  290. package/types/lib/inventory/evidenceUtils.d.ts +48 -14
  291. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  292. package/types/lib/inventory/fetchBatch.d.ts +83 -14
  293. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  294. package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
  295. package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
  296. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  297. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  298. package/types/lib/inventory/goBuildInfo.d.ts +10 -0
  299. package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
  300. package/types/lib/inventory/hbom.d.ts.map +1 -1
  301. package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
  302. package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
  303. package/types/lib/inventory/hostTopology.d.ts.map +1 -1
  304. package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
  305. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
  306. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  307. package/types/lib/inventory/osPackagePurl.d.ts +99 -0
  308. package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
  309. package/types/lib/inventory/osPackageResolver.d.ts +6 -2
  310. package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
  311. package/types/lib/inventory/osinfo.d.ts +31 -6
  312. package/types/lib/inventory/osinfo.d.ts.map +1 -1
  313. package/types/lib/inventory/osqueryTransform.d.ts +51 -0
  314. package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
  315. package/types/lib/inventory/parentSelection.d.ts +34 -0
  316. package/types/lib/inventory/parentSelection.d.ts.map +1 -0
  317. package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
  318. package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
  319. package/types/lib/inventory/phpHostProbe.d.ts +35 -0
  320. package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
  321. package/types/lib/inventory/rootfsCerts.d.ts +27 -0
  322. package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
  323. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  324. package/types/lib/inventory/scalaCoords.d.ts +80 -0
  325. package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
  326. package/types/lib/inventory/source.d.ts +28 -0
  327. package/types/lib/inventory/source.d.ts.map +1 -1
  328. package/types/lib/inventory/spdx.d.ts +24 -0
  329. package/types/lib/inventory/spdx.d.ts.map +1 -1
  330. package/types/lib/inventory/traceRunner.d.ts +16 -1
  331. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  332. package/types/lib/inventory/tracedCrypto.d.ts +64 -0
  333. package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
  334. package/types/lib/managers/binary.d.ts +10 -0
  335. package/types/lib/managers/binary.d.ts.map +1 -1
  336. package/types/lib/managers/docker.d.ts +12 -0
  337. package/types/lib/managers/docker.d.ts.map +1 -1
  338. package/types/lib/managers/oci.d.ts +3 -1
  339. package/types/lib/managers/oci.d.ts.map +1 -1
  340. package/types/lib/parsers/cmakeCache.d.ts +16 -0
  341. package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
  342. package/types/lib/parsers/cmakeLists.d.ts +2 -1
  343. package/types/lib/parsers/cmakeLists.d.ts.map +1 -1
  344. package/types/lib/parsers/cmakePresets.d.ts +78 -0
  345. package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
  346. package/types/lib/parsers/compileCommands.d.ts +115 -0
  347. package/types/lib/parsers/compileCommands.d.ts.map +1 -0
  348. package/types/lib/parsers/email.d.ts +19 -0
  349. package/types/lib/parsers/email.d.ts.map +1 -0
  350. package/types/lib/parsers/largeJson.d.ts +13 -0
  351. package/types/lib/parsers/largeJson.d.ts.map +1 -1
  352. package/types/lib/parsers/strictJson.d.ts +46 -0
  353. package/types/lib/parsers/strictJson.d.ts.map +1 -0
  354. package/types/lib/parsers/terraformConfig.d.ts +70 -0
  355. package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
  356. package/types/lib/parsers/terraformSource.d.ts +66 -0
  357. package/types/lib/parsers/terraformSource.d.ts.map +1 -0
  358. package/types/lib/server/server.d.ts +8 -0
  359. package/types/lib/server/server.d.ts.map +1 -1
  360. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  361. package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
  362. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  363. package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
  364. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  365. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  366. package/types/lib/stages/pregen/pregen.d.ts +14 -1
  367. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  368. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  369. package/types/lib/validator/index.d.ts +8 -0
  370. package/types/lib/validator/index.d.ts.map +1 -1
  371. package/types/lib/validator/reporters/json.d.ts.map +1 -1
  372. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
@@ -234,3 +234,70 @@
234
234
  "registry": $prop($, 'cdx:pypi:registry'),
235
235
  "resolvedFrom": $prop($, 'cdx:pypi:resolved_from')
236
236
  }
237
+ - id: PKG-012
238
+ name: "Terraform module from mutable VCS reference"
239
+ description: "Terraform modules sourced from git or mercurial without a commit or tag pin are not locked, so the next init can fetch different code"
240
+ severity: high
241
+ category: dependency-source
242
+ dry-run-support: full
243
+ condition: |
244
+ components[
245
+ $hasProp($, 'cdx:tf:kind') and $prop($, 'cdx:tf:kind') = 'module'
246
+ and $hasProp($, 'cdx:tf:module:sourceType')
247
+ and ($prop($, 'cdx:tf:module:sourceType') = 'git' or $prop($, 'cdx:tf:module:sourceType') = 'hg')
248
+ and ($prop($, 'cdx:tf:module:pinning') = 'branch' or $prop($, 'cdx:tf:module:pinning') = 'none')
249
+ ]
250
+ location: |
251
+ { "bomRef": $."bom-ref", "purl": purl }
252
+ message: "Terraform module '{{ name }}@{{ version }}' tracks VCS source '{{ $prop($, 'cdx:tf:module:source') }}' at a mutable reference"
253
+ mitigation: "Pin the module source with `?ref=<commit sha>` or a reviewed, signed tag; the dependency lock file does not cover modules"
254
+ evidence: |
255
+ {
256
+ "source": $prop($, 'cdx:tf:module:source'),
257
+ "sourceType": $prop($, 'cdx:tf:module:sourceType'),
258
+ "ref": $prop($, 'cdx:tf:module:ref'),
259
+ "pinning": $prop($, 'cdx:tf:module:pinning')
260
+ }
261
+ - id: PKG-013
262
+ name: "Terraform registry module not pinned to an exact version"
263
+ description: "Registry modules whose version argument is a range or absent resolve to whatever the registry serves at the next init"
264
+ severity: low
265
+ category: dependency-source
266
+ dry-run-support: full
267
+ condition: |
268
+ components[
269
+ $hasProp($, 'cdx:tf:kind') and $prop($, 'cdx:tf:kind') = 'module'
270
+ and $hasProp($, 'cdx:tf:module:sourceType') and $prop($, 'cdx:tf:module:sourceType') = 'registry'
271
+ and ($prop($, 'cdx:tf:module:pinning') = 'range' or $prop($, 'cdx:tf:module:pinning') = 'none')
272
+ ]
273
+ location: |
274
+ { "bomRef": $."bom-ref", "purl": purl }
275
+ message: "Terraform registry module '{{ $prop($, 'cdx:tf:address') }}' is not pinned to an exact version (pinning: {{ $prop($, 'cdx:tf:module:pinning') }})"
276
+ mitigation: "Set the module's `version` argument to a single exact version and review upgrades deliberately"
277
+ evidence: |
278
+ {
279
+ "constraints": $prop($, 'cdx:tf:constraints'),
280
+ "pinning": $prop($, 'cdx:tf:module:pinning'),
281
+ "address": $prop($, 'cdx:tf:address')
282
+ }
283
+ - id: PKG-014
284
+ name: "Terraform module source embeds credentials"
285
+ description: "A module source string carries a credential such as URL userinfo, a git sshkey parameter or S3 keys, exposing the secret to every reader of the configuration"
286
+ severity: high
287
+ category: dependency-source
288
+ dry-run-support: full
289
+ condition: |
290
+ components[
291
+ $hasProp($, 'cdx:tf:module:credentialInSource')
292
+ and $prop($, 'cdx:tf:module:credentialInSource') = 'true'
293
+ ]
294
+ location: |
295
+ { "bomRef": $."bom-ref", "purl": purl }
296
+ message: "Terraform module '{{ name }}@{{ version }}' resolves from a source that embeds credentials"
297
+ mitigation: "Rotate the exposed credential, move authentication to git credential helpers or an SSH agent, and keep the source URL credential-free"
298
+ evidence: |
299
+ {
300
+ "source": $prop($, 'cdx:tf:module:source'),
301
+ "sourceType": $prop($, 'cdx:tf:module:sourceType'),
302
+ "credentialInSource": $prop($, 'cdx:tf:module:credentialInSource')
303
+ }
@@ -0,0 +1,46 @@
1
+ # Go binary toolchain rules
2
+ # Category: go-security
3
+ # Evaluates the cdx:go:buildVersion property recorded for executable file
4
+ # components during container/rootfs scans.
5
+
6
+ - id: GO-TLS-001
7
+ name: "Go binary built with a toolchain that lacks the CVE-2026-111943 distrust list"
8
+ description: "Go links its standard library statically, so a binary keeps the trust behaviour of the toolchain it was built with. Releases before go1.26.10, and go1.27.0 through go1.27.2, lack the eight SPKI hashes Go uses to distrust the CVE-2026-111943 intermediate CA keys, and older release lines (1.25 and earlier) will never receive them. Release candidates of newer lines (go1.28rc1) already carry the fix."
9
+ severity: high
10
+ category: go-security
11
+ dry-run-support: full
12
+ condition: |
13
+ components[
14
+ type = 'file'
15
+ and $hasProp($, 'cdx:go:buildVersion')
16
+ and (
17
+ $prop($, 'cdx:go:buildVersion') = 'unknown-pre-1.18'
18
+ or (
19
+ $m := $match($prop($, 'cdx:go:buildVersion'), /^go(\d+)\.(\d+)(?:\.(\d+))?/);
20
+ $m != null
21
+ and $number($m.groups[0]) = 1
22
+ and (
23
+ $number($m.groups[1]) < 26
24
+ or (
25
+ $number($m.groups[1]) = 26
26
+ and ($m.groups[2] != null ? $number($m.groups[2]) : 0) < 10
27
+ )
28
+ or (
29
+ $number($m.groups[1]) = 27
30
+ and ($m.groups[2] != null ? $number($m.groups[2]) : 0) < 3
31
+ )
32
+ )
33
+ )
34
+ )
35
+ ]
36
+ location: |
37
+ {
38
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
39
+ }
40
+ message: "Go binary '{{ name }}' was built with {{ $prop($, 'cdx:go:buildVersion') }}, which lacks the CVE-2026-111943 distrust list"
41
+ mitigation: "Rebuild the binary with go1.26.10, go1.27.3 or newer so its crypto/x509 rejects the distrusted intermediate CA keys."
42
+ evidence: |
43
+ {
44
+ "buildVersion": $prop($, 'cdx:go:buildVersion'),
45
+ "srcFile": $prop($, 'internal:SrcFile')
46
+ }
@@ -227,3 +227,83 @@
227
227
  "goModExcludeCount": $prop($, 'cdx:golem:goModExcludeCount'),
228
228
  "excludeModule": $prop($, 'cdx:golem:excludeModule')
229
229
  }
230
+
231
+ - id: GOLEM-SEC-008
232
+ name: "Go component configures a custom TLS root pool"
233
+ description: "Golem reported a tls.Config RootCAs or x509.VerifyOptions Roots override, so the module validates certificates against a pool it supplies instead of the system roots"
234
+ severity: low
235
+ category: golem-security
236
+ dry-run-support: full
237
+ condition: |
238
+ components[
239
+ 'GOLEM-CRYPTO-TLS-CUSTOM-ROOTS' in properties[name = 'cdx:golem:cryptoFinding'].value
240
+ ]
241
+ location: |
242
+ { "bomRef": $."bom-ref", "purl": purl }
243
+ message: "Go component '{{ name }}' sets a custom TLS root CA pool"
244
+ mitigation: "Review where the custom pool comes from and refresh it from a trusted source; a stale pool keeps trusting revoked or distrusted intermediates"
245
+ evidence: |
246
+ {
247
+ "finding": $prop($, 'cdx:golem:cryptoFinding'),
248
+ "severity": $prop($, 'cdx:golem:cryptoFindingSeverity')
249
+ }
250
+
251
+ - id: GOLEM-SEC-009
252
+ name: "Go component replaces certificate verification"
253
+ description: "Golem reported a VerifyPeerCertificate or VerifyConnection callback, so the module performs its own certificate validation instead of (part of) the standard chain verification"
254
+ severity: medium
255
+ category: golem-security
256
+ dry-run-support: full
257
+ condition: |
258
+ components[
259
+ 'GOLEM-CRYPTO-TLS-CUSTOM-VERIFY' in properties[name = 'cdx:golem:cryptoFinding'].value
260
+ ]
261
+ location: |
262
+ { "bomRef": $."bom-ref", "purl": purl }
263
+ message: "Go component '{{ name }}' installs a custom certificate verification callback"
264
+ mitigation: "Check that the callback still calls Certificate.Verify, or that its custom checks are at least as strict; hand-rolled verification can miss revoked or distrusted intermediates"
265
+ evidence: |
266
+ {
267
+ "finding": $prop($, 'cdx:golem:cryptoFinding'),
268
+ "severity": $prop($, 'cdx:golem:cryptoFindingSeverity')
269
+ }
270
+
271
+ - id: GOLEM-SEC-010
272
+ name: "Go component disables TLS verification while customising it"
273
+ description: "Golem reported an InsecureSkipVerify setting on a tls.Config that also customises verification, the pattern where Go's own distrust list no longer applies"
274
+ severity: high
275
+ category: golem-security
276
+ dry-run-support: full
277
+ condition: |
278
+ components[
279
+ 'GOLEM-CRYPTO-TLS-VERIFY-REPLACED' in properties[name = 'cdx:golem:cryptoFinding'].value
280
+ ]
281
+ location: |
282
+ { "bomRef": $."bom-ref", "purl": purl }
283
+ message: "Go component '{{ name }}' sets InsecureSkipVerify together with custom verification"
284
+ mitigation: "Remove InsecureSkipVerify and implement the required checks inside VerifyPeerCertificate on top of the standard chain verification"
285
+ evidence: |
286
+ {
287
+ "finding": $prop($, 'cdx:golem:cryptoFinding'),
288
+ "severity": $prop($, 'cdx:golem:cryptoFindingSeverity')
289
+ }
290
+
291
+ - id: GOLEM-SEC-011
292
+ name: "Go component embeds a certificate pool"
293
+ description: "Golem reported a package-level //go:embed variable fed to x509.CertPool.AppendCertsFromPEM, so a private trust anchor travels inside the binary"
294
+ severity: low
295
+ category: golem-security
296
+ dry-run-support: full
297
+ condition: |
298
+ components[
299
+ 'GOLEM-CRYPTO-X509-EMBEDDED-POOL' in properties[name = 'cdx:golem:cryptoFinding'].value
300
+ ]
301
+ location: |
302
+ { "bomRef": $."bom-ref", "purl": purl }
303
+ message: "Go component '{{ name }}' appends an embedded PEM bundle to an x509 pool"
304
+ mitigation: "Track the embedded bundle like any other trust store: refresh it when CAs change and confirm it contains none of the distrusted keys"
305
+ evidence: |
306
+ {
307
+ "finding": $prop($, 'cdx:golem:cryptoFinding'),
308
+ "severity": $prop($, 'cdx:golem:cryptoFindingSeverity')
309
+ }
@@ -16,26 +16,38 @@
16
16
  - "1.1 Establish and Maintain Detailed Enterprise Asset Inventory"
17
17
  condition: |
18
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
19
+ (
20
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'linux'
21
+ and $count(
22
+ $$.components[
23
+ $prop($, 'cdx:hbom:hardwareClass') = 'board'
24
+ and (
25
+ $hasProp($, 'cdx:hbom:boardVendor')
26
+ or $hasProp($, 'cdx:hbom:boardName')
27
+ or $hasProp($, 'cdx:hbom:biosVendor')
28
+ or $hasProp($, 'cdx:hbom:biosVersion')
29
+ or $hasProp($, 'cdx:hbom:firmwareDate')
30
+ )
31
+ ]
32
+ ) = 0
33
+ )
34
+ or (
35
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'windows'
36
+ and $not(
37
+ $hasProp($, 'cdx:hbom:boardVendor')
38
+ or $hasProp($, 'cdx:hbom:boardName')
39
+ or $hasProp($, 'cdx:hbom:biosVendor')
40
+ or $hasProp($, 'cdx:hbom:biosVersion')
41
+ or $hasProp($, 'cdx:hbom:firmwareDate')
42
+ )
43
+ )
32
44
  ]
33
45
  location: |
34
46
  {
35
47
  "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
36
48
  }
37
49
  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."
50
+ 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. On Windows these come from the windows-cim-platform batch, which a network logon (SSH, WinRM) as a non-administrator cannot run: collect from a local session or an elevated one."
39
51
  evidence: |
40
52
  {
41
53
  "platform": $prop($, 'cdx:hbom:platform'),
@@ -142,7 +154,7 @@
142
154
  "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
143
155
  }
144
156
  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."
157
+ mitigation: "Enable volume-level enrichment on supported platforms or pair the HBOM with equivalent host controls evidence so encryption compliance can be verified. On Windows, BitLocker status comes from the --privileged batch, so rerun from an elevated (Run as administrator) prompt with --privileged."
146
158
  evidence: |
147
159
  {
148
160
  "storageVolumeCount": $count($$.components[$prop($, 'cdx:hbom:hardwareClass') = 'storage-volume']),
@@ -219,8 +231,8 @@
219
231
  {
220
232
  "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
221
233
  }
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."
234
+ message: "HBOM for '{{ name }}' hit permission-denied enrichments that likely require {{ $safeStr($prop($, 'cdx:hbom:platform')) = 'windows' ? 'a rerun from a local or elevated session' : 'a rerun with --privileged' }}"
235
+ mitigation: "Where policy allows, rerun HBOM collection with --privileged. On Linux, cdx-hbom then uses the documented non-interactive sudo path for permission-sensitive enrichments. On Windows it never elevates or prompts: run it from a local session (a non-administrator over SSH or WinRM is denied every WMI query) and, for the TPM, BitLocker and storage-reliability batch, from an elevated (Run as administrator) prompt."
224
236
  evidence: |
225
237
  {
226
238
  "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
@@ -260,7 +272,7 @@
260
272
 
261
273
  - id: HBC-009
262
274
  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."
275
+ description: "When dmidecode-backed firmware and board enrichment is blocked on Linux, or Windows denies WMI to the whole session (a network logon), the HBOM may miss board-vendor, board-name, BIOS-version, and related governance evidence."
264
276
  severity: medium
265
277
  category: hbom-compliance
266
278
  dry-run-support: full
@@ -270,15 +282,21 @@
270
282
  - "SI-7 Software, Firmware, and Information Integrity"
271
283
  condition: |
272
284
  metadata.component[
273
- $safeStr($prop($, 'cdx:hbom:platform')) = 'linux'
274
- and $listContains($propList($$, 'cdx:hbom:analysis:permissionDeniedIds'), 'dmidecode-firmware-board')
285
+ (
286
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'linux'
287
+ and $listContains($propList($$, 'cdx:hbom:analysis:permissionDeniedIds'), 'dmidecode-firmware-board')
288
+ )
289
+ or (
290
+ $safeStr($prop($, 'cdx:hbom:platform')) = 'windows'
291
+ and $listContains($propList($$, 'cdx:hbom:analysis:permissionDeniedIds'), 'windows-cim-platform:network-logon')
292
+ )
275
293
  ]
276
294
  location: |
277
295
  {
278
296
  "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
279
297
  }
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."
298
+ message: "HBOM for '{{ name }}' could not capture full board and BIOS provenance because {{ $safeStr($prop($, 'cdx:hbom:platform')) = 'windows' ? 'WMI was denied to this network logon' : 'dmidecode enrichment was blocked' }}"
299
+ 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. On Windows, run HBOM from a local session or an elevated one instead of over SSH or WinRM as a non-administrator."
282
300
  evidence: |
283
301
  {
284
302
  "collectorProfile": $prop(bom, 'cdx:hbom:collectorProfile'),
@@ -32,7 +32,7 @@
32
32
 
33
33
  - id: HBP-002
34
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."
35
+ description: "Degraded SMART state, a Warning or Unhealthy Windows storage health status, or high wear percentage is a strong leading indicator of latency, failure, or replacement pressure."
36
36
  severity: high
37
37
  category: hbom-performance
38
38
  dry-run-support: full
@@ -50,6 +50,10 @@
50
50
  and $lowercase($safeStr($prop($, 'cdx:hbom:smartStatus'))) != 'ok'
51
51
  and $lowercase($safeStr($prop($, 'cdx:hbom:smartStatus'))) != 'passed'
52
52
  )
53
+ or (
54
+ $lowercase($safeStr($prop($, 'cdx:hbom:healthStatus'))) = 'warning'
55
+ or $lowercase($safeStr($prop($, 'cdx:hbom:healthStatus'))) = 'unhealthy'
56
+ )
53
57
  or (
54
58
  $hasProp($, 'cdx:hbom:wearPercentageUsed')
55
59
  and $number($prop($, 'cdx:hbom:wearPercentageUsed')) >= 80
@@ -65,6 +69,8 @@
65
69
  evidence: |
66
70
  {
67
71
  "smartStatus": $prop($, 'cdx:hbom:smartStatus'),
72
+ "healthStatus": $prop($, 'cdx:hbom:healthStatus'),
73
+ "operationalStatus": $prop($, 'cdx:hbom:operationalStatus'),
68
74
  "wearPercentageUsed": $prop($, 'cdx:hbom:wearPercentageUsed'),
69
75
  "revision": $prop($, 'cdx:hbom:revision'),
70
76
  "deviceSerial": $prop($, 'cdx:hbom:deviceSerial')
@@ -90,7 +90,7 @@
90
90
  "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
91
91
  }
92
92
  message: "Merged host inventory for '{{ name }}' contains no strict HBOM-to-OBOM topology links"
93
- mitigation: "Review collector coverage, ensure runtime categories such as interface_addresses or kernel_modules are available, and prefer exact identifier-bearing probes over heuristic joins."
93
+ mitigation: "Review collector coverage, ensure runtime categories such as interface_addresses or kernel_modules (logical_drives on Windows) are available, and prefer exact identifier-bearing probes over heuristic joins."
94
94
  evidence: |
95
95
  {
96
96
  "hostViewMode": $prop($, 'cdx:hostview:mode'),
@@ -111,8 +111,9 @@
111
111
  "deviceId": name,
112
112
  "driveLetter": version,
113
113
  "protectionStatus": $prop($, 'protection_status'),
114
- "encryptionMethod": $prop($, 'encryption_method'),
115
- "percentageEncrypted": $prop($, 'percentage_encrypted')
114
+ "encryptionMethod": description,
115
+ "percentageEncrypted": $prop($, 'percentage_encrypted'),
116
+ "protectorTypes": $prop($, 'protector_types')
116
117
  }
117
118
 
118
119
  - id: OBOM-WIN-002
@@ -1774,3 +1775,31 @@
1774
1775
  "comment": description,
1775
1776
  "uid": $prop($, 'uid')
1776
1777
  }
1778
+
1779
+ - id: OBOM-LNX-023
1780
+ name: "Linux snap installed in devmode confinement"
1781
+ description: "A snap installed with --devmode runs without its sandbox being enforced: policy violations are only logged. Devmode is meant for snap development, not for software a host relies on."
1782
+ severity: medium
1783
+ category: obom-runtime
1784
+ dry-run-support: full
1785
+ condition: |
1786
+ components[
1787
+ $prop($, 'cdx:osquery:category') = 'snap_packages'
1788
+ and $lowercase($safeStr($prop($, 'cdx:snap:confinement'))) = 'devmode'
1789
+ ]
1790
+ location: |
1791
+ {
1792
+ "bomRef": $."bom-ref",
1793
+ "purl": purl
1794
+ }
1795
+ message: "Snap '{{ name }}' {{ version }} (revision {{ $prop($, 'cdx:snap:revision') }}) is installed in devmode confinement, so its sandbox is not enforced"
1796
+ mitigation: "Reinstall the snap from a stable channel with strict confinement, or remove it. If devmode is required for development, keep it off production and shared hosts."
1797
+ evidence: |
1798
+ {
1799
+ "snap": name,
1800
+ "version": version,
1801
+ "revision": $prop($, 'cdx:snap:revision'),
1802
+ "channel": $prop($, 'cdx:snap:channel'),
1803
+ "confinement": $prop($, 'cdx:snap:confinement'),
1804
+ "grade": $prop($, 'grade')
1805
+ }
@@ -0,0 +1,143 @@
1
+ # PHP source-build runtime rules
2
+ # Category: php-security
3
+ # Evaluates the cdx:php:* properties recorded for unpackaged PHP binaries and
4
+ # shared libraries during container, rootfs and OS (obom) scans. CVE-2026-109618 and
5
+ # CVE-2026-109619 are unauthenticated remote code execution bugs in request
6
+ # handling; fixed in 8.2.35, 8.3.36, 8.4.27 and 8.5.12.
7
+ # https://www.php.net/archive/2026.php#2026-10-21-5
8
+ #
9
+ # Builds from the php-src PHP-<M.m>-CVE-2026-109618-109619 backport branches
10
+ # keep their old version number, so a version check cannot tell them from a
11
+ # vulnerable build. That caveat is in the finding text.
12
+
13
+ - id: PHP-RCE-001
14
+ name: "Network-reachable PHP build affected by CVE-2026-109618 and CVE-2026-109619"
15
+ description: "A source-built PHP web SAPI older than its fixed release is vulnerable to two unauthenticated RCE bugs in request handling. PHP-FPM, php-cgi, libphp (Apache or embed) and FrankenPHP serve requests, so the worker is reachable from the network. The rule never reads PHP configuration: a mitigation never suppresses a finding."
16
+ severity: critical
17
+ category: php-security
18
+ dry-run-support: full
19
+ condition: |
20
+ components[
21
+ type = 'file'
22
+ and $hasProp($, 'cdx:php:buildVersion')
23
+ and $hasProp($, 'cdx:php:sapi')
24
+ and (
25
+ $m := $match($prop($, 'cdx:php:buildVersion'), /^(\d+)\.(\d+)\.(\d+)(?:-(dev)|(alpha|beta|RC)(\d+))?$/);
26
+ $m != null
27
+ and (
28
+ $number($m.groups[0]) < 8
29
+ or ($number($m.groups[0]) = 8 and $number($m.groups[1]) < 2)
30
+ or (
31
+ $number($m.groups[0]) = 8
32
+ and $number($m.groups[1]) = 2
33
+ and $number($m.groups[2]) < 35
34
+ )
35
+ or (
36
+ $number($m.groups[0]) = 8
37
+ and $number($m.groups[1]) = 3
38
+ and $number($m.groups[2]) < 36
39
+ )
40
+ or (
41
+ $number($m.groups[0]) = 8
42
+ and $number($m.groups[1]) = 4
43
+ and $number($m.groups[2]) < 27
44
+ )
45
+ or (
46
+ $number($m.groups[0]) = 8
47
+ and $number($m.groups[1]) = 5
48
+ and $number($m.groups[2]) < 12
49
+ )
50
+ or (
51
+ $number($m.groups[0]) = 8
52
+ and $number($m.groups[1]) = 6
53
+ and $number($m.groups[2]) = 0
54
+ and $m.groups[4] != null
55
+ and (
56
+ $m.groups[4] = 'alpha'
57
+ or $m.groups[4] = 'beta'
58
+ or ($m.groups[4] = 'RC' and $number($m.groups[5]) <= 3)
59
+ )
60
+ )
61
+ )
62
+ )
63
+ and $prop($, 'cdx:php:sapi') in ['fpm', 'cgi', 'libphp', 'frankenphp']
64
+ ]
65
+ location: |
66
+ {
67
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
68
+ }
69
+ message: "PHP {{ $prop($, 'cdx:php:sapi') }} '{{ name }}' is {{ $prop($, 'cdx:php:buildVersion') }}, which is affected by CVE-2026-109618 and CVE-2026-109619 (unauthenticated RCE); fixed in {{ $startsWith($prop($, 'cdx:php:buildVersion'), '8.2.') ? '8.2.35' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.3.') ? '8.3.36' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.4.') ? '8.4.27' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.5.') ? '8.5.12' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.6.') ? '8.6.0RC4 or later' : 'a supported PHP branch or a vendor backport (builds from the php-src CVE backport branches keep their version number and are false positives)' }}"
70
+ mitigation: "Upgrade to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. For 8.1 and older, move to a supported branch or a vendor backport. https://www.php.net/archive/2026.php#2026-10-21-5 Interim measures named by the advisory (an admin-level memory_limit=-1, a low post_max_size, session.upload_progress.enabled=0, and fatal_error_backtraces=0 on 8.5) reduce but do not remove the risk. Builds from the php-src PHP-<M.m>-CVE-2026-109618-109619 backport branches keep their old version number and are false positives."
71
+ evidence: |
72
+ {
73
+ "buildVersion": $prop($, 'cdx:php:buildVersion'),
74
+ "sapi": $prop($, 'cdx:php:sapi'),
75
+ "source": $prop($, 'cdx:php:buildVersionSource'),
76
+ "srcFile": $prop($, 'internal:SrcFile')
77
+ }
78
+
79
+ - id: PHP-RCE-002
80
+ name: "PHP CLI build affected by CVE-2026-109618 and CVE-2026-109619"
81
+ description: "A source-built PHP CLI or phpdbg older than its fixed release contains the same vulnerable request-handling code. The CLI is not network-reachable, but any web SAPI built from the same tree is, so the build should be upgraded."
82
+ severity: medium
83
+ category: php-security
84
+ dry-run-support: full
85
+ condition: |
86
+ components[
87
+ type = 'file'
88
+ and $hasProp($, 'cdx:php:buildVersion')
89
+ and $hasProp($, 'cdx:php:sapi')
90
+ and (
91
+ $m := $match($prop($, 'cdx:php:buildVersion'), /^(\d+)\.(\d+)\.(\d+)(?:-(dev)|(alpha|beta|RC)(\d+))?$/);
92
+ $m != null
93
+ and (
94
+ $number($m.groups[0]) < 8
95
+ or ($number($m.groups[0]) = 8 and $number($m.groups[1]) < 2)
96
+ or (
97
+ $number($m.groups[0]) = 8
98
+ and $number($m.groups[1]) = 2
99
+ and $number($m.groups[2]) < 35
100
+ )
101
+ or (
102
+ $number($m.groups[0]) = 8
103
+ and $number($m.groups[1]) = 3
104
+ and $number($m.groups[2]) < 36
105
+ )
106
+ or (
107
+ $number($m.groups[0]) = 8
108
+ and $number($m.groups[1]) = 4
109
+ and $number($m.groups[2]) < 27
110
+ )
111
+ or (
112
+ $number($m.groups[0]) = 8
113
+ and $number($m.groups[1]) = 5
114
+ and $number($m.groups[2]) < 12
115
+ )
116
+ or (
117
+ $number($m.groups[0]) = 8
118
+ and $number($m.groups[1]) = 6
119
+ and $number($m.groups[2]) = 0
120
+ and $m.groups[4] != null
121
+ and (
122
+ $m.groups[4] = 'alpha'
123
+ or $m.groups[4] = 'beta'
124
+ or ($m.groups[4] = 'RC' and $number($m.groups[5]) <= 3)
125
+ )
126
+ )
127
+ )
128
+ )
129
+ and $prop($, 'cdx:php:sapi') in ['cli', 'phpdbg']
130
+ ]
131
+ location: |
132
+ {
133
+ "bomRef": $firstNonEmpty($."bom-ref", bom.serialNumber)
134
+ }
135
+ message: "PHP {{ $prop($, 'cdx:php:sapi') }} '{{ name }}' is {{ $prop($, 'cdx:php:buildVersion') }}, which is affected by CVE-2026-109618 and CVE-2026-109619 (unauthenticated RCE); fixed in {{ $startsWith($prop($, 'cdx:php:buildVersion'), '8.2.') ? '8.2.35' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.3.') ? '8.3.36' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.4.') ? '8.4.27' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.5.') ? '8.5.12' : $startsWith($prop($, 'cdx:php:buildVersion'), '8.6.') ? '8.6.0RC4 or later' : 'a supported PHP branch or a vendor backport (builds from the php-src CVE backport branches keep their version number and are false positives)' }}. The CLI is not network-reachable, but the same build's web SAPIs are."
136
+ mitigation: "Upgrade to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35. For 8.1 and older, move to a supported branch or a vendor backport. https://www.php.net/archive/2026.php#2026-10-21-5 Builds from the php-src PHP-<M.m>-CVE-2026-109618-109619 backport branches keep their old version number and are false positives."
137
+ evidence: |
138
+ {
139
+ "buildVersion": $prop($, 'cdx:php:buildVersion'),
140
+ "sapi": $prop($, 'cdx:php:sapi'),
141
+ "source": $prop($, 'cdx:php:buildVersionSource'),
142
+ "srcFile": $prop($, 'internal:SrcFile')
143
+ }
@@ -0,0 +1,115 @@
1
+ # Scala Evinse and scalasem Rules
2
+ # Categories: scala-security, scala-compliance
3
+ # Evaluates cdx:scalasem:* properties and the crypto assets emitted by
4
+ # evinse -l scala and cdxgen --evidence for Scala projects.
5
+
6
+ - id: SCALA-SEC-001
7
+ name: "Scala source uses a weak cryptographic algorithm in runtime code"
8
+ description: "scalasem flagged a weak algorithm, mode or key size at a call site in main or generated sources (MD5, SHA-1, DES, ECB, or a key below the modern floor)"
9
+ severity: medium
10
+ category: scala-security
11
+ dry-run-support: full
12
+ condition: |
13
+ components[
14
+ type = 'cryptographic-asset'
15
+ and $prop($, 'cdx:scalasem:crypto:weak') = 'true'
16
+ and (
17
+ 'main' in properties[name = 'cdx:scalasem:usageScopes'].value
18
+ or 'generated' in properties[name = 'cdx:scalasem:usageScopes'].value
19
+ )
20
+ ]
21
+ location: |
22
+ { "bomRef": $."bom-ref", "name": name }
23
+ message: "Weak cryptographic algorithm '{{ name }}' used in Scala source"
24
+ mitigation: "Move to the modern equivalent of this algorithm, mode and key size, and confirm no compatibility constraint forces the weak one. The locations name the exact call sites"
25
+ evidence: |
26
+ {
27
+ "algorithm": name,
28
+ "oid": cryptoProperties.oid,
29
+ "api": $prop($, 'cdx:scalasem:crypto:api'),
30
+ "locations": evidence.occurrences.(location & '#' & line)
31
+ }
32
+
33
+ - id: SCALA-SEC-002
34
+ name: "Scala source calls an outbound service over plaintext transport"
35
+ description: "scalasem found an outbound HTTP or websocket client whose target URL starts with http:// or ws:// and is not a loopback address, so traffic and credentials cross the network unencrypted"
36
+ severity: medium
37
+ category: scala-security
38
+ dry-run-support: full
39
+ condition: |
40
+ services[
41
+ $exists($filter(endpoints, function($e) {
42
+ ($contains($e, 'http://') or $contains($e, 'ws://'))
43
+ and $not($contains($e, /:\/\/(localhost|127\.[0-9.]+|\[::1\])(:|\/|$)/))
44
+ }))
45
+ and $prop($, 'cdx:scalasem:service:kind') != null
46
+ ]
47
+ location: |
48
+ { "name": name, "endpoints": endpoints }
49
+ message: "Outbound service '{{ name }}' is called over plaintext"
50
+ mitigation: "Switch the target to https:// or wss://, or a local socket if the peer is on the same host. The call sites are named by the service's cdx:scalasem:service:location properties"
51
+ evidence: |
52
+ {
53
+ "kind": $prop($, 'cdx:scalasem:service:kind'),
54
+ "client": $prop($, 'cdx:scalasem:service:client'),
55
+ "locations": $filter(properties, function($p) { $p.name = 'cdx:scalasem:service:location' }).value
56
+ }
57
+
58
+ - id: SCALA-SEC-003
59
+ name: "Admin-like Scala endpoint is not marked as authenticated"
60
+ description: "scalasem found an inbound route with an admin, internal, manage or debug path segment that the report does not mark as authenticated. The source analysis does not see middleware or gateways, so this is a path-based prompt for review"
61
+ severity: low
62
+ category: scala-security
63
+ dry-run-support: full
64
+ condition: |
65
+ services[
66
+ $exists($filter(endpoints, function($e) { $contains($e, /(^|\/)(admin|internal|manage|debug)(\/|$)/) }))
67
+ and $prop($, 'cdx:scalasem:endpoint:framework') != null
68
+ and $not(authenticated = true)
69
+ ]
70
+ location: |
71
+ { "name": name, "endpoints": endpoints }
72
+ message: "Endpoint '{{ name }}' looks administrative and is not marked as authenticated"
73
+ mitigation: "Confirm the route is protected by middleware or a gateway the source does not show, and otherwise require authentication on it. The declaration site is named by the service's cdx:scalasem:service:location property"
74
+ evidence: |
75
+ {
76
+ "framework": $prop($, 'cdx:scalasem:endpoint:framework'),
77
+ "handler": $prop($, 'cdx:scalasem:endpoint:handler'),
78
+ "locations": $filter(properties, function($p) { $p.name = 'cdx:scalasem:service:location' }).value
79
+ }
80
+
81
+ - id: SCALA-SEC-004
82
+ name: "Scala source uses a weak algorithm that has no registry OID"
83
+ description: "scalasem flagged a weak algorithm that the OID registry cannot name, such as an MD5 or SHA-1 based signature or an RC4 password scheme, so it is recorded as a property instead of a crypto asset"
84
+ severity: medium
85
+ category: scala-security
86
+ dry-run-support: full
87
+ condition: |
88
+ $append(components, metadata.component)[
89
+ $exists(properties[name = 'cdx:scalasem:crypto:weakFinding'])
90
+ ]
91
+ location: |
92
+ { "bomRef": $."bom-ref", "name": name }
93
+ message: "Weak cryptographic algorithm used in Scala source, recorded on '{{ name }}'"
94
+ mitigation: "Move to a modern algorithm. Each finding names the algorithm and its call site as name@file#line"
95
+ evidence: |
96
+ {
97
+ "findings": properties[name = 'cdx:scalasem:crypto:weakFinding'].value
98
+ }
99
+
100
+ - id: SCALA-COMP-001
101
+ name: "Scala semantic evidence is incomplete"
102
+ description: "The scalasem run behind this BOM was degraded, for example by class files no compiler could read, a missing classpath, a timeout or a failed analyzer, so the BOM's Scala evidence may be missing usages, crypto findings or services"
103
+ severity: low
104
+ category: scala-compliance
105
+ dry-run-support: full
106
+ condition: |
107
+ metadata.component[$prop($, 'cdx:scalasem:degraded') = 'true']
108
+ location: |
109
+ { "bomRef": $."bom-ref", "name": name }
110
+ message: "The Scala semantic evidence for '{{ name }}' is incomplete"
111
+ mitigation: "Read the cdx:scalasem:diagnostic:* metadata properties for the cause, and build the project before scanning when the diagnostics name missing class files or a missing classpath"
112
+ evidence: |
113
+ {
114
+ "diagnostics": $filter(properties, function($p) { $contains($p.name, 'cdx:scalasem:diagnostic:') }).(name & '=' & value)
115
+ }