@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
@@ -12,6 +12,15 @@ export { isProjectToolingAllowed };
12
12
  * @param {Object} [options] CLI options (`installDeps` gates wrapper use)
13
13
  */
14
14
  export declare function getGradleCommand(srcPath: string, rootPath: string | null, options?: Object): string;
15
+ /**
16
+ * Read a whitespace-separated list of Gradle arguments from an environment
17
+ * variable such as `GRADLE_ARGS`. Repeated, leading or trailing whitespace
18
+ * adds no empty argument, which Gradle would read as a task path.
19
+ *
20
+ * @param {string} name Name of the environment variable
21
+ * @returns {string[]} The arguments, empty when the variable is unset
22
+ */
23
+ export declare function gradleArgsFromEnv(name: string): string[];
15
24
  /**
16
25
  * Method to combine the general gradle arguments, the sub-commands and the sub-commands' arguments in the correct way
17
26
  *
@@ -23,6 +32,23 @@ export declare function getGradleCommand(srcPath: string, rootPath: string | nul
23
32
  * @returns {string[]} Array of arrays of arguments to be added to the gradle command
24
33
  */
25
34
  export declare function buildGradleCommandArguments(gradleArguments: string[], gradleSubCommands: string[], gradleSubCommandArguments: string[], gradleCommandLength: int): string[];
35
+ /**
36
+ * List the dependency tasks to run for the root project and every module read
37
+ * from `gradle properties`.
38
+ *
39
+ * The root project is recognised by identity, never by purl. A module named
40
+ * after the root project that inherits its group and version has the root's
41
+ * purl (issue 4695), and it still needs its own `:module:dependencies` task.
42
+ * `root` in `modulesToSkip` drops the root task; any other entry is a module
43
+ * path.
44
+ *
45
+ * @param {Map<string, Object>} gradleModules Modules keyed by project path, and the root project by its name
46
+ * @param {Object} rootComponent The component built for the root project
47
+ * @param {string} gradleDepTask Name of the dependency task, usually `dependencies`
48
+ * @param {string[]} modulesToSkip Module paths, or `root`, to leave out
49
+ * @returns {string[]} Task paths in the order Gradle should run them
50
+ */
51
+ export declare function gradleDependencyTasks(gradleModules: Map<string, Object>, rootComponent: Object, gradleDepTask: string, modulesToSkip?: string[]): string[];
26
52
  /**
27
53
  * Method to split the output produced by Gradle using parallel processing by project
28
54
  *
@@ -55,17 +81,19 @@ export declare function parseGradleProjects(rawOutput: string): {
55
81
  /**
56
82
  * Parse gradle properties output
57
83
  *
84
+ * `gradlePlugin` is true when the project has the `gradlePlugin` extension,
85
+ * which `java-gradle-plugin`, `kotlin-dsl` and `groovy-gradle-plugin` add: the
86
+ * project builds Gradle plugins, as a `build-logic` build does.
87
+ *
58
88
  * @param {string} rawOutput Raw string output
59
89
  * @param {string} gradleModuleName The name (or 'path') of the module as seen from the root of the project
90
+ * @returns {{rootProject: string, projects: string[], metadata: Object, gradlePlugin: boolean}} The parsed properties
60
91
  */
61
92
  export declare function parseGradleProperties(rawOutput: string, gradleModuleName?: string): {
62
93
  rootProject: string;
63
- projects: any[];
64
- metadata: {
65
- group: string;
66
- version: string;
67
- properties: never[];
68
- };
94
+ projects: string[];
95
+ metadata: Object;
96
+ gradlePlugin: boolean;
69
97
  };
70
98
  /**
71
99
  * Execute gradle properties command using multi-threading and return parsed output
@@ -110,24 +138,76 @@ export declare function recordGradleInvocationFailure(result: Object, context?:
110
138
  command?: string;
111
139
  gradleVersion?: string;
112
140
  }): void;
141
+ /**
142
+ * Read the properties of every project the dependency reports name that
143
+ * `gradleModules` does not have yet, such as a project of an included build,
144
+ * and add a module for each one whose properties task printed a report. One
145
+ * Gradle invocation covers all of them.
146
+ *
147
+ * @param {Iterable<string>} reports Text of the `gradle dependencies` reports
148
+ * @param {Map} gradleModules Modules keyed by project path, updated in place
149
+ * @param {string} gradleRootPath Directory to run Gradle in
150
+ * @param {Object} options CLI options
151
+ * @returns {Promise<string[]>} Paths of the projects added
152
+ */
153
+ export declare function loadGradleModulesForReports(reports: Iterable<string>, gradleModules: Map<any, any>, gradleRootPath: string, options?: Object): Promise<string[]>;
154
+ /**
155
+ * Give the components of a build-tooling report, such as that of an included
156
+ * build that builds Gradle plugins, the `excluded` scope that build-tool
157
+ * configurations get. `reconcileGradleComponents` later keeps a stronger
158
+ * scope that another project's report gives the same component.
159
+ *
160
+ * @param {Object[]} pkgList Components from one project's report, updated in place
161
+ * @param {Map<string, Object>} gradleModules Modules, which keep their own scope
162
+ * @returns {Object[]} The same list
163
+ */
164
+ export declare function excludeGradleBuildTooling(pkgList: Object[], gradleModules: Map<string, Object>): Object[];
165
+ /**
166
+ * Reconcile the copies of a component that several Gradle projects report.
167
+ * Every copy gets the strongest scope any project gave it, so a library one
168
+ * module only tests with stays required when another module compiles against
169
+ * it, and a dependency one project failed to resolve loses its failure
170
+ * properties when another project resolved it.
171
+ *
172
+ * @param {Object[]} pkgList Components from all the projects, updated in place
173
+ * @returns {Object[]} The same list
174
+ */
175
+ export declare function reconcileGradleComponents(pkgList: Object[]): Object[];
113
176
  /**
114
177
  * Method to resolve dependencies from a gradle output
115
178
  *
179
+ * A constraint line (`(c)`) adds neither a component nor an edge. Gradle
180
+ * prints a nested constraint under the platform or module that declares it,
181
+ * and only when the dependency it affects is resolved elsewhere in the tree,
182
+ * where that dependency gets its component and edges. A top-level
183
+ * `{strictly …}` constraint from consistent resolution can name a module the
184
+ * configuration never resolves. A dependency that failed to resolve carries
185
+ * `cdx:gradle:resolutionFailed`, keeps the version it was requested at when
186
+ * that is a concrete version, and otherwise records the request in
187
+ * `cdx:gradle:requestedVersion`. A dependency seen in several configurations
188
+ * keeps the strongest scope among them. Platforms and BOMs get a `pom` type
189
+ * and the `excluded` scope.
190
+ *
191
+ * The parser runs no Gradle task. A project the tree names but `gradleModules`
192
+ * lacks gets a component built from the root project's group and version; use
193
+ * `loadGradleModulesForReports` first to read such projects' properties.
194
+ *
195
+ * The lines Gradle prints under another project, such as `project ':lib'` in
196
+ * the report of `:app`, show that project's dependencies as `:app` resolved
197
+ * them, after conflict resolution. When `reportedProjects` names that project,
198
+ * its own report supplies its edges, so these lines add no edge from it.
199
+ *
116
200
  * @param {string} rawOutput Text output from gradle dependencies task
117
- * @param {string} rootProjectName Name of the root project
118
- * @param {map} gradleModules Cache with all gradle modules that have already been read
119
- * @param {string} gradleRootPath Root path where Gradle is to be run when getting module information
120
- */
121
- export declare function parseGradleDep(rawOutput: string, rootProjectName?: string, gradleModules?: map, gradleRootPath?: string): Promise<{
122
- pkgList: any[];
123
- dependenciesList: {
124
- ref: string;
125
- dependsOn: any[];
126
- }[];
127
- } | {
128
- pkgList?: undefined;
129
- dependenciesList?: undefined;
130
- }>;
201
+ * @param {string} rootProjectName Key in `gradleModules` of the project the report belongs to
202
+ * @param {map} gradleModules Gradle modules keyed by project path, and the root project by its name
203
+ * @param {string} gradleRootPath Directory Gradle ran in, recorded as `cdx:gradle:GradleRootPath`
204
+ * @param {Set<string>} [reportedProjects] Keys in `gradleModules` of the projects whose own reports are parsed
205
+ * @returns {{pkgList: Object[], dependenciesList: Object[]}|{}} The components and dependency graph
206
+ */
207
+ export declare function parseGradleDep(rawOutput: string, rootProjectName?: string, gradleModules?: map, gradleRootPath?: string, reportedProjects?: Set<string>): {
208
+ pkgList: Object[];
209
+ dependenciesList: Object[];
210
+ } | {};
131
211
  /**
132
212
  * Method that handles object creation for gradle modules.
133
213
  *
@@ -257,4 +337,198 @@ export declare function getMavenCommand(srcPath: string, rootPath: string, optio
257
337
  * @returns {Object[]} Package records for resolvable library entries
258
338
  */
259
339
  export declare function parseGradleVersionCatalog(catalogFile: string): Object[];
340
+ /**
341
+ * Parse one Gradle dependency lockfile.
342
+ *
343
+ * Both layouts are read. A Gradle 6+ `gradle.lockfile` has one
344
+ * `group:name:version=configuration,configuration` line per module and an
345
+ * `empty=` line naming the configurations that resolved nothing. A legacy
346
+ * `gradle/dependency-locks/<configuration>.lockfile` has one
347
+ * `group:name:version` line per module, and the file name is the
348
+ * configuration.
349
+ *
350
+ * The scope of a module is the strongest that `gradleConfigurationScope`
351
+ * gives any of its configurations, so a module locked for both
352
+ * `testRuntimeClasspath` and `runtimeClasspath` is `required`. Everything in
353
+ * a buildscript or settings lockfile is build tooling and `excluded`.
354
+ *
355
+ * A lockfile records resolved versions, so components carry a purl identity
356
+ * with confidence 1 and the lockfile path as the evidence value. The purl and
357
+ * bom-ref match what `parseGradleDep` builds for the same coordinate, so a
358
+ * component reads the same whether Gradle ran or not. A lockfile is flat: it
359
+ * says nothing about which module depends on which, so no dependency graph is
360
+ * returned.
361
+ *
362
+ * The file is untrusted input. It is read only when it is a regular file no
363
+ * larger than 8 MiB, at most 100000 lines are read, and a malformed line
364
+ * costs only itself. Line content never reaches a property.
365
+ *
366
+ * @param {string} lockFile Path to the lockfile
367
+ * @param {Object} [options] Parse options
368
+ * @param {string} [options.rootDir] Directory the lockfile must resolve inside
369
+ * @returns {Object[]} Components, one per locked module
370
+ */
371
+ export declare function parseGradleLockfile(lockFile: string, options?: {
372
+ rootDir?: string;
373
+ }): Object[];
374
+ /**
375
+ * Parse several Gradle lockfiles of one build and merge the result.
376
+ *
377
+ * Every project of a multi-project build has its own lockfile, so the same
378
+ * module often appears in several of them with different configurations. The
379
+ * copies collapse into one component with the strongest scope any lockfile
380
+ * gave it (see `reconcileGradleComponents`), and its evidence lists every
381
+ * lockfile that locked it. The first lockfile that locked a module stays its
382
+ * `internal:SrcFile`.
383
+ *
384
+ * @param {string[]} lockFiles Paths to the lockfiles
385
+ * @param {Object} [options] Parse options, as for `parseGradleLockfile`
386
+ * @returns {Object[]} Components, one per locked module
387
+ */
388
+ export declare function parseGradleLockfiles(lockFiles: string[], options?: Object): Object[];
389
+ /**
390
+ * Find the Gradle dependency lockfiles of one build.
391
+ *
392
+ * Both layouts are searched below `rootPath`, recursively even when
393
+ * `options.multiProject` is off: every subproject of a Gradle build locks its
394
+ * own configurations, and the subprojects belong to the same build. The
395
+ * Gradle 6+ names are `gradle.lockfile`, `buildscript-gradle.lockfile` and
396
+ * `settings-gradle.lockfile`; the Gradle 4.8 to 5.x layout is
397
+ * `gradle/dependency-locks/<configuration>.lockfile`.
398
+ *
399
+ * A lockfile is accepted only when the project directory that owns it holds a
400
+ * Gradle build file, and never when it sits under `build/`, `.gradle/`,
401
+ * `node_modules/` or a vendored directory. `getAllFiles` already leaves
402
+ * `.git`, `.hg`, `.chen` and `node_modules` out; `build/` and `.gradle/` are
403
+ * Gradle's own output and cache directories, which a lockfile in them cannot
404
+ * belong to the project's source of truth.
405
+ *
406
+ * Custom `dependencyLocking.lockFile` paths, the Nebula `dependencies.lock`
407
+ * and Palantir `versions.lock` formats are not looked for.
408
+ *
409
+ * @param {string} rootPath Directory to search
410
+ * @param {Object} [options] CLI options
411
+ * @returns {string[]} Lockfile paths, in a stable order
412
+ */
413
+ export declare function findGradleLockfiles(rootPath: string, options?: Object): string[];
414
+ /**
415
+ * Read the root project name a Gradle settings script assigns with
416
+ * `rootProject.name = '<name>'` or `rootProject.name = "<name>"`, without
417
+ * running Gradle.
418
+ *
419
+ * `settings.gradle` is read before `settings.gradle.kts`, and the last
420
+ * assignment in the file wins, as it does in Gradle. Only a plain string
421
+ * literal is accepted: a value built from a variable, a template
422
+ * (`"${x}"`) or a method call is not something a static read can resolve.
423
+ *
424
+ * @param {string} gradleRootPath Root directory of the Gradle build
425
+ * @returns {string|undefined} The root project name, or undefined when no
426
+ * settings script assigns one as a plain literal
427
+ */
428
+ export declare function readGradleRootProjectName(gradleRootPath: string): string | undefined;
429
+ /**
430
+ * Parse a `gradle/verification-metadata.xml` file.
431
+ *
432
+ * The file is untrusted input. It records what Gradle verified when
433
+ * `gradle --write-verification-metadata` last ran, which does not prove that
434
+ * the artifacts in this BOM match: the file travels with the source, and
435
+ * nothing here re-checks the digests. Trust rules (`trusted-artifacts`,
436
+ * `trusted-keys`, `ignored-keys`) may be regular expressions, so they are
437
+ * only counted, never evaluated, and no free text of the file (an `origin`, a
438
+ * `reason`, a key-server URI) reaches the result. Only checksum digests,
439
+ * PGP key ids and the configuration flags survive.
440
+ *
441
+ * The read is bounded: the file must be a regular file no larger than
442
+ * 32 MiB inside `options.rootDir`, at most 200000 components and 64
443
+ * artifacts per component are read, and a malformed file yields undefined
444
+ * rather than an error.
445
+ *
446
+ * @param {string} metadataFile Path to verification-metadata.xml
447
+ * @param {Object} [options] Parse options
448
+ * @param {string} [options.rootDir] Directory the file must resolve inside
449
+ * @returns {{configuration: {verifyMetadata: (boolean|undefined), verifySignatures: (boolean|undefined), trustedKeyCount: number, trustedArtifactRuleCount: number, ignoredKeyCount: number, keyServerCount: number}, components: Map<string, {group: string, name: string, version: string, artifacts: {fileName: string, classifier: string, extension: string, hashes: {alg: string, content: string}[], pgpKeyIds: string[]}[]}>}|undefined}
450
+ * The parsed metadata, or undefined when the file could not be read
451
+ */
452
+ export declare function parseGradleVerificationMetadata(metadataFile: string, options?: {
453
+ rootDir?: string;
454
+ }): {
455
+ configuration: {
456
+ verifyMetadata: (boolean | undefined);
457
+ verifySignatures: (boolean | undefined);
458
+ trustedKeyCount: number;
459
+ trustedArtifactRuleCount: number;
460
+ ignoredKeyCount: number;
461
+ keyServerCount: number;
462
+ };
463
+ components: Map<string, {
464
+ group: string;
465
+ name: string;
466
+ version: string;
467
+ artifacts: {
468
+ fileName: string;
469
+ classifier: string;
470
+ extension: string;
471
+ hashes: {
472
+ alg: string;
473
+ content: string;
474
+ }[];
475
+ pgpKeyIds: string[];
476
+ }[];
477
+ }>;
478
+ } | undefined;
479
+ /**
480
+ * Find the gradle/verification-metadata.xml of one Gradle build.
481
+ *
482
+ * Gradle reads one verification file per build, from the root build's
483
+ * `gradle` directory; included builds' copies are ignored, so nothing is
484
+ * searched below the root. The file is accepted only when the directory is a
485
+ * Gradle project of its own, so a file copied into a nested folder is not
486
+ * read as an inventory source.
487
+ *
488
+ * @param {string} gradleRootPath Root directory of the Gradle build
489
+ * @returns {string|undefined} The metadata file path, or undefined
490
+ */
491
+ export declare function findGradleVerificationMetadata(gradleRootPath: string): string | undefined;
492
+ /**
493
+ * The artifact of a coordinate whose hashes describe the component itself:
494
+ * the `.pom` artifact for a platform or BOM component, else the main jar,
495
+ * else the main aar. Sources, javadoc and other classifiers, and the
496
+ * `.module` and `.pom` hashes of a jar component, are never used.
497
+ *
498
+ * @param {object} component Parsed verification metadata component
499
+ * @param {boolean} wantsPom True for a component with purl qualifier type=pom
500
+ * @returns {object|undefined} The artifact, or undefined
501
+ */
502
+ export declare function gradleVerificationMainArtifact(component: object, wantsPom: boolean): object | undefined;
503
+ /**
504
+ * Merge the checksums and PGP key ids a verification-metadata.xml records
505
+ * into the components of a package list.
506
+ *
507
+ * A digest of the artifact itself, computed from the jar in the local cache
508
+ * or found by another collector, is the stronger claim, so the recorded
509
+ * digests only fill the algorithms a component still lacks. Where the file
510
+ * records a different digest for an algorithm the component already has,
511
+ * the recorded digest never wins: the component keeps its own, and the
512
+ * component gains the cdx:gradle:verificationMismatch=true property so the
513
+ * disagreement is visible. A released Maven version does not change after
514
+ * publishing, so a stale file cannot explain a mismatch: a stale file names
515
+ * old versions, which match nothing. The likely causes are an artifact
516
+ * republished on a mirror or internal repository, or a corrupted or
517
+ * tampered cache. SNAPSHOT versions and digests that are not hex are not
518
+ * compared.
519
+ *
520
+ * Every matched component also gains two properties naming the verification
521
+ * methods and the PGP key ids of its artifact. The evidence of the
522
+ * component is left alone: a component found by a Gradle run or a lockfile
523
+ * keeps the identity evidence of that source, and only the components the
524
+ * verification-metadata fallback built carry the file as their evidence.
525
+ *
526
+ * @param {Object[]} pkgList Components to enrich in place
527
+ * @param {Object} metadata Parsed metadata, as parseGradleVerificationMetadata
528
+ * returns
529
+ * @param {string} metadataFile Path to the verification-metadata.xml, named
530
+ * in the debug reasoning
531
+ * @returns {number} The number of components this call changed
532
+ */
533
+ export declare function applyGradleVerificationMetadata(pkgList: Object[], metadata: Object, metadataFile: string): number;
260
534
  //# sourceMappingURL=gradleutils.d.ts.map
@@ -1 +1 @@
1
- {"version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,EACR,YAAY,EAPH,MAOG,GALD,MAAM,CA2GlB"}
@@ -9,12 +9,25 @@
9
9
  * from configuration, bundler entrypoints, stylesheets, or plugins, so a
10
10
  * missing import is not evidence that a package is optional.
11
11
  *
12
+ * When the lock file holds several versions of a package, an import is
13
+ * evidence only for the version the importing file resolves to (see
14
+ * `createNpmVersionChooser`), so a copy nested under another package is not
15
+ * credited with, or promoted to required by, the project's own imports.
16
+ *
12
17
  * @param {Array<object>} pkgList Package components to enrich.
13
18
  * @param {object} allImports Map of import specifier to usage evidence objects.
14
19
  * @param {object} allExports Map of export specifier to export evidence objects.
15
20
  * @param {boolean} deep When true, fill in missing description/author/license
16
21
  * metadata from the local node_modules copy of each package.
22
+ * @param {object} [context] Project facts that pick the version a file uses.
23
+ * @param {string} [context.srcDir] Directory the evidence file names are relative to.
24
+ * @param {Array<object>} [context.dependencies] Dependency tree of the packages.
25
+ * @param {object} [context.parentComponent] Project component, with any workspace members as its components.
17
26
  * @returns {Promise<Array<object>>} The enriched package list (same reference as pkgList).
18
27
  */
19
- export declare function addEvidenceForImports(pkgList: Array<object>, allImports: object, allExports: object, deep: boolean): Promise<Array<object>>;
28
+ export declare function addEvidenceForImports(pkgList: Array<object>, allImports: object, allExports: object, deep: boolean, context?: {
29
+ srcDir?: string;
30
+ dependencies?: Array<object>;
31
+ parentComponent?: object;
32
+ }): Promise<Array<object>>;
20
33
  //# sourceMappingURL=jsEvidence.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/jsEvidence.js"],"names":[],"mappings":"AAyLA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EARE,KAAK,CAAC,MAAM,CAQd,EACP,UAAU,EARD,MAQC,EACV,UAAU,EARD,MAQC,EACV,IAAI,EARK,OAQL,GANO,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CA+KlC"}
1
+ {"version":3,"file":"jsEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/jsEvidence.js"],"names":[],"mappings":"AAsMA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAZE,KAAK,CAAC,MAAM,CAYd,EACP,UAAU,EAZD,MAYC,EACV,UAAU,EAZD,MAYC,EACV,IAAI,EAZK,OAYL,EACJ,OAAO,AAXN,CAIA,EAHA;IAAyB,MAAM,AAA/B,CACA,EADQ,MAAM,CACd;IAAgC,YAAY,AAA5C,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;IAAyB,eAAe,AAAxC,CACA,EADQ,MAAM,CACd;CAOW,GAPD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CA6MlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"kosi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/kosi.js"],"names":[],"mappings":"AAqCA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAH3C,MAAM,GAAC,SAGoC,GAFzC,MAAM,GAAC,SAAS,CAwB5B;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,KAAA,WAE5C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,QAQ3B;AA6DD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAJ3B,MAI2B,EAAE,OAAO,GAHpC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CAkE5B;AA0BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,KAAA,EAAE,SAAS,KAAA,OA4B/C;AAusBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,KAAK,EAAE,WAAW,KAAK,MAsEpE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,GAJvC,MAI4C,EAAE,WAAW,GAHzD,MAG8D,GAF5D,MAAM,CAoFlB;AAiCD,wBAAgB,mBAAmB,CAAC,UAAU,KAAK,EAAE,UAAU,QAAK;;;;;;;EA2DnE"}
1
+ {"version":3,"file":"kosi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/kosi.js"],"names":[],"mappings":"AAsCA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAH3C,MAAM,GAAC,SAGoC,GAFzC,MAAM,GAAC,SAAS,CAwB5B;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,KAAA,WAE5C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,QAQ3B;AA6DD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAJ3B,MAI2B,EAAE,OAAO,GAHpC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CAkE5B;AA0BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,KAAA,EAAE,SAAS,KAAA,OA4B/C;AAosBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,KAAK,EAAE,WAAW,KAAK,MAsEpE;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,GAJvC,MAI4C,EAAE,WAAW,GAHzD,MAG8D,GAF5D,MAAM,CAoFlB;AAiCD,wBAAgB,mBAAmB,CAAC,UAAU,KAAK,EAAE,UAAU,QAAK;;;;;;;EA2DnE"}
@@ -0,0 +1,119 @@
1
+ /**
2
+ * Full npm package name (`@scope/name` or `name`) of a component or manifest.
3
+ *
4
+ * @param {{group?: string, name?: string}} pkg Component or parsed manifest
5
+ * @returns {string} The package name npm installs it under
6
+ */
7
+ export declare function npmPackageName({ group, name }: {
8
+ group?: string;
9
+ name?: string;
10
+ }): string;
11
+ /**
12
+ * Full npm package name of an npm purl.
13
+ *
14
+ * @param {string} purl Package URL
15
+ * @returns {string|undefined} `@scope/name` or `name`; undefined for a purl that is not npm or does not parse
16
+ */
17
+ export declare function npmPackageNameOfPurl(purl: string): string | undefined;
18
+ /**
19
+ * Directory a package-lock component is installed in.
20
+ *
21
+ * `internal:LocalNodeModulesPath` holds the arborist location, relative to the
22
+ * root of the tree: `node_modules/a/node_modules/b` for a nested copy and
23
+ * `packages/web/node_modules/b` for a copy under a workspace member. The
24
+ * component's `internal:SrcFile` names a `package-lock.json` in the directory
25
+ * that holds the location's first `node_modules` segment, so the install
26
+ * directory is that location's `node_modules/...` part resolved against the
27
+ * SrcFile's directory. A location without a `node_modules` segment (a
28
+ * workspace member itself) and an absolute location (pnpm metadata found by
29
+ * searching node_modules) name no install a file resolves to.
30
+ *
31
+ * @param {Object} pkg Package component
32
+ * @returns {string|undefined} Absolute install directory
33
+ */
34
+ export declare function npmInstallDirectory(pkg: Object): string | undefined;
35
+ /**
36
+ * References the given root components depend on directly.
37
+ *
38
+ * @param {Array<{ref: string, dependsOn?: string[]}>} dependencies Dependency tree
39
+ * @param {Iterable<string>} rootRefs bom-refs of the project and its workspace members
40
+ * @returns {Set<string>} bom-refs of their direct dependencies
41
+ */
42
+ export declare function directDependencyRefs(dependencies: Array<{
43
+ ref: string;
44
+ dependsOn?: string[];
45
+ }>, rootRefs: Iterable<string>): Set<string>;
46
+ /**
47
+ * The direct dependencies that apply to a project file, nearest first.
48
+ *
49
+ * A file inside an npm workspace member (a component with
50
+ * `cdx:npm:isWorkspace=true` and its directory in `cdx:npm:resolvedPath`,
51
+ * relative to the project) depends first on what that member declares, then
52
+ * on what the project root declares, since Node.js finds the root's hoisted
53
+ * copies from inside a member too. Any other file depends on the root's.
54
+ *
55
+ * @param {Object[]} components Components or package list
56
+ * @param {Object[]} dependencies Dependency tree
57
+ * @param {string[]} rootRefs bom-refs of the project and the sub-components it lists
58
+ * @returns {function(string): Set<string>[]} Lookup from a file name, relative to the project, to sets of bom-refs
59
+ */
60
+ export declare function createDirectDependencyLookup(components: Object[], dependencies: Object[], rootRefs: string[]): Function;
61
+ /**
62
+ * bom-refs of a parent component and the sub-components it lists, which are
63
+ * the roots whose direct dependencies a project's own files use.
64
+ *
65
+ * @param {Object} parentComponent Parent (metadata) component
66
+ * @returns {string[]} bom-refs
67
+ */
68
+ export declare function projectRootRefs(parentComponent: Object): string[];
69
+ /**
70
+ * Decide which installed versions of an npm package a project file uses.
71
+ *
72
+ * Only package names with more than one version in `pkgList` are decided; a
73
+ * file uses the single version of any other package. For the rest, the file
74
+ * uses:
75
+ *
76
+ * 1. the copy Node.js resolves from the file's directory, when the lock file
77
+ * records install locations (package-lock.json): the first
78
+ * `<dir>/node_modules/<name>` holding one of the versions, walking up from
79
+ * the file;
80
+ * 2. otherwise the versions the file's workspace member, or else the project,
81
+ * depends on directly (see `createDirectDependencyLookup`);
82
+ * 3. otherwise every version, since nothing tells them apart.
83
+ *
84
+ * @param {Object[]} pkgList Package components, duplicates per install location included
85
+ * @param {Object} [context] Project facts
86
+ * @param {string} [context.srcDir] Directory the file names are relative to
87
+ * @param {Object[]} [context.dependencies] Dependency tree
88
+ * @param {string[]} [context.rootRefs] bom-refs of the project and the sub-components it lists
89
+ * @returns {{isAmbiguous: function(Object): boolean, allows: function(Object, string): boolean}} Chooser
90
+ */
91
+ export declare function createNpmVersionChooser(pkgList: Object[], context?: {
92
+ srcDir?: string;
93
+ dependencies?: Object[];
94
+ rootRefs?: string[];
95
+ }): {
96
+ isAmbiguous: Function;
97
+ (Object: any): boolean;
98
+ allows: Function;
99
+ (Object: any, string: any): boolean;
100
+ };
101
+ /**
102
+ * Keep each npm occurrence only on the versions the project file uses.
103
+ *
104
+ * evinse credits a slice record to every component of the record's package,
105
+ * one per installed version. For a package with several versions in the BOM,
106
+ * an occurrence in file F stays on a version when the input BOM's own import
107
+ * evidence (seeded before any slice is read) puts that version in F; when the
108
+ * BOM credits none of the versions in F, or several, the versions F's
109
+ * workspace member or else the project depends on directly are kept (see
110
+ * `createDirectDependencyLookup`); failing both, all stay.
111
+ *
112
+ * @param {Object} purlLocationMap purl -> Set of occurrence keys, changed in place
113
+ * @param {Object} purlSymbolMap purl -> occurrence key -> symbol, changed in place
114
+ * @param {Object} seededLocationMap purl -> Set of occurrence keys the input BOM carried
115
+ * @param {Object} bomJson Input BOM, for its components, dependencies and metadata component
116
+ * @returns {Set<string>} purls left with no occurrence, whose input occurrences belong to another version
117
+ */
118
+ export declare function keepResolvedNpmVersions(purlLocationMap: Object, purlSymbolMap: Object, seededLocationMap: Object, bomJson: Object): Set<string>;
119
+ //# sourceMappingURL=npmVersionResolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npmVersionResolution.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/npmVersionResolution.js"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAHnC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAGK,GAFjC,MAAM,CAKlB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAG8B,GAF5B,MAAM,GAAC,SAAS,CAc5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAH5B,MAG4B,GAF1B,MAAM,GAAC,SAAS,CAuB5B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAJtC,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,CAIH,EAAE,QAAQ,EAHhD,QAAQ,CAAC,MAAM,CAGiC,GAF9C,GAAG,CAAC,MAAM,CAAC,CAavB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAND,MAAM,EAML,EACV,YAAY,EANH,MAAM,EAMH,EACZ,QAAQ,EANC,MAAM,EAMP,YAqCT;AAqBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAHpC,MAGo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M,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,CAAC,CA2B/C"}
1
+ {"version":3,"file":"parsers-bazel.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-bazel.js"],"names":[],"mappings":"AAgDA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAHhC,MAGgC,GAF9B;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAmGhF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAHlC,MAGkC,GAFhC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAiDzD;AA+dD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAJrB,MAIqB,EAAE,IAAI,EAH3B,MAG2B,GAFzB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAC,MAAM,EAAE,CAAC,CAAC,CA2B/C"}
@@ -186,6 +186,22 @@ export declare function pnpmMetadata(pkgList: any[], lockFilePath: string): any[
186
186
  * plain version and not an alias
187
187
  */
188
188
  export declare function parsePnpmAliasRef(value: string): Object | undefined;
189
+ /**
190
+ * Decide whether a parsed pnpm lockfile document is a boot document.
191
+ *
192
+ * Since pnpm 12 a lockfile can hold two YAML documents. The first, the boot
193
+ * document, records the project's config dependencies and the resolved pnpm
194
+ * version under its importers, and the last is the project lockfile. The
195
+ * boot document is recognised by these keys rather than by its position
196
+ * alone, and tolerates either key missing.
197
+ *
198
+ * See: https://pnpm.io/lockfile
199
+ *
200
+ * @param {Object} docObj Parsed YAML document
201
+ *
202
+ * @returns {boolean} true when the document looks like a boot document
203
+ */
204
+ export declare function isPnpmBootDocument(docObj: Object): boolean;
189
205
  /**
190
206
  * Parse nodejs pnpm lock file
191
207
  *
@@ -193,30 +209,11 @@ export declare function parsePnpmAliasRef(value: string): Object | undefined;
193
209
  * @param {Object} parentComponent parent component
194
210
  * @param {Array[String]} workspacePackages Workspace packages
195
211
  * @param {Object} workspaceSrcFiles Workspace package.json files
196
- * @param {Object} _workspaceCatalogs Workspace catalogs
197
212
  * @param {Object} _workspaceDirectDeps Direct dependencies of each workspace
198
213
  * @param {Object} depsWorkspaceRefs Workspace references for each dependency
199
214
  * @param {string} projectRoot Root path used to relativize pnpm-lock evidence paths
200
215
  */
201
- export declare function parsePnpmLock(pnpmLock: string, parentComponent?: Object, workspacePackages?: any, workspaceSrcFiles?: Object, _workspaceCatalogs?: Object, _workspaceDirectDeps?: Object, depsWorkspaceRefs?: Object, projectRoot?: string): Promise<{
202
- pkgList?: undefined;
203
- dependenciesList?: undefined;
204
- parentSubComponents?: undefined;
205
- } | {
206
- pkgList: any[];
207
- dependenciesList: {
208
- ref: string;
209
- dependsOn: any[];
210
- }[];
211
- parentSubComponents: {
212
- group: any;
213
- name: any;
214
- version: any;
215
- type: string;
216
- purl: any;
217
- "bom-ref": string;
218
- }[];
219
- }>;
216
+ export declare function parsePnpmLock(pnpmLock: string, parentComponent?: Object, workspacePackages?: any, workspaceSrcFiles?: Object, _workspaceDirectDeps?: Object, depsWorkspaceRefs?: Object, projectRoot?: string): Promise<{}>;
220
217
  /**
221
218
  * Parse bower json file
222
219
  *
@@ -1 +1 @@
1
- {"version":3,"file":"parsers-js.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/parsers-js.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAgbrC;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAZF,MAYE,EACX,MAAM,AAZL,CAEA,EAFQ,OAYK,EACd,aAAa,AAXZ,CAEA,EAFQ,OAWY,EACrB,OAAO,AAVN,CAGA,EAFA;IAA0B,aAAa,AAAvC,CAEA,EAFQ,OAAO,CAEf;CAOW,GAPD,OAAO,CAAC,KAAK,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AQ,EATC,MASD,EACR,eAAe,GATN,MASa,EACtB,iBAAiB,MAAK,EACtB,iBAAiB,GATR,MASa,EACtB,oBAAoB,GATX,MASgB,EACzB,iBAAiB,GATR,MASa,EACtB,WAAW,GATF,MASc,eAkqCxB;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,aAAa,EAFvC,MAEuC,kBA6CjD;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,SAAS,EAF/B,MAE+B,kBA2FzC;AAGD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAAM,GAAC,MAGuB,GAF5B;IAAE,KAAK,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,GAAC,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,CAoBvG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,QAAA,GAFjC,KAAK,QAAQ,CA4CzB"}
@@ -369,6 +369,25 @@ export declare function parseCmakeDotFile(dotFile: string, pkgType: string, opti
369
369
  * @returns {Object} The component
370
370
  */
371
371
  export declare function cmakeFetchDependencyComponent(dep: Object, srcFile: string): Object;
372
+ /**
373
+ * Read the wrap files of a meson project's subprojects directory: which
374
+ * dependency names each wrap provides, and the version it pins.
375
+ * https://mesonbuild.com/Wrap-dependency-system-manual.html
376
+ *
377
+ * A WrapDB wrap records `wrapdb_version = <upstream>-<wrap revision>`; any wrap
378
+ * names its unpacked `directory` and its archive, which carry the upstream
379
+ * version; a git wrap pins a `revision` that is often a version tag.
380
+ *
381
+ * @param {string} subprojectsDir path of the subprojects directory
382
+ * @returns {Map<string, {wrap: string, version: string, source: string, revision?: string}>}
383
+ * by provided dependency name, lower-case
384
+ */
385
+ export declare function readMesonWraps(subprojectsDir: string): Map<string, {
386
+ wrap: string;
387
+ version: string;
388
+ source: string;
389
+ revision?: string;
390
+ }>;
372
391
  /**
373
392
  * Parse a CMake-like build file (CMakeLists.txt, meson.build, etc.) and extract the
374
393
  * parent component and list of dependency packages.