@cdxgen/cdxgen 13.2.0 → 13.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/README.md +33 -14
  2. package/bin/cdxgen.js +310 -138
  3. package/bin/evinse.js +22 -0
  4. package/bin/repl.js +86 -0
  5. package/bin/sign.js +119 -15
  6. package/bin/tracebom.js +69 -5
  7. package/bin/validate.js +107 -19
  8. package/bin/verify.js +172 -63
  9. package/data/helpers/init.gradle +46 -21
  10. package/data/remediations.json +85 -0
  11. package/data/rules/dependency-sources.yaml +67 -0
  12. package/data/rules/scala-evidence.yaml +115 -0
  13. package/lib/audit/index.js +38 -6
  14. package/lib/cli/bomAssembly.js +105 -15
  15. package/lib/cli/cliOptions.js +93 -1
  16. package/lib/cli/index.js +156 -58
  17. package/lib/cli/jsBom.js +99 -53
  18. package/lib/cli/jvmBom.js +708 -147
  19. package/lib/cli/managedBom.js +415 -224
  20. package/lib/cli/nativeBom.js +264 -44
  21. package/lib/core/activity.js +12 -0
  22. package/lib/core/env.js +22 -15
  23. package/lib/core/fs.js +176 -7
  24. package/lib/core/httpClient.js +159 -24
  25. package/lib/core/metadataProperties.js +97 -0
  26. package/lib/core/pluginRun.js +184 -0
  27. package/lib/core/processTree.js +100 -0
  28. package/lib/core/projectConfig.js +31 -4
  29. package/lib/core/runState.js +39 -0
  30. package/lib/core/toml.js +72 -0
  31. package/lib/ecosystems/asarutils.js +4 -2
  32. package/lib/ecosystems/bunutils.js +274 -108
  33. package/lib/ecosystems/cargoCache.js +231 -8
  34. package/lib/ecosystems/caxa.js +434 -2
  35. package/lib/ecosystems/cmakeResolver.js +76 -21
  36. package/lib/ecosystems/cppBuildContext.js +631 -0
  37. package/lib/ecosystems/cppEvidence.js +399 -51
  38. package/lib/ecosystems/cppIncludeResolver.js +294 -0
  39. package/lib/ecosystems/denoutils.js +93 -66
  40. package/lib/ecosystems/ecosystems.js +1983 -793
  41. package/lib/ecosystems/golem.js +28 -12
  42. package/lib/ecosystems/gradleutils.js +356 -37
  43. package/lib/ecosystems/jsEvidence.js +104 -44
  44. package/lib/ecosystems/kosi.js +31 -7
  45. package/lib/ecosystems/npmutils.js +174 -9
  46. package/lib/ecosystems/parsers-dotnet.js +616 -159
  47. package/lib/ecosystems/parsers-elm.js +46 -28
  48. package/lib/ecosystems/parsers-gleam.js +3 -4
  49. package/lib/ecosystems/parsers-go.js +371 -70
  50. package/lib/ecosystems/parsers-js.js +263 -76
  51. package/lib/ecosystems/parsers-julia.js +2 -3
  52. package/lib/ecosystems/parsers-jvm.js +204 -12
  53. package/lib/ecosystems/parsers-misc.js +929 -216
  54. package/lib/ecosystems/parsers-python.js +167 -24
  55. package/lib/ecosystems/parsers-rust.js +28 -22
  56. package/lib/ecosystems/parsers-terraform.js +1573 -19
  57. package/lib/ecosystems/pythonutils.js +102 -6
  58. package/lib/ecosystems/remote/huggingface.js +3 -0
  59. package/lib/ecosystems/rubyutils.js +1492 -182
  60. package/lib/ecosystems/rusi.js +54 -10
  61. package/lib/ecosystems/sbtutils.js +243 -187
  62. package/lib/ecosystems/scalacliutils.js +342 -0
  63. package/lib/ecosystems/scalasem.js +2618 -0
  64. package/lib/ecosystems/terraformRegistry.js +288 -0
  65. package/lib/ecosystems/utils.js +2 -0
  66. package/lib/ecosystems/vendoredCode.js +156 -0
  67. package/lib/evinser/evinser.js +1008 -191
  68. package/lib/evinser/swiftsem.js +1914 -302
  69. package/lib/helpers/agenticToolutils.js +2 -2
  70. package/lib/helpers/bomSigner.js +1101 -222
  71. package/lib/inventory/aiCollector.js +4 -1
  72. package/lib/inventory/analyzer.js +110 -127
  73. package/lib/inventory/atomUtils.js +703 -43
  74. package/lib/inventory/auditCategories.js +7 -0
  75. package/lib/inventory/buildToolRateLimit.js +144 -0
  76. package/lib/inventory/cacheCommands.js +2 -1
  77. package/lib/inventory/cdxrs.js +103 -12
  78. package/lib/inventory/cmakeBuildDirs.js +254 -0
  79. package/lib/inventory/deps.js +501 -124
  80. package/lib/inventory/depsUtils.js +183 -11
  81. package/lib/inventory/display.js +4 -5
  82. package/lib/inventory/dosai.js +798 -57
  83. package/lib/inventory/dosaiParsers.js +310 -15
  84. package/lib/inventory/dynamic.js +90 -6
  85. package/lib/inventory/evidenceUtils.js +166 -113
  86. package/lib/inventory/fetchBatch.js +690 -55
  87. package/lib/inventory/fetchDiskCache.js +597 -0
  88. package/lib/inventory/forgeEnricher.js +14 -5
  89. package/lib/inventory/jvmLocalRepos.js +917 -0
  90. package/lib/inventory/mcpConfigParser.js +2 -3
  91. package/lib/inventory/parentSelection.js +146 -0
  92. package/lib/inventory/protobom.js +8 -1
  93. package/lib/inventory/purl.js +152 -3
  94. package/lib/inventory/rustFormulationParser.js +3 -4
  95. package/lib/inventory/sbomDocument.js +2 -70
  96. package/lib/inventory/scalaCoords.js +153 -0
  97. package/lib/inventory/source.js +45 -27
  98. package/lib/inventory/spdx.js +101 -0
  99. package/lib/inventory/traceRunner.js +295 -25
  100. package/lib/inventory/tracedCrypto.js +294 -0
  101. package/lib/managers/binary.js +115 -24
  102. package/lib/managers/docker.js +467 -46
  103. package/lib/managers/oci.js +63 -3
  104. package/lib/parsers/cmakeCache.js +69 -0
  105. package/lib/parsers/cmakeLists.js +466 -0
  106. package/lib/parsers/cmakePresets.js +400 -0
  107. package/lib/parsers/compileCommands.js +557 -0
  108. package/lib/parsers/largeJson.js +454 -0
  109. package/lib/parsers/npmrc.js +19 -1
  110. package/lib/parsers/strictJson.js +322 -0
  111. package/lib/parsers/terraformConfig.js +1073 -0
  112. package/lib/parsers/terraformSource.js +652 -0
  113. package/lib/server/server.js +23 -0
  114. package/lib/stages/postgen/introspection/markers.js +1 -1
  115. package/lib/stages/postgen/postgen.js +83 -16
  116. package/lib/stages/postgen/specVersionCompat.js +32 -0
  117. package/lib/validator/bomValidator.js +6 -16
  118. package/lib/validator/index.js +64 -11
  119. package/lib/validator/reporters/console.js +3 -0
  120. package/lib/validator/reporters/json.js +2 -0
  121. package/lib/validator/reporters/sarif.js +7 -0
  122. package/package.json +23 -23
  123. package/types/lib/audit/index.d.ts.map +1 -1
  124. package/types/lib/cli/bomAssembly.d.ts +2 -1
  125. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  126. package/types/lib/cli/cliOptions.d.ts +33 -1
  127. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  128. package/types/lib/cli/index.d.ts.map +1 -1
  129. package/types/lib/cli/jsBom.d.ts.map +1 -1
  130. package/types/lib/cli/jvmBom.d.ts +24 -1
  131. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  132. package/types/lib/cli/managedBom.d.ts +7 -4
  133. package/types/lib/cli/managedBom.d.ts.map +1 -1
  134. package/types/lib/cli/nativeBom.d.ts +3 -1
  135. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  136. package/types/lib/core/activity.d.ts.map +1 -1
  137. package/types/lib/core/env.d.ts +9 -0
  138. package/types/lib/core/env.d.ts.map +1 -1
  139. package/types/lib/core/fs.d.ts +55 -0
  140. package/types/lib/core/fs.d.ts.map +1 -1
  141. package/types/lib/core/httpClient.d.ts +13 -8
  142. package/types/lib/core/httpClient.d.ts.map +1 -1
  143. package/types/lib/core/metadataProperties.d.ts +39 -0
  144. package/types/lib/core/metadataProperties.d.ts.map +1 -0
  145. package/types/lib/core/pluginRun.d.ts +97 -0
  146. package/types/lib/core/pluginRun.d.ts.map +1 -0
  147. package/types/lib/core/processTree.d.ts +36 -0
  148. package/types/lib/core/processTree.d.ts.map +1 -0
  149. package/types/lib/core/projectConfig.d.ts +6 -2
  150. package/types/lib/core/projectConfig.d.ts.map +1 -1
  151. package/types/lib/core/runState.d.ts +29 -0
  152. package/types/lib/core/runState.d.ts.map +1 -0
  153. package/types/lib/core/toml.d.ts +20 -0
  154. package/types/lib/core/toml.d.ts.map +1 -0
  155. package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
  156. package/types/lib/ecosystems/bunutils.d.ts +12 -5
  157. package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
  158. package/types/lib/ecosystems/cargoCache.d.ts +12 -0
  159. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
  160. package/types/lib/ecosystems/caxa.d.ts +14 -0
  161. package/types/lib/ecosystems/caxa.d.ts.map +1 -1
  162. package/types/lib/ecosystems/cmakeResolver.d.ts +28 -3
  163. package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
  164. package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
  165. package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
  166. package/types/lib/ecosystems/cppEvidence.d.ts +17 -1
  167. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  168. package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
  169. package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
  170. package/types/lib/ecosystems/denoutils.d.ts +9 -3
  171. package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
  172. package/types/lib/ecosystems/ecosystems.d.ts +62 -13
  173. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  174. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  175. package/types/lib/ecosystems/gradleutils.d.ts +70 -4
  176. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  177. package/types/lib/ecosystems/jsEvidence.d.ts +5 -2
  178. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  179. package/types/lib/ecosystems/kosi.d.ts +13 -0
  180. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  181. package/types/lib/ecosystems/npmutils.d.ts +57 -0
  182. package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
  183. package/types/lib/ecosystems/parsers-dotnet.d.ts +118 -4
  184. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  185. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
  186. package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
  187. package/types/lib/ecosystems/parsers-go.d.ts +54 -2
  188. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  189. package/types/lib/ecosystems/parsers-js.d.ts +16 -5
  190. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  191. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
  192. package/types/lib/ecosystems/parsers-jvm.d.ts +46 -1
  193. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  194. package/types/lib/ecosystems/parsers-misc.d.ts +70 -4
  195. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  196. package/types/lib/ecosystems/parsers-python.d.ts +53 -3
  197. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  198. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  199. package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
  200. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
  201. package/types/lib/ecosystems/pythonutils.d.ts +27 -2
  202. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  203. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  204. package/types/lib/ecosystems/rubyutils.d.ts +164 -3
  205. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  206. package/types/lib/ecosystems/rusi.d.ts +13 -0
  207. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  208. package/types/lib/ecosystems/sbtutils.d.ts +88 -2
  209. package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
  210. package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
  211. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
  212. package/types/lib/ecosystems/scalasem.d.ts +311 -0
  213. package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
  214. package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
  215. package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
  216. package/types/lib/ecosystems/utils.d.ts +2 -2
  217. package/types/lib/ecosystems/utils.d.ts.map +1 -1
  218. package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
  219. package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
  220. package/types/lib/evinser/evinser.d.ts +132 -15
  221. package/types/lib/evinser/evinser.d.ts.map +1 -1
  222. package/types/lib/evinser/swiftsem.d.ts +280 -15
  223. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  224. package/types/lib/helpers/bomSigner.d.ts +182 -13
  225. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  226. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  227. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  228. package/types/lib/inventory/atomUtils.d.ts +219 -5
  229. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  230. package/types/lib/inventory/auditCategories.d.ts +3 -0
  231. package/types/lib/inventory/auditCategories.d.ts.map +1 -1
  232. package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
  233. package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
  234. package/types/lib/inventory/cacheCommands.d.ts +2 -1
  235. package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
  236. package/types/lib/inventory/cdxrs.d.ts +8 -3
  237. package/types/lib/inventory/cdxrs.d.ts.map +1 -1
  238. package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
  239. package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
  240. package/types/lib/inventory/deps.d.ts +59 -1
  241. package/types/lib/inventory/deps.d.ts.map +1 -1
  242. package/types/lib/inventory/depsUtils.d.ts +15 -0
  243. package/types/lib/inventory/depsUtils.d.ts.map +1 -1
  244. package/types/lib/inventory/display.d.ts.map +1 -1
  245. package/types/lib/inventory/dosai.d.ts +121 -9
  246. package/types/lib/inventory/dosai.d.ts.map +1 -1
  247. package/types/lib/inventory/dosaiParsers.d.ts +53 -7
  248. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  249. package/types/lib/inventory/dynamic.d.ts +10 -0
  250. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  251. package/types/lib/inventory/evidenceUtils.d.ts +19 -4
  252. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  253. package/types/lib/inventory/fetchBatch.d.ts +83 -14
  254. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  255. package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
  256. package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
  257. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  258. package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
  259. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
  260. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  261. package/types/lib/inventory/parentSelection.d.ts +34 -0
  262. package/types/lib/inventory/parentSelection.d.ts.map +1 -0
  263. package/types/lib/inventory/plugins.d.ts.map +1 -1
  264. package/types/lib/inventory/protobom.d.ts.map +1 -1
  265. package/types/lib/inventory/purl.d.ts +71 -2
  266. package/types/lib/inventory/purl.d.ts.map +1 -1
  267. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  268. package/types/lib/inventory/sbomDocument.d.ts.map +1 -1
  269. package/types/lib/inventory/scalaCoords.d.ts +80 -0
  270. package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
  271. package/types/lib/inventory/source.d.ts.map +1 -1
  272. package/types/lib/inventory/spdx.d.ts +9 -0
  273. package/types/lib/inventory/spdx.d.ts.map +1 -1
  274. package/types/lib/inventory/traceRunner.d.ts +59 -1
  275. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  276. package/types/lib/inventory/tracedCrypto.d.ts +42 -0
  277. package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
  278. package/types/lib/managers/binary.d.ts +30 -1
  279. package/types/lib/managers/binary.d.ts.map +1 -1
  280. package/types/lib/managers/docker.d.ts +29 -0
  281. package/types/lib/managers/docker.d.ts.map +1 -1
  282. package/types/lib/managers/oci.d.ts +17 -1
  283. package/types/lib/managers/oci.d.ts.map +1 -1
  284. package/types/lib/parsers/cmakeCache.d.ts +16 -0
  285. package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
  286. package/types/lib/parsers/cmakeLists.d.ts +77 -0
  287. package/types/lib/parsers/cmakeLists.d.ts.map +1 -0
  288. package/types/lib/parsers/cmakePresets.d.ts +78 -0
  289. package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
  290. package/types/lib/parsers/compileCommands.d.ts +115 -0
  291. package/types/lib/parsers/compileCommands.d.ts.map +1 -0
  292. package/types/lib/parsers/largeJson.d.ts +52 -0
  293. package/types/lib/parsers/largeJson.d.ts.map +1 -0
  294. package/types/lib/parsers/npmrc.d.ts +5 -0
  295. package/types/lib/parsers/npmrc.d.ts.map +1 -1
  296. package/types/lib/parsers/strictJson.d.ts +46 -0
  297. package/types/lib/parsers/strictJson.d.ts.map +1 -0
  298. package/types/lib/parsers/terraformConfig.d.ts +70 -0
  299. package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
  300. package/types/lib/parsers/terraformSource.d.ts +66 -0
  301. package/types/lib/parsers/terraformSource.d.ts.map +1 -0
  302. package/types/lib/server/server.d.ts.map +1 -1
  303. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  304. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  305. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  306. package/types/lib/validator/index.d.ts +18 -1
  307. package/types/lib/validator/index.d.ts.map +1 -1
  308. package/types/lib/validator/reporters/console.d.ts.map +1 -1
  309. package/types/lib/validator/reporters/json.d.ts.map +1 -1
  310. package/types/lib/validator/reporters/sarif.d.ts.map +1 -1
  311. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
@@ -1 +1 @@
1
- {"version":3,"file":"purl.d.ts","sourceRoot":"","sources":["../../../lib/inventory/purl.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,aAAmC,CAAC;AAEtE;;;;;GAKG;AACH,wBAA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,IAAI,EAH9B,MAG8B,UAExC;AAwCD;;;;;;;;;GASG;AACH,wBAAgB,2CAA2C,CAAC,WAAW,EAH5D,MAG4D,GAF1D,CAAC,MAAM,GAAC,IAAI,CAAC,EAAE,CA6H3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"rustFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rustFormulationParser.js"],"names":[],"mappings":"AAmTA;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAFxB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAwBxF,CAAC"}
1
+ {"version":3,"file":"rustFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rustFormulationParser.js"],"names":[],"mappings":"AAkTA;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAFxB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAwBxF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sbomDocument.d.ts","sourceRoot":"","sources":["../../../lib/inventory/sbomDocument.js"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,EAF1B,MAE4C,CAAC;AAsBvD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAPK,MAOL,EACJ,EAAE,MAAkB,EAAE,QAAkC,EAAE,AAPzD,CAGA,EAFA;IAAuB,MAAM,AAA7B,CACA,EADQ,MAAM,CACd;IAAuB,QAAQ,AAA/B,CACA,EADQ,MAAM,CACd;CAI8D,GAJpD;IAAC,UAAU,EAAE,MAAM,EA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IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAGU,GAF3C,MAAM,EAAE,CAoBpB"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Parse a Scala-published Maven artifact name into its coordinate parts.
3
+ *
4
+ * @param {string} name Maven artifactId, for example `upickle_sjs1_3`
5
+ * @returns {{ originalName: string, artifactBase: string, binaryVersion: string|null,
6
+ * platformSuffix: string, purlName: string }} The artifact name without any
7
+ * Scala suffix (`upickle`), the Scala binary version from the suffix (`3`),
8
+ * the platform suffix including the underscore (`_sjs1`) or an empty string,
9
+ * and the artifact name sbt-style purls emit (binary suffix dropped, platform
10
+ * suffix kept).
11
+ */
12
+ export declare function parseScalaArtifact(name: string): {
13
+ originalName: string;
14
+ artifactBase: string;
15
+ binaryVersion: string | null;
16
+ platformSuffix: string;
17
+ purlName: string;
18
+ };
19
+ /**
20
+ * Build a qualifier-free coordinate key for a Scala-published artifact.
21
+ *
22
+ * The key ignores purl qualifiers such as `repository_url` and `type`, so the
23
+ * POM-coordinate keys of the jar namespace mapping and the sbt-style purls of
24
+ * the components resolve to the same entry.
25
+ *
26
+ * @param {Object} parts Coordinate parts
27
+ * @param {string} [parts.type] Purl type, defaults to `maven`
28
+ * @param {string} [parts.group] Maven groupId
29
+ * @param {string} parts.artifactBase Artifact name without any Scala suffix
30
+ * @param {string} [parts.platformSuffix] `_sjs1`, `_native0.5` or empty
31
+ * @param {string} [parts.version] Package version
32
+ * @returns {string} The coordinate key
33
+ */
34
+ export declare function scalaCoordinateKey({ type, group, artifactBase, platformSuffix, version, }?: {
35
+ type?: string;
36
+ group?: string;
37
+ artifactBase: string;
38
+ platformSuffix?: string;
39
+ version?: string;
40
+ }): string;
41
+ /**
42
+ * Build the qualifier-free coordinate key of a purl string.
43
+ *
44
+ * The artifact name is normalized with {@link parseScalaArtifact}, so
45
+ * `pkg:maven/g/foo_3@1.0` and the sbt-style `pkg:maven/g/foo@1.0` share a key,
46
+ * while the Scala.js build `foo_sjs1_3` keeps its own key (`foo` plus the
47
+ * `_sjs1` platform suffix) and never joins the plain `foo` component.
48
+ *
49
+ * @param {string} purlString Package URL to normalize
50
+ * @returns {string|undefined} The coordinate key, or undefined when the string
51
+ * is not a parseable purl
52
+ */
53
+ export declare function coordinateKeyFromPurl(purlString: string): string | undefined;
54
+ /**
55
+ * The coordinate key of a purl together with the Scala binary version its
56
+ * artifact name carries, if any.
57
+ *
58
+ * @param {string} purlString Package URL to normalize
59
+ * @returns {{ key: string, binaryVersion: string|null }|undefined} The key
60
+ * and binary version, or undefined when the string is not a parseable purl
61
+ */
62
+ export declare function scalaCoordinateOfPurl(purlString: string): {
63
+ key: string;
64
+ binaryVersion: string | null;
65
+ } | undefined;
66
+ /**
67
+ * The artifactId the library is published under, for cache and repository
68
+ * lookups only. Components a Scala build tool reports carry the name with the
69
+ * Scala binary suffix stripped (the platform suffix kept) together with
70
+ * `cdx:scala:compilerVersion`; on disk and in the repository the artifact is
71
+ * `cats-core_2.13` or `upickle_sjs1_3`. Names that end in a full Scala version
72
+ * are used as they are.
73
+ *
74
+ * The component's own `name`, `purl` and `bom-ref` never change.
75
+ *
76
+ * @param {Object} pkg Package with `name` and `properties`.
77
+ * @returns {string} The artifactId to look up.
78
+ */
79
+ export declare function publishedArtifactId(pkg: Object): string;
80
+ //# sourceMappingURL=scalaCoords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalaCoords.d.ts","sourceRoot":"","sources":["../../../lib/inventory/scalaCoords.js"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAR5B,MAQ4B,GAP1B;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,GAAC,IAAI,CAAC;IACjF,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CA+B9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB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AM,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAA;CAAC,GAAC,IAAI,CA4D5D;AA6GD;;GAEG;AACH,wBAAgB,yBAAyB,SAExC;AAID;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAJ5C,KAAK,CAAC,MAAM,CAIgC,GAF1C,OAAO,CAAC,IAAI,CAAC,CA6BzB;AAiDD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAAC,CA4MlI;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAF5B,MAE4B,QAkCtC"}
@@ -57,6 +57,15 @@ export declare function readLicenseText(licenseFilepath: any, licenseContentType
57
57
  * @param {string} name License full name
58
58
  */
59
59
  export declare function findLicenseId(name: string): any;
60
+ /**
61
+ * Identify a license from the title and opening of its full text. A license
62
+ * text quotes other licenses (the GNU GPL's text names the GNU Lesser GPL),
63
+ * so the substring scan of `guessLicenseId` alone can name the wrong one.
64
+ *
65
+ * @param {string} content License file contents
66
+ * @returns {string|undefined} SPDX license id or expression
67
+ */
68
+ export declare function licenseIdFromText(content: string): string | undefined;
60
69
  /**
61
70
  * Method to guess the spdx license id from license contents
62
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"spdx.d.ts","sourceRoot":"","sources":["../../../lib/inventory/spdx.js"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAFf,MAAM,EAIf,CAAC;AAMF;;;;;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AAA;;SAUlE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAFvB,MAEuB,OAYjC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,GAAC,SAAS,CAyF5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAF3B,MAE2B,OAcrC"}
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Whether the @cdxgen/safer-exec tracing runtime could be loaded. When false,
3
+ * dynamic tracing cannot run at all, and every trace would otherwise exit 0
4
+ * with a valid but empty BOM, hiding the broken installation (#4378).
5
+ *
6
+ * @returns {boolean} True when the tracing runtime is available
7
+ */
8
+ export declare function isSaferExecAvailable(): boolean;
1
9
  /**
2
10
  * Parses a command string into command and arguments array.
3
11
  * @param {string} cmdStr - Command string to parse
@@ -40,7 +48,19 @@ export declare function resolveSaferExecBinary(): string | undefined;
40
48
  * @param {boolean} [options.traceExec] - Log every child process spawned
41
49
  * @param {string[]} [options.allowExec] - Executables the command is allowed to run
42
50
  * @param {string[]} [options.blockExec] - Executables to block from running
43
- * @returns {Promise<{libPaths: string[], httpAccessEntries: Object[]}>} Collected libraries and HTTP URLs
51
+ * @param {boolean} [options.proxyEgress] - Route egress through safer-exec's hostname-pinning proxy (network stays enabled; only allowHosts are reachable)
52
+ * @param {boolean} [options.allowLoopback] - Allow loopback connections
53
+ * @param {boolean} [options.dryRun] - Deny every filesystem and network side effect and collect a dry-run report
54
+ * @param {string} [options.policy] - Named safer-exec ecosystem policy (npm, pypi, maven, ...)
55
+ * @param {string} [options.policyFile] - Path to a safer-exec JSON policy file
56
+ * @param {boolean} [options.blockInterpreters] - Block interpreters with sandbox or task-port exemptions (macOS)
57
+ * @param {boolean} [options.denyPersistenceWrites] - Deny writes to auto-execution and persistence locations
58
+ * @param {boolean} [options.privateTmp] - Private tmpfs /tmp and /var/tmp (Linux)
59
+ * @param {string} [options.protectHome] - Home isolation: read-only, tmpfs, or off (Linux)
60
+ * @returns {Promise<{libPaths: string[], httpAccessEntries: Object[], egressEntries?: Object[], dryRunSummary?: Object}>} Collected libraries, HTTP URLs, proxy egress decisions, and the dry-run summary
61
+ * @throws {Error} When the @cdxgen/safer-exec tracing runtime is not installed
62
+ * (for example after pruning it from a standalone payload), since the traced
63
+ * command could never run and the BOM would silently be empty
44
64
  */
45
65
  export declare function executeAndTrace(commandStr: string, workingDir?: string, options?: {
46
66
  readPaths?: string[];
@@ -62,10 +82,48 @@ export declare function executeAndTrace(commandStr: string, workingDir?: string,
62
82
  traceExec?: boolean;
63
83
  allowExec?: string[];
64
84
  blockExec?: string[];
85
+ proxyEgress?: boolean;
86
+ allowLoopback?: boolean;
87
+ dryRun?: boolean;
88
+ policy?: string;
89
+ policyFile?: string;
90
+ blockInterpreters?: boolean;
91
+ denyPersistenceWrites?: boolean;
92
+ privateTmp?: boolean;
93
+ protectHome?: string;
65
94
  }): Promise<{
66
95
  libPaths: string[];
67
96
  httpAccessEntries: Object[];
97
+ egressEntries?: Object[];
98
+ dryRunSummary?: Object;
68
99
  }>;
100
+ /**
101
+ * Picks the safer-exec engine's own lines out of the stderr it shares with the
102
+ * traced command. Warnings start with "safer-exec: warning:"; when the engine
103
+ * stops a run, its error is the last other "safer-exec: " line it prints.
104
+ *
105
+ * @param {string} stderr Captured stderr of a safer-exec run
106
+ * @returns {{warnings: string[], error: string|undefined}} Unique engine warnings, and the engine's error if any
107
+ */
108
+ export declare function engineMessages(stderr: string): {
109
+ warnings: string[];
110
+ error: string | undefined;
111
+ };
112
+ /**
113
+ * Extracts the egress proxy's decisions from a safer-exec audit log.
114
+ * "proxy-connect" targets are "host:port"; "proxy-violation" targets are
115
+ * "CONNECT host:port" or "METHOD http://host[:port]/path". Only the authority
116
+ * is kept, never a path or query.
117
+ *
118
+ * @param {Object[]} auditLog - safer-exec audit entries
119
+ * @returns {{host: string, port: number, protocol: string, decision: string}[]} Unique egress decisions
120
+ */
121
+ export declare function parseEgressEntries(auditLog: Object[]): {
122
+ host: string;
123
+ port: number;
124
+ protocol: string;
125
+ decision: string;
126
+ }[];
69
127
  /**
70
128
  * Groups HTTP access entries into a CycloneDX services-ready map.
71
129
  * Each unique (host, port, protocol) combination becomes a service.
@@ -1 +1 @@
1
- {"version":3,"file":"traceRunner.d.ts","sourceRoot":"","sources":["../../../lib/inventory/traceRunner.js"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,CA6BzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAFzB,MAAM,GAAC,SAAS,CAoE5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAxBrC,MAwBqC,EAAE,UAAU,AAvBzD,CACA,EADQ,MAuBiD,EAAE,OAAO,AAtBlE,CAoBA,EAnBA;IAA2B,SAAS,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;IAA2B,UAAU,AAArC,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAAyB,YAAY,AAArC,CACA,EADQ,MAAM,CACd;IAAyB,SAAS,AAAlC,CACA,EADQ,MAAM,CACd;IAA0B,cAAc,AAAxC,CACA,EADQ,OAAO,CACf;IAA0B,aAAa,AAAvC,CACA,EADQ,OAAO,CACf;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAA0B,WAAW,AAArC,CACA,EADQ,OAAO,CACf;IAA0B,UAAU,AAApC,CACA,EADQ,OAAO,CACf;IAA0B,MAAM,AAAhC,CACA,EADQ,OAAO,CACf;IAA2B,UAAU,AAArC,CACA,EADQ,MAAM,EAAE,CAChB;IAA2B,UAAU,AAArC,CACA,EADQ,MAAM,EAAE,CAChB;IAA2B,SAAS,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;IAA0B,SAAS,AAAnC,CACA,EADQ,OAAO,CACf;IAA0B,SAAS,AAAnC,CACA,EADQ,OAAO,CACf;IAA2B,SAAS,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;IAA2B,SAAS,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;CAEuE,GAF7D,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAA;CAAC,CAAC,CAyOtE;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,iBAAiB,EAHjD,MAAM,EAG2C;eAFlB,GAAG,CAAC,MAAM,CAAC;gBAAc,MAAM,EAAE;GAuC1E"}
1
+ {"version":3,"file":"traceRunner.d.ts","sourceRoot":"","sources":["../../../lib/inventory/traceRunner.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAFvB,OAAO,CAInB;AAKD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,CA6BzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAFzB,MAAM,GAAC,SAAS,CAsF5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,eAAe,CAAC,UAAU,EApCrC,MAoCqC,EAAE,UAAU,AAnCzD,CACA,EADQ,MAmCiD,EAAE,OAAO,AAlClE,CA6BA,EA5BA;IAA2B,SAAS,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;IAA2B,UAAU,AAArC,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,CACd;IAAyB,YAAY,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;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAH1B,MAG0B,GAFxB;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,CAazD;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAAM,EAG0B,GAF9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,EAAE,CAkD9E;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,iBAAiB,EAHjD,MAAM,EAG2C;eAFlB,GAAG,CAAC,MAAM,CAAC;gBAAc,MAAM,EAAE;GA+C1E"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Names the bulk cipher of a TLS cipher suite as a crypto-oid.json key, from
3
+ * either its IANA name (TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) or its OpenSSL
4
+ * name (ECDHE-RSA-AES128-GCM-SHA256).
5
+ *
6
+ * @param {string} suiteName Cipher suite name
7
+ * @returns {{name: string, bits: number, mode: string|undefined}|undefined} The cipher, when it has an OID
8
+ */
9
+ export declare function suiteCipher(suiteName: string): {
10
+ name: string;
11
+ bits: number;
12
+ mode: string | undefined;
13
+ } | undefined;
14
+ /**
15
+ * Turns the CBOM safer-exec writes for a traced command into components that
16
+ * cdxgen can merge and validate:
17
+ *
18
+ * - every asset gets a bom-ref, without which the assets merge into one
19
+ * - algorithms carry their OID, and those without one are left out
20
+ * - hybrid key-exchange groups become their classical and ML-KEM halves
21
+ * - cipher suites become their bulk cipher, which the protocol's suites refer
22
+ * to by bom-ref
23
+ * - algorithm properties keep only values the schema allows
24
+ * - crypto libraries are left out: they are the traced library components,
25
+ * marked with cdx:dynamic:cryptoLibrary
26
+ *
27
+ * @param {Object[]} cbomComponents Components of the safer-exec CBOM
28
+ * @returns {Object[]} Normalized cryptographic-asset components
29
+ */
30
+ export declare function normalizeTracedCryptoComponents(cbomComponents: Object[]): Object[];
31
+ /**
32
+ * Maps the crypto libraries safer-exec reported to the paths they were loaded
33
+ * from.
34
+ *
35
+ * @param {Object[]} cryptoEntries safer-exec crypto-library and crypto-cipher audit entries
36
+ * @returns {Map<string, {name: string, version: string}>} Crypto libraries by path
37
+ */
38
+ export declare function cryptoLibrariesByPath(cryptoEntries: Object[]): Map<string, {
39
+ name: string;
40
+ version: string;
41
+ }>;
42
+ //# sourceMappingURL=tracedCrypto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracedCrypto.d.ts","sourceRoot":"","sources":["../../../lib/inventory/tracedCrypto.js"],"names":[],"mappings":"AAqDA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAH1B,MAG0B,GAFxB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,GAAC,SAAS,CAuB1E;AA+DD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,+BAA+B,CAAC,cAAc,EAHnD,MAAM,EAG6C,GAFjD,MAAM,EAAE,CA+GpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAHxC,MAAM,EAGkC,GAFtC,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAgBxD"}
@@ -15,13 +15,25 @@ export declare function getPluginToolComponents(toolNames?: string[]): Object[];
15
15
  * is unavailable or produced no output.
16
16
  */
17
17
  export declare function getCargoAuditableInfo(src: string): string | undefined;
18
+ /**
19
+ * Check that sourcekitten (bundled plugin or SOURCEKITTEN_CMD) answers a
20
+ * trivial syntax request.
21
+ *
22
+ * @param env {Object} Optional environment overrides merged over process.env
23
+ * @returns {String} `ok`; `unavailable` when there is no bundled plugin and
24
+ * SOURCEKITTEN_CMD is unset; `not-found` when the configured executable does
25
+ * not exist; `failed` when it ran but could not answer
26
+ */
27
+ export declare function probeSourcekitten(env: Object): string;
18
28
  /**
19
29
  * Execute sourcekitten plugin with the given arguments
20
30
  *
21
31
  * @param args {Array} Arguments
32
+ * @param env {Object} Optional environment overrides merged over process.env,
33
+ * used to align sourcekitten with a specific Swift toolchain
22
34
  * @returns {undefined|Object} Command output
23
35
  */
24
- export declare function executeSourcekitten(args: any[]): undefined | Object;
36
+ export declare function executeSourcekitten(args: any[], env: Object): undefined | Object;
25
37
  /**
26
38
  * Canonicalise the distro vendor namespace of an OS package component
27
39
  * produced by trivy, regardless of whether trivy expressed the vendor via the
@@ -103,6 +115,23 @@ export declare function dropRedundantSourceComponents(pkgList: any[]): any[];
103
115
  * @returns {Object} Metadata containing packages, dependencies, etc
104
116
  */
105
117
  export declare function getOSPackages(src: string, imageConfig: Object, options?: {}): Object;
118
+ /**
119
+ * Collect the dependency edges trivy recorded for one OS package component.
120
+ *
121
+ * Trivy keys its `dependencies` by its own bom-refs, which may leave the `+` of
122
+ * an rpm or deb version unescaped (`...libstdc%2B%2B6@14.2.0+git10526-...`), so
123
+ * each ref is read structurally and re-rendered in cdxgen's decoded bom-ref
124
+ * form with the component's type, namespace and distro qualifiers.
125
+ *
126
+ * @param {Object<string, string[]>} tmpDependencies Trivy's refs mapped to the refs they depend on
127
+ * @param {string} origBomRef The component's bom-ref as trivy wrote it
128
+ * @param {object} comp The component after cdxgen rewrote its purl and bom-ref
129
+ * @returns {{ref: string, dependsOn: string[]}|undefined} Dependency entry for the component
130
+ */
131
+ export declare const retrieveDependencies: (tmpDependencies: Record<string, string[]>, origBomRef: string, comp: object) => {
132
+ ref: string;
133
+ dependsOn: string[];
134
+ } | undefined;
106
135
  /**
107
136
  * Batch-enrich operating-system components with host-path trust data using the
108
137
  * `trustinspector` helper on darwin and Windows.
@@ -1 +1 @@
1
- {"version":3,"file":"binary.d.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CAinBlB;AA4lDD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,0DAJtB,MAAM,QACN,MAAM,KACJ;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,SAsD/C,CAAC;AAyHF;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,AALvD,CACA,EADQ,MAAM,EAK8C,GAJlD;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAC,CAmEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EALzB,MAKyB,GAJvB,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAJxB,MAIwB,EAAE,UAAU,EAHpC,MAGoC,WA6C9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EANrB,MAMqB,EAAE,aAAa,EALpC,MAKoC,EAAE,QAAQ,EAJ9C,OAI8C,GAF7C,OAAO,CAiClB"}
@@ -53,6 +53,27 @@ export declare const getConnection: (_options: Object, forRegistry?: string) =>
53
53
  * requests, raw Buffer for other methods, or `undefined` if no client is available
54
54
  */
55
55
  export declare const makeRequest: (path: string, method: string, forRegistry?: string) => Promise<Object | Buffer | undefined>;
56
+ /**
57
+ * Decide whether a CLI path argument is a container image reference in the
58
+ * styles the container pipeline documents: name, name:tag, namespace/name,
59
+ * registry/namespace/name:tag, registry:port/..., and any of those with a
60
+ * @digest. Everything that smells like a filesystem path, a URL or a CLI
61
+ * option never matches, so strings such as "c:\Users", "c:/tmp" or
62
+ * "file:///etc" can never reach the container clients: backslashes and
63
+ * schemes are rejected outright, and a drive-letter prefix fails because a
64
+ * lone letter is neither a dotted host nor a host:port, and a tag may not
65
+ * begin with the "/" that follows the colon in "c:/tmp".
66
+ *
67
+ * The check mirrors how the distribution reference grammar detects a registry
68
+ * host: the first component counts as a host only when it carries a dot, a
69
+ * numeric port, or is exactly localhost. Each piece is validated by a linear
70
+ * regex or plain string splitting, and the input is length-capped, so hostile
71
+ * inputs cannot backtrack expensively.
72
+ *
73
+ * @param {string} fullImageName Candidate image reference
74
+ * @returns {boolean} true when the string is a plausible image reference
75
+ */
76
+ export declare const isImageReference: (fullImageName: string) => boolean;
56
77
  /**
57
78
  * Parse image name
58
79
  *
@@ -70,6 +91,14 @@ export declare const parseImageName: (fullImageName: any) => {
70
91
  group: string;
71
92
  name: string;
72
93
  };
94
+ /**
95
+ * Prefer cli on windows, nerdctl on mac, or when using tcp/ssh based host.
96
+ * On Windows, fall back to wslc (WSL Containers) when the docker CLI is not
97
+ * installed, so OCI image scans work on hosts that only have WSL.
98
+ *
99
+ * @returns {string} Container CLI command to invoke
100
+ */
101
+ export declare const getContainerCliCmd: () => string;
73
102
  /**
74
103
  * Method to get image to the local registry by pulling from the remote if required
75
104
  */
@@ -1 +1 @@
1
- {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAwCrC,yDAAyD;AACzD,eAAO,MAAM,KAAK,SAA0B,CAAC;AAC7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAFtB,MAEoC,CAAC;AAsQ/C;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,SAHnB,MAAM,KACJ,MAiBZ,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,QAoB3B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,QA2CnC;AAyTD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,aANf,MAAM,gBAEN,MAAM,KACJ,OAAO,CAAC,MAAM,GAAC,SAAS,CA6HpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,SANb,MAAM,UACN,MAAM,gBACN,MAAM,KACJ,OAAO,C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AW,oDAyJvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,iDAkJ1B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,kBALb,MAAM,UACN,OAAO,KACL,OAAO,CAAC,MAAM,GAAC,SAAS,CAKpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,cALpB,MAAM,iBACN,MAAM,KACJ,MAAM,GAAC,SA2CnB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,qBAHpB,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC,cACnC,KAAK,CAAC,MAAM,CAAC,SA4BvB,CAAC"}
@@ -1,12 +1,28 @@
1
+ /**
2
+ * Check whether a token realm URL belongs to the registry itself.
3
+ *
4
+ * A registry's 401 response names the realm, so a hostile registry picks the
5
+ * URL cdxgen will call. Credentials picked up for the registry must therefore
6
+ * only be attached when the realm resolves to the same host and port; public
7
+ * delegating realms (docker.io to auth.docker.io) are still usable, just
8
+ * anonymously.
9
+ *
10
+ * @param {string} registry Registry host, optionally with a port
11
+ * @param {URL} realmUrl Parsed realm URL from the WWW-Authenticate header
12
+ * @returns {boolean} true when host and port match the registry
13
+ */
14
+ export declare function isSameRegistryHost(registry: string, realmUrl: URL): boolean;
1
15
  /**
2
16
  * Retrieves a CycloneDX BOM attached to an OCI image purely in JavaScript
3
17
  * without relying on the `oras` CLI tool.
4
18
  *
5
19
  * @param {string} image OCI image reference (e.g. `"registry.example.com/org/app:tag"`)
6
20
  * @param {string} [platform] OCI platform string (e.g. `"linux/amd64"`); no-op for JS implementation
21
+ * @param {Object} [options]
22
+ * @param {function(Buffer): void} [options.checkBytes] Called with the raw bytes of the BOM layer that is about to be returned. An error it throws is rethrown, and no other referrer is tried.
7
23
  * @returns {Promise<Object|undefined>} Parsed CycloneDX BOM JSON object, or `undefined` if not found
8
24
  */
9
- export declare function getBomWithOras(image: string, _platform?: undefined): Promise<Object | undefined>;
25
+ export declare function getBomWithOras(image: string, _platform?: undefined, options?: Object): Promise<Object | undefined>;
10
26
  /**
11
27
  * Attach a CycloneDX BOM to an OCI image using the OCI 1.1 artifact manifest
12
28
  * API, pushing the BOM as a blob and linking it via the referrers API (with a
@@ -1 +1 @@
1
- {"version":3,"file":"oci.d.ts","sourceRoot":"","sources":["../../../lib/managers/oci.js"],"names":[],"mappings":"AAgXA;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAJ/B,MAI+B,EAAE,SAAS,YAAY,GAFpD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA4GrC;AAmFD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,KAAK,EALhC,MAKgC,EAAE,OAAO,EAJzC,MAIyC,GAHvC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAmIrC"}
1
+ {"version":3,"file":"oci.d.ts","sourceRoot":"","sources":["../../../lib/managers/oci.js"],"names":[],"mappings":"AAuOA;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAJhC,MAIgC,EAAE,QAAQ,EAH1C,GAG0C,GAFxC,OAAO,CAgBnB;AAuJD;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAPI,MAOJ,EACL,SAAS,YAAY,EACrB,OAAO,AAPN,CACA,EADQ,MAOG,GALD,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA6HrC;AAmFD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,KAAK,EALhC,MAKgC,EAAE,OAAO,EAJzC,MAIyC,GAHvC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAmIrC"}
@@ -67,4 +67,20 @@ export declare function resolveCmakeCacheFacts(map: Map<string, {
67
67
  findPackages: Map<string, string>;
68
68
  fetchContentBase?: string;
69
69
  };
70
+ /**
71
+ * Parse a compiler description CMake writes when it configures a build
72
+ * (`CMakeFiles/<cmake version>/CMake<LANG>Compiler.cmake`): the compiler's
73
+ * path, CMake's id for it and its version, all identified by CMake itself.
74
+ *
75
+ * @param {string} text File contents
76
+ * @returns {{language: string, compiler: string, family: string, id: string, version: string}|null}
77
+ * `null` when the text names no compiler
78
+ */
79
+ export declare function parseCmakeCompilerFile(text: string): {
80
+ language: string;
81
+ compiler: string;
82
+ family: string;
83
+ id: string;
84
+ version: string;
85
+ } | null;
70
86
  //# sourceMappingURL=cmakeCache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmakeCache.d.ts","sourceRoot":"","sources":["../../../lib/parsers/cmakeCache.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAHzB,MAGyB,GAFvB,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CA0BtD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAJlC,MAIkC,GAHhC,MAAM,GAAC,IAAI,CA0BvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAGV,GAF7B;IAAE,WAAW,EAAE;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,C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AAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GAAC,IAAI,CAgDlG"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Pure parser for CMake language files (`CMakeLists.txt`, `*.cmake`).
3
+ *
4
+ * `parseCmakeCommands` splits a file into command invocations the way CMake
5
+ * reads it: command names are case-insensitive, an invocation may span several
6
+ * lines, and arguments may be quoted, bracketed (`[[...]]`) or interleaved with
7
+ * comments. `cmakeFetchDependencies` reads the commands that download a
8
+ * dependency at configure time: `FetchContent_Declare`, `ExternalProject_Add`
9
+ * and the CPM.cmake `CPMAddPackage` family.
10
+ *
11
+ * This module is layer 1 (text in, data out): no filesystem or subprocess
12
+ * access. `lib/ecosystems/parsers-misc.js` turns the facts into components.
13
+ */
14
+ /**
15
+ * Split CMake source into command invocations.
16
+ *
17
+ * @param {string} text Contents of a CMake file
18
+ * @returns {{name: string, args: string[], line: number}[]} Invocations in
19
+ * source order. `name` is lower-cased; `args` have their quotes and bracket
20
+ * delimiters removed; `line` is the 1-based line of the command name.
21
+ */
22
+ export declare function parseCmakeCommands(text: string): {
23
+ name: string;
24
+ args: string[];
25
+ line: number;
26
+ }[];
27
+ /**
28
+ * Replace `${VAR}` references with the values of simple `set()` calls. A
29
+ * reference to an unknown variable is left in place, so callers can tell a
30
+ * resolved value from an unresolved one. Expansion stops at the previous
31
+ * round once the text would exceed 64 KiB.
32
+ *
33
+ * @param {string} value Argument text
34
+ * @param {Map<string,string>} variables Known variable values
35
+ * @returns {string} The expanded text
36
+ */
37
+ export declare function expandCmakeVariables(value: string, variables: Map<string, string>): string;
38
+ /**
39
+ * The variables a file sets to a single value: `set(FOO_VERSION 1.2.3)` and
40
+ * `set(FOO_VERSION "1.2.3" CACHE STRING "...")`. Later definitions win.
41
+ *
42
+ * @param {{name: string, args: string[]}[]} commands Parsed commands
43
+ * @returns {Map<string,string>} Variable values
44
+ */
45
+ export declare function cmakeSetVariables(commands: {
46
+ name: string;
47
+ args: string[];
48
+ }[]): Map<string, string>;
49
+ /**
50
+ * The dependencies a CMake file downloads at configure time.
51
+ *
52
+ * `FetchContent_Declare(<name> ...)` and `ExternalProject_Add(<name> ...)` are
53
+ * read for `GIT_REPOSITORY`/`GIT_TAG` and `URL`/`URL_HASH`/`URL_MD5`.
54
+ * `CPMAddPackage`, `CPMFindPackage` and `CPMDeclarePackage` are read in both
55
+ * the shorthand form and the keyword form (`NAME`, `VERSION`,
56
+ * `GITHUB_REPOSITORY`, `GITLAB_REPOSITORY`, `BITBUCKET_REPOSITORY`,
57
+ * `GIT_REPOSITORY`, `GIT_TAG`, `URL`, `URL_HASH`). `${VAR}` references are
58
+ * expanded with the file's simple `set()` values; anything still unresolved
59
+ * stays as written.
60
+ *
61
+ * @param {string} text Contents of a CMake file
62
+ * @returns {{kind: string, name: string, line: number, gitRepository?: string, gitTag?: string, url?: string, urlHash?: string, version?: string, madeAvailable: boolean}[]}
63
+ * `kind` is `fetch`, `external-project` or `cpm`; `madeAvailable` is true
64
+ * when a `FetchContent_MakeAvailable` in the same file names the dependency.
65
+ */
66
+ export declare function cmakeFetchDependencies(text: string): {
67
+ kind: string;
68
+ name: string;
69
+ line: number;
70
+ gitRepository?: string;
71
+ gitTag?: string;
72
+ url?: string;
73
+ urlHash?: string;
74
+ version?: string;
75
+ madeAvailable: boolean;
76
+ }[];
77
+ //# sourceMappingURL=cmakeLists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cmakeLists.d.ts","sourceRoot":"","sources":["../../../lib/parsers/cmakeLists.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA8DH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAL5B,MAK4B,GAJ1B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,EAAE,CA8G1D;AAMD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAJ/B,MAI+B,EAAE,SAAS,EAH1C,GAAG,CAAC,MAAM,EAAC,MAAM,CAGyB,GAFxC,MAAM,CAkClB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,EAGC,GAF7B,GAAG,CAAC,MAAM,EAAC,MAAM,CAAC,CAwB9B;AAgFD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EALhC,MAKgC,GAJ9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,OAAO,CAAA;CAAC,EAAE,CAyG3K"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Pure reader for CMake presets (`CMakePresets.json` and
3
+ * `CMakeUserPresets.json`, schema versions 1 to 10).
4
+ *
5
+ * A configure preset names how a project is configured: the generator, the
6
+ * build directory, the toolchain file and the cache variables (build type,
7
+ * compilers). Presets inherit from one another, may be hidden (templates
8
+ * that only exist to be inherited), may be enabled only under a condition,
9
+ * and spell paths with macros such as `${sourceDir}` and `$env{NAME}`.
10
+ *
11
+ * This module is layer 1: text and a context object in, data out. Reading the
12
+ * files (and their `include` lists) is done by the caller, which also supplies
13
+ * the process environment through `context.penv`.
14
+ */
15
+ /**
16
+ * Parse the text of a presets file.
17
+ *
18
+ * @param {string} text File contents
19
+ * @returns {{version: number|undefined, include: string[], configurePresets: Object[]}|null}
20
+ * `null` when the text is not a presets document
21
+ */
22
+ export declare function parseCmakePresets(text: string): {
23
+ version: number | undefined;
24
+ include: string[];
25
+ configurePresets: Object[];
26
+ } | null;
27
+ /**
28
+ * Expand the macros CMake allows in preset strings.
29
+ *
30
+ * Supported: `${sourceDir}`, `${sourceParentDir}`, `${sourceDirName}`,
31
+ * `${presetName}`, `${generator}`, `${hostSystemName}`, `${fileDir}`,
32
+ * `${dollar}`, `${pathListSep}`, `$env{NAME}` (the preset's own environment,
33
+ * then the process environment) and `$penv{NAME}` (the process environment).
34
+ * `$vendor{...}` and unknown macros are left as written.
35
+ *
36
+ * @param {string} value String to expand
37
+ * @param {Object} context Macro values; `env` (preset environment, a plain
38
+ * object) and `penv` (a function reading the process environment) are
39
+ * optional
40
+ * @returns {string} Expanded string
41
+ */
42
+ export declare function expandPresetMacros(value: string, context?: Object): string;
43
+ /**
44
+ * Evaluate a preset condition (schema version 3 and later).
45
+ *
46
+ * @param {*} condition Condition object (or boolean, or null)
47
+ * @param {function(string): string} expand Macro expander for the preset
48
+ * @returns {boolean|undefined} `undefined` when the condition cannot be
49
+ * decided here: `matches`/`notMatches` take a regular expression from the
50
+ * repository, which is not run
51
+ */
52
+ export declare function evaluatePresetCondition(condition: any, expand: Function): boolean | undefined;
53
+ /**
54
+ * Resolve the configure presets of a set of presets documents.
55
+ *
56
+ * Inheritance follows CMake: a preset's own fields win, then those of its
57
+ * `inherits` entries in order (the first wins), recursively; `cacheVariables`
58
+ * and `environment` merge key by key the same way, and a `null` entry unsets
59
+ * the key. `name`, `hidden`, `inherits`, `description` and `displayName` are
60
+ * not inherited. A preset that is part of an inheritance cycle, or inherits
61
+ * one that does not exist, is dropped.
62
+ *
63
+ * @param {Array<{file: string, fileDir: string, document: Object}>} documents
64
+ * Parsed documents in reading order (`CMakePresets.json` first, then its
65
+ * includes, then `CMakeUserPresets.json`)
66
+ * @param {Object} context `sourceDir`, `hostSystemName`, `pathListSep`, and
67
+ * `penv` (a function reading the process environment)
68
+ * @returns {Object[]} Visible configure presets: `name`, `displayName`,
69
+ * `file`, `inherits`, `generator`, `binaryDir` (absolute), `toolchainFile`,
70
+ * `cacheVariables` (expanded strings), `environment` (expanded strings),
71
+ * `hasCondition`, and `conditionMet` (true, false or undefined)
72
+ */
73
+ export declare function resolveConfigurePresets(documents: Array<{
74
+ file: string;
75
+ fileDir: string;
76
+ document: Object;
77
+ }>, context?: Object): Object[];
78
+ //# sourceMappingURL=cmakePresets.d.ts.map