@cdxgen/cdxgen 13.5.0 → 13.7.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 (380) hide show
  1. package/README.md +17 -10
  2. package/bin/audit.js +7 -4
  3. package/bin/cdxgen.js +260 -37
  4. package/bin/convert.js +146 -22
  5. package/bin/evinse.js +28 -3
  6. package/bin/repl.js +47 -3
  7. package/bin/sign.js +211 -34
  8. package/bin/tracebom.js +18 -6
  9. package/bin/validate.js +24 -3
  10. package/bin/verify.js +113 -5
  11. package/data/behavior-taxonomy.schema.json +1491 -0
  12. package/data/cyclonedx-2.0-bundled.schema.json +18606 -5528
  13. package/data/cyclonedx-2.0-cryptography-defs.schema.json +857 -0
  14. package/data/license-aliases.json +24 -2
  15. package/data/pqc-migration.json +239 -0
  16. package/data/remediations.json +176 -0
  17. package/data/rules/ai-bom.yaml +1 -1
  18. package/data/rules/brotli-decoder.yaml +107 -0
  19. package/data/rules/cbom-security.yaml +4 -3
  20. package/data/rules/package-integrity.yaml +28 -0
  21. package/data/rules/vscode-extensions.yaml +75 -0
  22. package/data/spdx-license-list.json +121 -7
  23. package/data/spdx-licenses.json +69 -0
  24. package/data/spdx.schema.json +845 -2
  25. package/lib/audit/index.js +25 -3
  26. package/lib/cli/bomAssembly.js +172 -4
  27. package/lib/cli/cliOptions.js +121 -17
  28. package/lib/cli/index.js +720 -902
  29. package/lib/cli/jsBom.js +156 -64
  30. package/lib/cli/jvmBom.js +602 -86
  31. package/lib/cli/managedBom.js +161 -19
  32. package/lib/cli/nativeBom.js +52 -5
  33. package/lib/core/boundedFile.js +344 -0
  34. package/lib/core/brotliProbe.js +182 -0
  35. package/lib/core/env.js +34 -0
  36. package/lib/core/fs.js +138 -3
  37. package/lib/core/globPatterns.js +218 -0
  38. package/lib/core/httpClient.js +98 -1
  39. package/lib/core/lockPaths.js +38 -0
  40. package/lib/core/paths.js +24 -1
  41. package/lib/core/processTree.js +100 -8
  42. package/lib/core/projectConfig.js +332 -25
  43. package/lib/core/toolRegistry.js +184 -0
  44. package/lib/ecosystems/cppEvidence.js +263 -106
  45. package/lib/ecosystems/cppIncludeResolver.js +16 -5
  46. package/lib/ecosystems/denoutils.js +2 -2
  47. package/lib/ecosystems/ecosystems.js +25 -10
  48. package/lib/ecosystems/gemHostProbe.js +301 -0
  49. package/lib/ecosystems/golem.js +3 -8
  50. package/lib/ecosystems/gradleutils.js +1909 -229
  51. package/lib/ecosystems/jsEvidence.js +90 -38
  52. package/lib/ecosystems/kosi.js +3 -5
  53. package/lib/ecosystems/npmVersionResolution.js +376 -0
  54. package/lib/ecosystems/parsers-bazel.js +107 -6
  55. package/lib/ecosystems/parsers-js.js +505 -22
  56. package/lib/ecosystems/parsers-misc.js +209 -20
  57. package/lib/ecosystems/parsers-python.js +178 -30
  58. package/lib/ecosystems/parsers-rust.js +117 -15
  59. package/lib/ecosystems/pythonutils.js +128 -2
  60. package/lib/ecosystems/remote/huggingface.js +22 -0
  61. package/lib/ecosystems/rubyutils.js +538 -31
  62. package/lib/ecosystems/rusi.js +2 -4
  63. package/lib/ecosystems/scalacliutils.js +2 -0
  64. package/lib/ecosystems/scalasem.js +798 -152
  65. package/lib/ecosystems/vendoredCode.js +237 -3
  66. package/lib/ecosystems/venvProbe.js +360 -0
  67. package/lib/evinser/evinser.js +536 -71
  68. package/lib/evinser/scalasem.js +5 -1
  69. package/lib/helpers/agenticToolutils.js +525 -94
  70. package/lib/helpers/bomSigner.js +43 -9
  71. package/lib/helpers/jssSigner.js +1276 -0
  72. package/lib/helpers/vsixutils.js +1574 -315
  73. package/lib/inventory/agentBlueprint.js +193 -0
  74. package/lib/inventory/agentToolNames.js +145 -0
  75. package/lib/inventory/aiCollector.js +153 -7
  76. package/lib/inventory/aiInventory.js +44 -8
  77. package/lib/inventory/aiProviders.js +324 -0
  78. package/lib/inventory/atomUtils.js +77 -0
  79. package/lib/inventory/bomUtils.js +8 -1
  80. package/lib/inventory/brotliDecoder.js +142 -0
  81. package/lib/inventory/buildToolRateLimit.js +1 -1
  82. package/lib/inventory/cbomutils.js +56 -7
  83. package/lib/inventory/ciParsers/githubActionsLock.js +821 -0
  84. package/lib/inventory/citations.js +31 -2
  85. package/lib/inventory/communityAiConfigParser.js +978 -80
  86. package/lib/inventory/cyclonedx20.js +152 -0
  87. package/lib/inventory/cyclonedx20Common.js +286 -0
  88. package/lib/inventory/cyclonedx20Derived.js +159 -0
  89. package/lib/inventory/cyclonedx20Parties.js +552 -0
  90. package/lib/inventory/cyclonedx20Read.js +768 -0
  91. package/lib/inventory/cyclonedx20ReadCommon.js +374 -0
  92. package/lib/inventory/cyclonedx20ReadComponents.js +692 -0
  93. package/lib/inventory/cyclonedx20ReadContext.js +380 -0
  94. package/lib/inventory/cyclonedx20ReadEvidence.js +466 -0
  95. package/lib/inventory/cyclonedx20ReadSections.js +599 -0
  96. package/lib/inventory/cyclonedx20Render.js +766 -0
  97. package/lib/inventory/cyclonedx20RenderComponents.js +716 -0
  98. package/lib/inventory/cyclonedx20RenderDefinitions.js +405 -0
  99. package/lib/inventory/cyclonedx20RenderEvidence.js +726 -0
  100. package/lib/inventory/cyclonedx20RenderHardware.js +203 -0
  101. package/lib/inventory/cyclonedx20RenderPatents.js +174 -0
  102. package/lib/inventory/cyclonedx20RenderRefIds.js +314 -0
  103. package/lib/inventory/cyclonedx20RenderSections.js +499 -0
  104. package/lib/inventory/cyclonedx20Tables.js +594 -0
  105. package/lib/inventory/deps.js +141 -13
  106. package/lib/inventory/dosai.js +375 -6
  107. package/lib/inventory/dosaiParsers.js +3 -6
  108. package/lib/inventory/dotnetRuntime.js +367 -0
  109. package/lib/inventory/ecosystemFormulationParsers.js +979 -0
  110. package/lib/inventory/envcontext.js +436 -48
  111. package/lib/inventory/evidenceUtils.js +13 -1
  112. package/lib/inventory/fetchBatch.js +1 -1
  113. package/lib/inventory/formulationParsers.js +124 -14
  114. package/lib/inventory/gtfobins.js +13 -0
  115. package/lib/inventory/hbom.js +45 -6
  116. package/lib/inventory/hbomLoader.js +166 -0
  117. package/lib/inventory/hostRuntimeProbe.js +686 -0
  118. package/lib/inventory/jvmLocalRepos.js +9 -2
  119. package/lib/inventory/jvmToolEnv.js +29 -0
  120. package/lib/inventory/licenseEnhancer.js +12 -0
  121. package/lib/inventory/mavenCentralMirror.js +534 -0
  122. package/lib/inventory/mcpConfigParser.js +5 -0
  123. package/lib/inventory/nodeBuildInfo.js +218 -0
  124. package/lib/inventory/nodeHostProbe.js +202 -0
  125. package/lib/inventory/occurrenceKey.js +90 -0
  126. package/lib/inventory/osPackageResolver.js +182 -0
  127. package/lib/inventory/phpBuildInfo.js +10 -59
  128. package/lib/inventory/phpHostProbe.js +32 -488
  129. package/lib/inventory/pqcMigration.js +426 -0
  130. package/lib/inventory/rubyBuildInfo.js +972 -0
  131. package/lib/inventory/rubyHostProbe.js +218 -0
  132. package/lib/inventory/rustFormulationParser.js +21 -10
  133. package/lib/inventory/scalaCoords.js +4 -3
  134. package/lib/inventory/scalaDedupe.js +440 -0
  135. package/lib/inventory/source.js +114 -8
  136. package/lib/managers/binary.js +337 -3
  137. package/lib/managers/docker.js +79 -0
  138. package/lib/parsers/huggingfaceManifest.js +9 -1
  139. package/lib/parsers/huggingfaceUtils.js +18 -0
  140. package/lib/parsers/kiroPermissions.js +166 -0
  141. package/lib/parsers/largeJson.js +28 -11
  142. package/lib/parsers/vscodeExtensionId.js +183 -0
  143. package/lib/server/server.js +48 -35
  144. package/lib/stages/postgen/postgen.js +41 -1
  145. package/lib/stages/postgen/ruleEngine.js +13 -5
  146. package/lib/stages/postgen/specVersionCompat.js +76 -0
  147. package/lib/stages/pregen/envAudit.js +1 -0
  148. package/lib/stages/pregen/pregen.js +114 -57
  149. package/lib/validator/bomValidator.js +14 -2
  150. package/lib/validator/complianceEngine.js +30 -3
  151. package/lib/validator/complianceRules.js +1416 -4
  152. package/lib/validator/generated/validate-1.6.mjs +1 -1
  153. package/lib/validator/generated/validate-1.7.mjs +1 -1
  154. package/lib/validator/generated/validate-2.0.mjs +57554 -13851
  155. package/lib/validator/index.js +49 -8
  156. package/lib/validator/reporters/json.js +6 -0
  157. package/package.json +11 -10
  158. package/types/bin/repl.d.ts.map +1 -1
  159. package/types/lib/audit/index.d.ts +6 -2
  160. package/types/lib/audit/index.d.ts.map +1 -1
  161. package/types/lib/cli/bomAssembly.d.ts +29 -1
  162. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  163. package/types/lib/cli/cliOptions.d.ts +6 -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 +3 -18
  167. package/types/lib/cli/jsBom.d.ts.map +1 -1
  168. package/types/lib/cli/jvmBom.d.ts +15 -0
  169. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  170. package/types/lib/cli/managedBom.d.ts.map +1 -1
  171. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  172. package/types/lib/core/boundedFile.d.ts +100 -0
  173. package/types/lib/core/boundedFile.d.ts.map +1 -0
  174. package/types/lib/core/brotliProbe.d.ts +37 -0
  175. package/types/lib/core/brotliProbe.d.ts.map +1 -0
  176. package/types/lib/core/env.d.ts +14 -0
  177. package/types/lib/core/env.d.ts.map +1 -1
  178. package/types/lib/core/fs.d.ts +4 -0
  179. package/types/lib/core/fs.d.ts.map +1 -1
  180. package/types/lib/core/globPatterns.d.ts +70 -0
  181. package/types/lib/core/globPatterns.d.ts.map +1 -0
  182. package/types/lib/core/httpClient.d.ts +24 -0
  183. package/types/lib/core/httpClient.d.ts.map +1 -1
  184. package/types/lib/core/lockPaths.d.ts +19 -0
  185. package/types/lib/core/lockPaths.d.ts.map +1 -0
  186. package/types/lib/core/paths.d.ts +9 -0
  187. package/types/lib/core/paths.d.ts.map +1 -1
  188. package/types/lib/core/processTree.d.ts +17 -4
  189. package/types/lib/core/processTree.d.ts.map +1 -1
  190. package/types/lib/core/projectConfig.d.ts +47 -8
  191. package/types/lib/core/projectConfig.d.ts.map +1 -1
  192. package/types/lib/core/toolRegistry.d.ts +36 -0
  193. package/types/lib/core/toolRegistry.d.ts.map +1 -0
  194. package/types/lib/ecosystems/cppEvidence.d.ts +40 -13
  195. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  196. package/types/lib/ecosystems/cppIncludeResolver.d.ts +2 -1
  197. package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -1
  198. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  199. package/types/lib/ecosystems/gemHostProbe.d.ts +28 -0
  200. package/types/lib/ecosystems/gemHostProbe.d.ts.map +1 -0
  201. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  202. package/types/lib/ecosystems/gradleutils.d.ts +294 -20
  203. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  204. package/types/lib/ecosystems/jsEvidence.d.ts +14 -1
  205. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  206. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  207. package/types/lib/ecosystems/npmVersionResolution.d.ts +119 -0
  208. package/types/lib/ecosystems/npmVersionResolution.d.ts.map +1 -0
  209. package/types/lib/ecosystems/parsers-bazel.d.ts.map +1 -1
  210. package/types/lib/ecosystems/parsers-js.d.ts +17 -20
  211. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  212. package/types/lib/ecosystems/parsers-misc.d.ts +19 -0
  213. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  214. package/types/lib/ecosystems/parsers-python.d.ts +10 -0
  215. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  216. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  217. package/types/lib/ecosystems/pythonutils.d.ts +19 -1
  218. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  219. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  220. package/types/lib/ecosystems/rubyutils.d.ts +144 -12
  221. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  222. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  223. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -1
  224. package/types/lib/ecosystems/scalasem.d.ts +58 -16
  225. package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
  226. package/types/lib/ecosystems/vendoredCode.d.ts +26 -0
  227. package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -1
  228. package/types/lib/ecosystems/venvProbe.d.ts +40 -0
  229. package/types/lib/ecosystems/venvProbe.d.ts.map +1 -0
  230. package/types/lib/evinser/evinser.d.ts +120 -13
  231. package/types/lib/evinser/evinser.d.ts.map +1 -1
  232. package/types/lib/evinser/scalasem.d.ts.map +1 -1
  233. package/types/lib/helpers/agenticToolutils.d.ts +53 -19
  234. package/types/lib/helpers/agenticToolutils.d.ts.map +1 -1
  235. package/types/lib/helpers/bomSigner.d.ts +20 -3
  236. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  237. package/types/lib/helpers/jssSigner.d.ts +288 -0
  238. package/types/lib/helpers/jssSigner.d.ts.map +1 -0
  239. package/types/lib/helpers/vsixutils.d.ts +303 -19
  240. package/types/lib/helpers/vsixutils.d.ts.map +1 -1
  241. package/types/lib/inventory/agentBlueprint.d.ts +70 -0
  242. package/types/lib/inventory/agentBlueprint.d.ts.map +1 -0
  243. package/types/lib/inventory/agentToolNames.d.ts +51 -0
  244. package/types/lib/inventory/agentToolNames.d.ts.map +1 -0
  245. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  246. package/types/lib/inventory/aiInventory.d.ts.map +1 -1
  247. package/types/lib/inventory/aiProviders.d.ts +85 -0
  248. package/types/lib/inventory/aiProviders.d.ts.map +1 -0
  249. package/types/lib/inventory/atomUtils.d.ts +19 -0
  250. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  251. package/types/lib/inventory/bomUtils.d.ts.map +1 -1
  252. package/types/lib/inventory/brotliDecoder.d.ts +58 -0
  253. package/types/lib/inventory/brotliDecoder.d.ts.map +1 -0
  254. package/types/lib/inventory/cbomutils.d.ts +17 -0
  255. package/types/lib/inventory/cbomutils.d.ts.map +1 -1
  256. package/types/lib/inventory/ciParsers/githubActionsLock.d.ts +101 -0
  257. package/types/lib/inventory/ciParsers/githubActionsLock.d.ts.map +1 -0
  258. package/types/lib/inventory/citations.d.ts +5 -0
  259. package/types/lib/inventory/citations.d.ts.map +1 -1
  260. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  261. package/types/lib/inventory/cyclonedx20.d.ts +99 -0
  262. package/types/lib/inventory/cyclonedx20.d.ts.map +1 -0
  263. package/types/lib/inventory/cyclonedx20Common.d.ts +102 -0
  264. package/types/lib/inventory/cyclonedx20Common.d.ts.map +1 -0
  265. package/types/lib/inventory/cyclonedx20Derived.d.ts +74 -0
  266. package/types/lib/inventory/cyclonedx20Derived.d.ts.map +1 -0
  267. package/types/lib/inventory/cyclonedx20Parties.d.ts +91 -0
  268. package/types/lib/inventory/cyclonedx20Parties.d.ts.map +1 -0
  269. package/types/lib/inventory/cyclonedx20Read.d.ts +51 -0
  270. package/types/lib/inventory/cyclonedx20Read.d.ts.map +1 -0
  271. package/types/lib/inventory/cyclonedx20ReadCommon.d.ts +69 -0
  272. package/types/lib/inventory/cyclonedx20ReadCommon.d.ts.map +1 -0
  273. package/types/lib/inventory/cyclonedx20ReadComponents.d.ts +77 -0
  274. package/types/lib/inventory/cyclonedx20ReadComponents.d.ts.map +1 -0
  275. package/types/lib/inventory/cyclonedx20ReadContext.d.ts +118 -0
  276. package/types/lib/inventory/cyclonedx20ReadContext.d.ts.map +1 -0
  277. package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts +40 -0
  278. package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts.map +1 -0
  279. package/types/lib/inventory/cyclonedx20ReadSections.d.ts +45 -0
  280. package/types/lib/inventory/cyclonedx20ReadSections.d.ts.map +1 -0
  281. package/types/lib/inventory/cyclonedx20Render.d.ts +53 -0
  282. package/types/lib/inventory/cyclonedx20Render.d.ts.map +1 -0
  283. package/types/lib/inventory/cyclonedx20RenderComponents.d.ts +73 -0
  284. package/types/lib/inventory/cyclonedx20RenderComponents.d.ts.map +1 -0
  285. package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts +29 -0
  286. package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts.map +1 -0
  287. package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts +110 -0
  288. package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts.map +1 -0
  289. package/types/lib/inventory/cyclonedx20RenderHardware.d.ts +42 -0
  290. package/types/lib/inventory/cyclonedx20RenderHardware.d.ts.map +1 -0
  291. package/types/lib/inventory/cyclonedx20RenderPatents.d.ts +26 -0
  292. package/types/lib/inventory/cyclonedx20RenderPatents.d.ts.map +1 -0
  293. package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts +55 -0
  294. package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts.map +1 -0
  295. package/types/lib/inventory/cyclonedx20RenderSections.d.ts +45 -0
  296. package/types/lib/inventory/cyclonedx20RenderSections.d.ts.map +1 -0
  297. package/types/lib/inventory/cyclonedx20Tables.d.ts +134 -0
  298. package/types/lib/inventory/cyclonedx20Tables.d.ts.map +1 -0
  299. package/types/lib/inventory/deps.d.ts +35 -2
  300. package/types/lib/inventory/deps.d.ts.map +1 -1
  301. package/types/lib/inventory/dosai.d.ts +36 -1
  302. package/types/lib/inventory/dosai.d.ts.map +1 -1
  303. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  304. package/types/lib/inventory/dotnetRuntime.d.ts +91 -0
  305. package/types/lib/inventory/dotnetRuntime.d.ts.map +1 -0
  306. package/types/lib/inventory/ecosystemFormulationParsers.d.ts +73 -0
  307. package/types/lib/inventory/ecosystemFormulationParsers.d.ts.map +1 -0
  308. package/types/lib/inventory/envcontext.d.ts +74 -12
  309. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  310. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  311. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  312. package/types/lib/inventory/gtfobins.d.ts.map +1 -1
  313. package/types/lib/inventory/hbom.d.ts +11 -0
  314. package/types/lib/inventory/hbom.d.ts.map +1 -1
  315. package/types/lib/inventory/hbomLoader.d.ts +54 -0
  316. package/types/lib/inventory/hbomLoader.d.ts.map +1 -1
  317. package/types/lib/inventory/hostRuntimeProbe.d.ts +44 -0
  318. package/types/lib/inventory/hostRuntimeProbe.d.ts.map +1 -0
  319. package/types/lib/inventory/jvmLocalRepos.d.ts +5 -1
  320. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -1
  321. package/types/lib/inventory/jvmToolEnv.d.ts +12 -0
  322. package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -1
  323. package/types/lib/inventory/licenseEnhancer.d.ts.map +1 -1
  324. package/types/lib/inventory/mavenCentralMirror.d.ts +170 -0
  325. package/types/lib/inventory/mavenCentralMirror.d.ts.map +1 -0
  326. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  327. package/types/lib/inventory/nodeBuildInfo.d.ts +95 -0
  328. package/types/lib/inventory/nodeBuildInfo.d.ts.map +1 -0
  329. package/types/lib/inventory/nodeHostProbe.d.ts +15 -0
  330. package/types/lib/inventory/nodeHostProbe.d.ts.map +1 -0
  331. package/types/lib/inventory/occurrenceKey.d.ts +52 -0
  332. package/types/lib/inventory/occurrenceKey.d.ts.map +1 -0
  333. package/types/lib/inventory/osPackageResolver.d.ts +38 -0
  334. package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
  335. package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -1
  336. package/types/lib/inventory/phpHostProbe.d.ts.map +1 -1
  337. package/types/lib/inventory/pqcMigration.d.ts +84 -0
  338. package/types/lib/inventory/pqcMigration.d.ts.map +1 -0
  339. package/types/lib/inventory/rubyBuildInfo.d.ts +271 -0
  340. package/types/lib/inventory/rubyBuildInfo.d.ts.map +1 -0
  341. package/types/lib/inventory/rubyHostProbe.d.ts +47 -0
  342. package/types/lib/inventory/rubyHostProbe.d.ts.map +1 -0
  343. package/types/lib/inventory/rustFormulationParser.d.ts +7 -2
  344. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  345. package/types/lib/inventory/scalaCoords.d.ts.map +1 -1
  346. package/types/lib/inventory/scalaDedupe.d.ts +43 -0
  347. package/types/lib/inventory/scalaDedupe.d.ts.map +1 -0
  348. package/types/lib/inventory/source.d.ts +25 -0
  349. package/types/lib/inventory/source.d.ts.map +1 -1
  350. package/types/lib/managers/binary.d.ts.map +1 -1
  351. package/types/lib/managers/docker.d.ts +12 -0
  352. package/types/lib/managers/docker.d.ts.map +1 -1
  353. package/types/lib/parsers/huggingfaceManifest.d.ts +10 -1
  354. package/types/lib/parsers/huggingfaceManifest.d.ts.map +1 -1
  355. package/types/lib/parsers/huggingfaceUtils.d.ts +12 -0
  356. package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
  357. package/types/lib/parsers/kiroPermissions.d.ts +62 -0
  358. package/types/lib/parsers/kiroPermissions.d.ts.map +1 -0
  359. package/types/lib/parsers/largeJson.d.ts +4 -3
  360. package/types/lib/parsers/largeJson.d.ts.map +1 -1
  361. package/types/lib/parsers/vscodeExtensionId.d.ts +48 -0
  362. package/types/lib/parsers/vscodeExtensionId.d.ts.map +1 -0
  363. package/types/lib/server/server.d.ts.map +1 -1
  364. package/types/lib/stages/postgen/postgen.d.ts +7 -0
  365. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  366. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  367. package/types/lib/stages/postgen/specVersionCompat.d.ts +25 -0
  368. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  369. package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
  370. package/types/lib/stages/pregen/pregen.d.ts +12 -8
  371. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  372. package/types/lib/validator/bomValidator.d.ts +5 -1
  373. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  374. package/types/lib/validator/complianceEngine.d.ts +4 -4
  375. package/types/lib/validator/complianceEngine.d.ts.map +1 -1
  376. package/types/lib/validator/complianceRules.d.ts +14 -2
  377. package/types/lib/validator/complianceRules.d.ts.map +1 -1
  378. package/types/lib/validator/index.d.ts +10 -0
  379. package/types/lib/validator/index.d.ts.map +1 -1
  380. package/types/lib/validator/reporters/json.d.ts.map +1 -1
@@ -0,0 +1,95 @@
1
+ /**
2
+ * The most node-named files one scan opens in search of a build version.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export declare const MAX_NODE_PROBES: number;
7
+ /**
8
+ * Whether a file name is one the Node.js runtime is installed under.
9
+ *
10
+ * @param {string} fileName basename or path of the candidate
11
+ * @returns {boolean} true for `node`, `nodejs` and `node.exe`
12
+ */
13
+ export declare function isNodeBinaryName(fileName: string): boolean;
14
+ /**
15
+ * Parse a Node.js version in the grammar the release tooling produces:
16
+ * `24.22.1`, `25.0.0-rc.1`, `26.0.0-nightly20260301abcdef`.
17
+ *
18
+ * @param {string} text candidate version, without the leading `v`
19
+ * @returns {string|undefined} the version, or undefined
20
+ */
21
+ export declare function parseNodeVersion(text: string): string | undefined;
22
+ /**
23
+ * Read the Node.js version a `node` binary was built as.
24
+ *
25
+ * @param {string} absPath absolute path of the binary
26
+ * @param {string|undefined} rootDir extracted root, when the file came from one
27
+ * @returns {{version: string, source: string, channel?: string}|undefined}
28
+ * source is `release-url` or `binary`
29
+ */
30
+ export declare function readNodeBuildVersion(absPath: string, rootDir: string | undefined): {
31
+ version: string;
32
+ source: string;
33
+ channel?: string;
34
+ } | undefined;
35
+ /**
36
+ * The CPE that lets a downstream scanner match a Node.js version. NVD names the
37
+ * product node.js and keeps a pre-release in the update field.
38
+ *
39
+ * @param {string} version Node.js version
40
+ * @returns {string} CPE 2.3 string
41
+ */
42
+ export declare function nodeCpe(version: string): string;
43
+ /**
44
+ * A Node.js runtime is one `platform` component per distinct version, like the
45
+ * PHP and Go stdlib components. Its identity is `pkg:generic/node`: it is only
46
+ * used where no package manager owns the runtime.
47
+ *
48
+ * @param {string} version Node.js version
49
+ * @returns {Object} component with `purl`, `bom-ref` and `cpe`
50
+ */
51
+ export declare function createNodeRuntimeComponent(version: string): Object;
52
+ /**
53
+ * The properties a node file component carries once its build is known.
54
+ *
55
+ * @param {{version: string, source: string, channel?: string}} build result of readNodeBuildVersion
56
+ * @returns {{name: string, value: string}[]} properties to append
57
+ */
58
+ export declare function nodeBuildProperties(build: {
59
+ version: string;
60
+ source: string;
61
+ channel?: string;
62
+ }): {
63
+ name: string;
64
+ value: string;
65
+ }[];
66
+ /**
67
+ * Start collecting the runtime components and edges of one scan.
68
+ *
69
+ * @returns {{runtimeComponents: Object[], dependencies: Object[], runtimeRefs: Set<string>}}
70
+ */
71
+ export declare function createNodeRuntimeInventory(): {
72
+ runtimeComponents: Object[];
73
+ dependencies: Object[];
74
+ runtimeRefs: Set<string>;
75
+ };
76
+ /**
77
+ * Tag a node file component with its build facts and link it to the runtime
78
+ * component of its version, creating that component on first use. Mutates the
79
+ * component in place.
80
+ *
81
+ * @param {{runtimeComponents: Object[], dependencies: Object[], runtimeRefs: Set<string>}} inventory
82
+ * accumulator from createNodeRuntimeInventory
83
+ * @param {Object} component file component, with a `properties` array
84
+ * @param {{version: string, source: string, channel?: string}} build result of readNodeBuildVersion
85
+ */
86
+ export declare function attachNodeBuild(inventory: {
87
+ runtimeComponents: Object[];
88
+ dependencies: Object[];
89
+ runtimeRefs: Set<string>;
90
+ }, component: Object, build: {
91
+ version: string;
92
+ source: string;
93
+ channel?: string;
94
+ }): void;
95
+ //# sourceMappingURL=nodeBuildInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeBuildInfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/nodeBuildInfo.js"],"names":[],"mappings":"AAgCA;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAFlB,MAEuB,CAAC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AE,KAAK,EAFhD;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAEF,QAkB1D"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Look for Node.js no package manager owns on the host. Components come back
3
+ * only for the files nothing owns: a `file` component for each `node` binary
4
+ * with the cdx:node and cdx:brotli properties, one `platform` component per
5
+ * Node.js version with its CPE, and the brotli component when a binary embeds
6
+ * a decoder.
7
+ *
8
+ * @param {Object} [options] probe options, as probeHostPhp takes them
9
+ * @returns {{components: Object[], dependencies: Object[]}}
10
+ */
11
+ export declare function probeHostNode(options?: Object): {
12
+ components: Object[];
13
+ dependencies: Object[];
14
+ };
15
+ //# sourceMappingURL=nodeHostProbe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeHostProbe.d.ts","sourceRoot":"","sources":["../../../lib/inventory/nodeHostProbe.js"],"names":[],"mappings":"AA2JA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,AAHlC,CACA,EADQ,MAG+B,GAF7B;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAsC1D"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The key of a place in a purl's occurrence set (`purlLocationMap`).
3
+ *
4
+ * Every location that enters an occurrence set is keyed by this function,
5
+ * whatever evidence source added it: the seeding from the input BOM
6
+ * (`initFromSbom`), the atom `usages` and `callsites` slices, the golem, rusi,
7
+ * kosi, dosai and scalasem reports, the C include attribution and the Swift
8
+ * semantics slices. Backslashes become `/`, so a place spelled with `\` in the
9
+ * input BOM (Windows cdxgen output) and `/` in a slice is one occurrence, not
10
+ * two (issue 4726). The path is otherwise left as spelled: no resolving, no
11
+ * case folding, no stripping of a leading `./`.
12
+ *
13
+ * A place a line already names is keyed `file#line`; a place a callsites
14
+ * record names down to its column (counted from 0, as atom writes it) is keyed
15
+ * `file:line:offset`, so two use
16
+ * sites on one line are two occurrences. An occurrence with only `location`
17
+ * and `line` names the line as a whole: it is the same place as any use site
18
+ * that line carries, and it is kept as an occurrence of its own only while no
19
+ * `file:line:offset` key of that line exists (the writer drops the line-only
20
+ * key then, see `dropSubsumedOccurrenceKeys`). That rule is what keeps a
21
+ * re-run of evinse over its own output at the same occurrences: the first run
22
+ * writes the `file:line:offset` keys, and the second run seeds and re-adds
23
+ * exactly those.
24
+ *
25
+ * @param {string} location File path or other location text
26
+ * @param {number} [line] Line number; not a positive number means the location names no line
27
+ * @param {number} [offset] Column within the line, counted from 0 as atom writes it; a value that is not an integer of 0 or more (atom writes -1 for an unknown column) means the place is the line
28
+ * @returns {string|undefined} Key in the `file:line:offset`, `file#line` or plain `file` shape; undefined when the location is empty
29
+ */
30
+ export declare function occurrenceLocationKey(location: string, line?: number, offset?: number): string | undefined;
31
+ /**
32
+ * Drop the occurrence keys a use-site key subsumes.
33
+ *
34
+ * A `file:line:offset` key names a use site on a line; the line-only
35
+ * `file#line` key of the same line names no place of its own any more, so it
36
+ * is removed rather than counted beside the use sites (issue 4726: an
37
+ * occurrence seeded from an input BOM with only `location` and `line` is the
38
+ * same place as a callsites occurrence at that line).
39
+ *
40
+ * @param {string[]} keys Occurrence-set keys
41
+ * @returns {string[]} The keys without the subsumed line-only entries
42
+ */
43
+ export declare function dropSubsumedOccurrenceKeys(keys: string[]): string[];
44
+ /**
45
+ * The location part of an occurrence-set key: `src/a.js` for `src/a.js#3`,
46
+ * `src/a.js:3:14` and `src/a.js` alike.
47
+ *
48
+ * @param {string} key Key made by `occurrenceLocationKey`
49
+ * @returns {string} The location the key names
50
+ */
51
+ export declare function occurrenceKeyLocation(key: string): string;
52
+ //# sourceMappingURL=occurrenceKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occurrenceKey.d.ts","sourceRoot":"","sources":["../../../lib/inventory/occurrenceKey.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EALnC,MAKmC,EAAE,IAAI,AAJjD,CACA,EADQ,MAIyC,EAAE,MAAM,AAHzD,CACA,EADQ,MAGiD,GAF/C,MAAM,GAAC,SAAS,CAa5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAHpC,MAAM,EAG8B,GAFlC,MAAM,EAAE,CAiBpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAH9B,MAG8B,GAF5B,MAAM,CAalB"}
@@ -50,4 +50,42 @@ export declare function collectExecutables(basePath: any, binPaths: any, exclude
50
50
  * @return {Array[String]} List of executables
51
51
  */
52
52
  export declare function collectSharedLibs(basePath: any, libPaths: any, ldConf: string, ldConfDirPattern: string, excludePaths?: any, extraLibGlobs?: any): any;
53
+ /**
54
+ * The most native extension candidates one scan returns.
55
+ *
56
+ * @type {number}
57
+ */
58
+ export declare const MAX_NATIVE_EXTENSIONS: number;
59
+ /**
60
+ * Collect native extension modules under a root file system that the library
61
+ * collector does not see, leaving out paths a package database owns and paths
62
+ * already collected. Symlinks are not followed, so a link pointing out of the
63
+ * root is never listed.
64
+ *
65
+ * @param {string} basePath extracted root file system
66
+ * @param {string[]} [excludePaths] root-relative paths to leave out
67
+ * @returns {string[]} root-relative paths, sorted, capped at MAX_NATIVE_EXTENSIONS
68
+ */
69
+ export declare function collectNativeExtensions(basePath: string, excludePaths?: string[]): string[];
70
+ /**
71
+ * Mark language packages that an OS package installed. Alpine's py3-brotli
72
+ * ships a Brotli-1.1.0.dist-info that a Python scan reports as
73
+ * pkg:pypi/brotli@1.1.0, but a distro fixes it by backporting under the same
74
+ * upstream version, so a PyPI advisory range keeps matching after the fix. The
75
+ * `cdx:os:installedBy` property names the OS package that owns the
76
+ * installation record, so a consumer can judge the component by that package
77
+ * instead.
78
+ *
79
+ * A component is marked only when every installation record it was read from
80
+ * belongs to an OS package: a copy that pip put in a virtual environment
81
+ * beside the distro's is not the distro's to fix. Run it after duplicates
82
+ * merge, so that a merged component carries all of its records.
83
+ *
84
+ * @param {Object[]} components BOM components, mutated in place
85
+ * @param {Map<string, string>|undefined} ownerByPath root-relative file path to
86
+ * owning OS package bom-ref
87
+ * @param {string} [rootDir] extracted root, stripped from absolute source paths
88
+ * @returns {number} how many components were marked
89
+ */
90
+ export declare function markOsInstalledLanguagePackages(components: Object[], ownerByPath: Map<string, string> | undefined, rootDir?: string): number;
53
91
  //# sourceMappingURL=osPackageResolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"osPackageResolver.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osPackageResolver.js"],"names":[],"mappings":"AAwBA;;GAEG;AACH,wBAAgB,iBAAiB,SAGhC;AAsDD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAHnC,MAGmC,GAFjC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CA8BnH;AAuGD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAJ9B,MAI8B,EAAE,UAAU,EAH1C,MAAM,EAGoC,GAFxC,MAAM,GAAC,SAAS,CA+B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA,EAAE,YAAY,MAAK,OAqEvE;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,KAAA,EACR,QAAQ,KAAA,EACR,MAAM,QAAA,EACN,gBAAgB,QAAA,EAChB,YAAY,MAAK,EACjB,aAAa,MAAK,OAiGnB"}
1
+ {"version":3,"file":"osPackageResolver.d.ts","sourceRoot":"","sources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AS,EAJxC,MAIwC,EAAE,KAAK,EAH/C;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAGe,EAAE,IAAI,EAFrD,MAEqD,QAe/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"phpHostProbe.d.ts","sourceRoot":"","sources":["../../../lib/inventory/phpHostProbe.js"],"names":[],"mappings":"AAmjBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,OAAO,AAfjC,CAQA,EAPA;IAAyB,QAAQ,AAAjC,CAEA,EAFQ,MAAM,CAEd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,GAAG,AAA5B,CAEA,EAFQ,MAAM,CAEd;IAA6G,gBAAgB,AAA7H,CAEA,EAFQ;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAC,CAElG;CAOsC,GAF5B;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CA0D1D"}
1
+ {"version":3,"file":"phpHostProbe.d.ts","sourceRoot":"","sources":["../../../lib/inventory/phpHostProbe.js"],"names":[],"mappings":"AAqIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,OAAO,AAfjC,CAQA,EAPA;IAAyB,QAAQ,AAAjC,CAEA,EAFQ,MAAM,CAEd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,GAAG,AAA5B,CAEA,EAFQ,MAAM,CAEd;IAA6G,gBAAgB,AAA7H,CAEA,EAFQ;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAC,CAElG;CAOsC,GAF5B;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAgC1D"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Post-quantum migration risk for cryptographic assets (cdxgen/cdxgen#4592).
3
+ *
4
+ * The facts come from data/pqc-migration.json: the classes of NIST IR 8547
5
+ * (final, October 2026) Tables 2, 4 and 8 and section 4.1.3, plus FIPS 186-5
6
+ * for DSA, each with its members (algorithm families, OIDs and normalised
7
+ * names), the transition the source states and the rationale text. This
8
+ * module classifies a component and builds the risk entry; it adds no fact of
9
+ * its own.
10
+ *
11
+ * Classification of an algorithm asset (cryptoProperties.assetType
12
+ * `algorithm`), first match wins. A hybrid combiner (primitive `combiner`) is
13
+ * not classified: IR 8547 section 3.2.1 approves a composite scheme with one
14
+ * approved input, so the OID of one input does not decide it.
15
+ *
16
+ * 1. `algorithmProperties.algorithmFamily`. A quantum-safe family (SHA-2,
17
+ * SHA-3, AES, ML-KEM, …) is safe, except its 112-bit members (SHA-224,
18
+ * SHA-512/224, SHA3-224), which are recognised by OID or name.
19
+ * 2. `cryptoProperties.oid` (rsaEncryption, id-ecPublicKey, the RSA, ECDSA,
20
+ * EdDSA and DSA signature OIDs, X25519/X448, DH, …).
21
+ * 3. The component name, lower case with only letters and digits kept
22
+ * ("SHA-512/224" is `sha512224`), then resolveAlgorithmFamily(name). A
23
+ * name that resolves to a hash family but names a DSA, RSA or ECDSA
24
+ * signature ("SHA256withDSA", "dsa-with-sha256", "RSA-SHA-512") is that
25
+ * signature algorithm, not its digest.
26
+ *
27
+ * A class whose members have a key family (rsa, ff, ec) is checked against
28
+ * the minimum key size of IR 8547 Tables 2 and 4 (112 bits of classical
29
+ * strength: RSA and finite-field 2048, elliptic curve 224). An algorithm with
30
+ * a known smaller key, and a public or private key asset
31
+ * (`related-crypto-material`) whose size is smaller, is classed
32
+ * `below-minimum-strength` instead. The key size of an algorithm comes from
33
+ * the first of these that gives a plausible key size (at least 512 for rsa
34
+ * and ff, 160 to 571 for ec): a trailing number in its name ("RSA-1024")
35
+ * unless it follows a hash token ("RSASSA-PSS-SHA-512",
36
+ * "sha512WithRSAEncryption-512"), an RFC 7919 group name ("ffdhe2048"), its
37
+ * `parameterSetIdentifier` (a digest size such as "256" on an RSA signature
38
+ * is not a key size) or the bit size in its curve name. A key asset is
39
+ * checked with its own size against the base class of its algorithm, so a
40
+ * 4096-bit key of an algorithm named "RSA-1024" is not reported again.
41
+ *
42
+ * The likelihood and impact levels are the fixed per-class rating the data
43
+ * file records. No confidence is emitted (the rating is not a measurement)
44
+ * and no organisational fact is invented: no owner, status or responses.
45
+ */
46
+ /** Prefix of every risk refId this module derives. */
47
+ export declare const PQC_RISK_REF_ID_PREFIX = "risk-pqc-";
48
+ /**
49
+ * A name in lower case with only ASCII letters and digits kept, the form the
50
+ * `names` tables of data/pqc-migration.json use.
51
+ *
52
+ * @param {string} name Algorithm or key name
53
+ * @returns {string} The compact name, empty for no name
54
+ */
55
+ export declare function compactAlgorithmName(name: string): string;
56
+ /**
57
+ * Classify one cryptographic-asset component. Algorithm assets get their
58
+ * IR 8547 class; key assets are classified only when their size is below the
59
+ * IR 8547 minimum (the algorithm asset carries the quantum risk).
60
+ *
61
+ * @param {object} component A component with cryptoProperties
62
+ * @param {Map<string, object>} [algorithmsByRef] Components by bom-ref, to
63
+ * resolve a key's `algorithmRef`
64
+ * @returns {{className: string, keyFamily?: string, keySize?: number, minimumKeySize?: number}|undefined}
65
+ * The class, or undefined when the asset is quantum-safe or unclassified
66
+ */
67
+ export declare function classifyPqcCryptoAsset(component: object, algorithmsByRef?: Map<string, object>): {
68
+ className: string;
69
+ keyFamily?: string;
70
+ keySize?: number;
71
+ minimumKeySize?: number;
72
+ } | undefined;
73
+ /**
74
+ * Build the risks.risks[] entries for the quantum-vulnerable and weak
75
+ * cryptographic assets of a 1.x-shaped internal BOM: one per asset with a
76
+ * bom-ref (an asset without one could not be referenced from `affects`), in
77
+ * component order, unique by refId.
78
+ *
79
+ * @param {object} internalBom The internal model
80
+ * @returns {object[]} Risk entries shaped for the draft's
81
+ * #/$defs/cyclonedx-risk-2.0/$defs/risk; empty when nothing is at risk
82
+ */
83
+ export declare function collectPqcRisks(internalBom: object): object[];
84
+ //# sourceMappingURL=pqcMigration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pqcMigration.d.ts","sourceRoot":"","sources":["../../../lib/inventory/pqcMigration.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAQH,sDAAsD;AACtD,eAAO,MAAM,sBAAsB,cAAc,CAAC;AA0ClD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAG8B,GAF5B,MAAM,CAUlB;AAuMD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EANrC,MAMqC,EAAE,eAAe,AAL9D,CAEA,EAFQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAKgD,GAHhE;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAYxG;AAYD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAJhC,MAIgC,GAH9B,MAAM,EAAE,CA0BpB"}
@@ -0,0 +1,271 @@
1
+ /**
2
+ * The most Ruby-named files one scan opens in search of a build version.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export declare const MAX_RUBY_PROBES: number;
7
+ /**
8
+ * Parse an MRI version and normalize a pre-release to the hyphenated form the
9
+ * release tarballs use: `3.4.0preview2` becomes `3.4.0-preview2`.
10
+ *
11
+ * @param {string} text candidate version, without a patchlevel
12
+ * @returns {string|undefined} the version, or undefined
13
+ */
14
+ export declare function parseRubyVersion(text: string): string | undefined;
15
+ /**
16
+ * Read the first line `ruby -v` prints, or the description compiled into
17
+ * libruby, for MRI, JRuby and TruffleRuby:
18
+ * - `ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux]`
19
+ * - `ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux]`
20
+ * - `ruby 3.4.0preview2 (2024-10-07 master 32c733f57b) +PRISM [x86_64-linux]`
21
+ * - `jruby 9.4.8.0 (3.1.4) 2024-07-02 4d41e55a67 OpenJDK 64-Bit ...`
22
+ * - `truffleruby 24.1.0, like ruby 3.2.4, Oracle GraalVM Native [x86_64-linux]`
23
+ *
24
+ * @param {string} text description line
25
+ * @returns {{engine: string, version: string, patchlevel?: string,
26
+ * rubyVersion?: string, platform?: string}|undefined} engine is `ruby`,
27
+ * `jruby` or `truffleruby`; for the last two, rubyVersion is the Ruby
28
+ * language version the engine implements
29
+ */
30
+ export declare function parseRubyDescription(text: string): {
31
+ engine: string;
32
+ version: string;
33
+ patchlevel?: string;
34
+ rubyVersion?: string;
35
+ platform?: string;
36
+ } | undefined;
37
+ /**
38
+ * Read the entries of an rbconfig.rb that identify a build. Only literal
39
+ * `CONFIG["KEY"] = "value"` lines are read; Ruby is never evaluated.
40
+ *
41
+ * @param {string} text rbconfig.rb contents
42
+ * @returns {{version: string, patchlevel?: string, abi?: string,
43
+ * arch?: string, baseName?: string}|undefined}
44
+ */
45
+ export declare function parseRbConfig(text: string): {
46
+ version: string;
47
+ patchlevel?: string;
48
+ abi?: string;
49
+ arch?: string;
50
+ baseName?: string;
51
+ } | undefined;
52
+ /**
53
+ * Whether a file name is one a Ruby interpreter is installed under: `ruby`,
54
+ * a versioned `ruby3.3` as distros and `--program-suffix` builds name it,
55
+ * `ruby.exe` and `rubyw.exe`.
56
+ *
57
+ * @param {string} fileName basename or path of the candidate
58
+ * @returns {boolean}
59
+ */
60
+ export declare function isRubyBinaryName(fileName: string): boolean;
61
+ /**
62
+ * Whether a file name is the shared Ruby library: libruby.so.3.3.6, Debian's
63
+ * libruby-3.1.so.3.1.2,
64
+ * libruby.3.3.dylib, or the RubyInstaller's x64-ucrt-ruby340.dll.
65
+ *
66
+ * @param {string} fileName basename or path of the candidate
67
+ * @returns {boolean}
68
+ */
69
+ export declare function isLibrubyName(fileName: string): boolean;
70
+ /**
71
+ * The version a libruby soname spells, libruby.so.3.3.6 -> 3.3.6.
72
+ *
73
+ * @param {string} fileName basename or path
74
+ * @returns {string|undefined}
75
+ */
76
+ export declare function versionFromLibrubyName(fileName: string): string | undefined;
77
+ /**
78
+ * The install prefix of a file under bin, sbin or lib: /usr/local/bin/ruby ->
79
+ * /usr/local, C:\Ruby34-x64\bin\ruby.exe -> C:\Ruby34-x64.
80
+ *
81
+ * @param {string} absPath absolute path
82
+ * @returns {string|undefined}
83
+ */
84
+ export declare function rubyInstallPrefix(absPath: string): string | undefined;
85
+ /**
86
+ * The rbconfig.rb files an install prefix holds, at most a few levels down:
87
+ * <prefix>/lib/ruby/<abi>/<arch>/rbconfig.rb, and the Debian layout
88
+ * <prefix>/lib/<triplet>/ruby/<abi>/rbconfig.rb.
89
+ *
90
+ * @param {string} prefix install prefix
91
+ * @returns {string[]} absolute paths
92
+ */
93
+ export declare function findRbConfigFiles(prefix: string): string[];
94
+ /**
95
+ * Find the description compiled into a file, `ruby 3.3.6 (2024-11-05 ...`.
96
+ *
97
+ * @param {string} absPath absolute path of a ruby binary or libruby
98
+ * @param {string|undefined} rootDir extracted root
99
+ * @returns {ReturnType<typeof parseRubyDescription>}
100
+ */
101
+ export declare function readRubyDescription(absPath: string, rootDir: string | undefined): ReturnType<typeof parseRubyDescription>;
102
+ /**
103
+ * Read the Ruby build version of a ruby binary or libruby.
104
+ *
105
+ * @param {string} absPath absolute path of the candidate
106
+ * @param {string|undefined} rootDir extracted root, when the file came from one
107
+ * @returns {{version: string, source: string, patchlevel?: string,
108
+ * abi?: string, arch?: string}|undefined} source is `rbconfig`, `binary`
109
+ * or `soname`
110
+ */
111
+ export declare function readRubyBuildVersion(absPath: string, rootDir: string | undefined): {
112
+ version: string;
113
+ source: string;
114
+ patchlevel?: string;
115
+ abi?: string;
116
+ arch?: string;
117
+ } | undefined;
118
+ /**
119
+ * The CPE that lets a downstream scanner match an interpreter version. NVD
120
+ * names MRI ruby-lang:ruby and keeps a pre-release in the update field, as in
121
+ * cpe:2.3:a:ruby-lang:ruby:3.4.0:preview1:*:*:*:*:*:*.
122
+ *
123
+ * @param {string} version interpreter version
124
+ * @param {string} [engine="ruby"] `ruby` or `jruby`
125
+ * @returns {string|undefined} CPE 2.3 string, or undefined for an engine NVD
126
+ * does not name
127
+ */
128
+ export declare function rubyCpe(version: string, engine?: string): string | undefined;
129
+ /**
130
+ * A Ruby runtime is one `platform` component per distinct engine and version,
131
+ * like the PHP and Node.js runtime components. Its identity is
132
+ * `pkg:generic/ruby` (or `jruby`, `truffleruby`).
133
+ *
134
+ * @param {string} version interpreter version
135
+ * @param {Object} [options] options
136
+ * @param {boolean} [options.withCpe=true] false for a Ruby a distro packaged,
137
+ * which backports fixes under its old upstream version
138
+ * @param {string} [options.engine="ruby"] `ruby`, `jruby` or `truffleruby`
139
+ * @returns {Object} component with `purl`, `bom-ref` and, when one applies, `cpe`
140
+ */
141
+ export declare function createRubyRuntimeComponent(version: string, { withCpe, engine }?: {
142
+ withCpe?: boolean;
143
+ engine?: string;
144
+ }): Object;
145
+ /**
146
+ * The bom-ref of the runtime component for a version.
147
+ *
148
+ * @param {string} version interpreter version
149
+ * @param {string} [engine="ruby"] engine
150
+ * @returns {string|undefined} bom-ref, which is the runtime's purl
151
+ */
152
+ export declare function rubyRuntimeRef(version: string, engine?: string): string | undefined;
153
+ /**
154
+ * The properties a Ruby file component carries once its build is known. They
155
+ * belong on unpackaged `file` components only: a package-owned Ruby is
156
+ * identified by its package.
157
+ *
158
+ * @param {{version: string, source: string, patchlevel?: string, abi?: string, arch?: string}} build
159
+ * result of readRubyBuildVersion
160
+ * @returns {{name: string, value: string}[]} properties to append
161
+ */
162
+ export declare function rubyBuildProperties(build: {
163
+ version: string;
164
+ source: string;
165
+ patchlevel?: string;
166
+ abi?: string;
167
+ arch?: string;
168
+ }): {
169
+ name: string;
170
+ value: string;
171
+ }[];
172
+ /**
173
+ * Start collecting the runtime components and edges of one scan.
174
+ *
175
+ * @returns {{runtimeComponents: Object[], dependencies: Object[], runtimeRefs: Set<string>}}
176
+ */
177
+ export declare function createRubyRuntimeInventory(): {
178
+ runtimeComponents: Object[];
179
+ dependencies: Object[];
180
+ runtimeRefs: Set<string>;
181
+ };
182
+ /**
183
+ * Tag a Ruby file component with its build facts and link it to the runtime
184
+ * component of its version, creating that component on first use. Mutates the
185
+ * component in place.
186
+ *
187
+ * @param {{runtimeComponents: Object[], dependencies: Object[], runtimeRefs: Set<string>}} inventory
188
+ * accumulator from createRubyRuntimeInventory
189
+ * @param {Object} component file component, with a `properties` array
190
+ * @param {{version: string, source: string, patchlevel?: string, abi?: string, arch?: string}} build
191
+ * result of readRubyBuildVersion
192
+ */
193
+ export declare function attachRubyBuild(inventory: {
194
+ runtimeComponents: Object[];
195
+ dependencies: Object[];
196
+ runtimeRefs: Set<string>;
197
+ }, component: Object, build: {
198
+ version: string;
199
+ source: string;
200
+ patchlevel?: string;
201
+ abi?: string;
202
+ arch?: string;
203
+ }): void;
204
+ /**
205
+ * The upstream Ruby version an OS package carries: 1:3.1.2-7+deb12u1 -> 3.1.2,
206
+ * 3.3.10-r0 -> 3.3.10, 3.0.7-168.el9_8 -> 3.0.7, 3.4.8_1 -> 3.4.8, and the
207
+ * Chocolatey 3.4.10.1 -> 3.4.10.
208
+ *
209
+ * @param {string} version package version
210
+ * @param {string} [purlType] purl type of the package
211
+ * @returns {string|undefined}
212
+ */
213
+ export declare function upstreamRubyVersion(version: string, purlType?: string): string | undefined;
214
+ /**
215
+ * Describe the Ruby an OS package installed with its upstream identity,
216
+ * `pkg:generic/ruby@<upstream>`, so a BOM names the interpreter both ways. The
217
+ * component of a distro package carries no CPE, since distros backport fixes
218
+ * under their old upstream version; Homebrew and Chocolatey ship the upstream
219
+ * release, so theirs does. `cdx:os:installedBy` names the package to judge it
220
+ * by.
221
+ *
222
+ * @param {Object[]} components BOM components, OS packages among them
223
+ * @returns {Object[]} runtime components to add, one per distinct version
224
+ */
225
+ export declare function deriveOsPackagedRubyRuntimes(components: Object[]): Object[];
226
+ /**
227
+ * Where the default gems of an install live: the gemspec paths
228
+ * <prefix>/lib/ruby/gems/<abi>/specifications/default/*.gemspec.
229
+ *
230
+ * @param {string} gemspecPath path of a gemspec, either separator
231
+ * @returns {{prefix: string, abi: string}|undefined} the install prefix and
232
+ * ABI, when the gemspec is a default gem of a lib/ruby/gems tree
233
+ */
234
+ export declare function defaultGemInstall(gemspecPath: string): {
235
+ prefix: string;
236
+ abi: string;
237
+ } | undefined;
238
+ /**
239
+ * Whether a path lies inside an installed gem's own directory,
240
+ * <gem home>/gems/<name>-<version>/..., beside the specifications directory of
241
+ * that gem home. The lockfiles, manifests and nested gemspecs there belong to
242
+ * the gem's own development, not to anything installed.
243
+ *
244
+ * Only the part of the path from the scanned directory down counts, so a scan
245
+ * of one installed gem (`cdxgen /usr/local/bundle/gems/rails-7.1.0`) still
246
+ * reads that gem's files. The scanned directory may itself be the `gems`
247
+ * directory, as when an image scan reads each gem home on its own.
248
+ *
249
+ * @param {string} filePath absolute path, either separator
250
+ * @param {function(string): boolean} exists existence check
251
+ * @param {string} [scanRoot] the directory the scan started from
252
+ * @returns {boolean}
253
+ */
254
+ export declare function isInsideInstalledGem(filePath: string, exists: Function, scanRoot?: string): boolean;
255
+ /**
256
+ * Link the default gems of an unpackaged Ruby to the runtime they ship with.
257
+ * The runtime is known from its `file` components, which carry the build
258
+ * version and the path they were found at; a default gem belongs to the
259
+ * runtime installed under the same prefix. Gems an OS package installed are
260
+ * left to that package, as is any gem whose install has no unpackaged runtime.
261
+ *
262
+ * @param {Object[]} components BOM components
263
+ * @param {string} [rootDir] extracted root the source paths may start with
264
+ * @returns {{ref: string, dependsOn: string[]}[]} edges from each runtime to
265
+ * its default gems
266
+ */
267
+ export declare function linkDefaultGemsToRuntimes(components: Object[], rootDir?: string): {
268
+ ref: string;
269
+ dependsOn: string[];
270
+ }[];
271
+ //# sourceMappingURL=rubyBuildInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rubyBuildInfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rubyBuildInfo.js"],"names":[],"mappings":"AAkCA;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAFlB,MAEuB,CAAC;AA0BlC;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAH1B,MAG0B,GAFxB,MAAM,GAAC,SAAS,CAc5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAN9B,MAM8B,GAL5B;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CA2DtD;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAIuB,GAHrB;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAwC/C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAH9B,MAG8B,GAF5B,OAAO,CAanB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAH3B,MAG2B,GAFzB,OAAO,CAYnB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAHpC,MAGoC,GAFlC,MAAM,GAAC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AAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAqBnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EALlC,MAKkC,EAAE,MAAM,UAAA,EAAE,QAAQ,AAH5D,CACA,EADQ,MAGoD,GAFlD,OAAO,CA6BnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EALzC,MAAM,EAKmC,EAAE,OAAO,AAJ1D,CACA,EADQ,MAIkD,GAHhD;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAC,EAAE,CAkEhD"}
@@ -0,0 +1,47 @@
1
+ export declare const RUBY_VERSION_MANAGER_DIRECTORIES: string[];
2
+ export declare const HOME_PARENTS: {
3
+ linux: string[];
4
+ darwin: string[];
5
+ };
6
+ /**
7
+ * Expand a relative directory pattern whose `*` segments match one directory
8
+ * name each.
9
+ *
10
+ * @param {string} base absolute directory the pattern hangs off
11
+ * @param {string} pattern `/`-separated relative pattern
12
+ * @returns {string[]} existing directories, at most MAX_EXPANDED_DIRECTORIES
13
+ */
14
+ export declare function expandDirectories(base: string, pattern: string): string[];
15
+ /**
16
+ * The home directories of a host: /root and /home/* on Linux, /Users/* on
17
+ * macOS.
18
+ *
19
+ * @param {{rootPath: string, platform: string}} context probe context
20
+ * @returns {string[]}
21
+ */
22
+ export declare function homeDirectories(context: {
23
+ rootPath: string;
24
+ platform: string;
25
+ }): string[];
26
+ /**
27
+ * The directories a Windows Ruby lives in: the RubyInstaller's C:\Ruby34-x64,
28
+ * Chocolatey's C:\tools\ruby34, and the hosted toolcache.
29
+ *
30
+ * @param {Object} context probe context
31
+ * @returns {string[]} install roots, each with a `bin` directory
32
+ */
33
+ export declare function windowsRubyRoots(context: Object): string[];
34
+ /**
35
+ * Look for Ruby no package manager owns on the host. Components come back
36
+ * only for the files nothing owns: a `file` component for each `ruby` binary
37
+ * with the cdx:ruby properties, and one `platform` component per Ruby version
38
+ * with its CPE.
39
+ *
40
+ * @param {Object} [options] probe options, as probeHostPhp takes them
41
+ * @returns {{components: Object[], dependencies: Object[]}}
42
+ */
43
+ export declare function probeHostRuby(options?: Object): {
44
+ components: Object[];
45
+ dependencies: Object[];
46
+ };
47
+ //# sourceMappingURL=rubyHostProbe.d.ts.map