@cdxgen/cdxgen 13.6.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 (264) hide show
  1. package/README.md +15 -8
  2. package/bin/audit.js +7 -4
  3. package/bin/cdxgen.js +256 -37
  4. package/bin/convert.js +146 -22
  5. package/bin/evinse.js +25 -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 +18 -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/pqc-migration.json +239 -0
  15. package/data/remediations.json +52 -0
  16. package/data/rules/cbom-security.yaml +4 -3
  17. package/data/rules/package-integrity.yaml +28 -0
  18. package/lib/audit/index.js +25 -3
  19. package/lib/cli/bomAssembly.js +80 -1
  20. package/lib/cli/cliOptions.js +121 -17
  21. package/lib/cli/index.js +609 -898
  22. package/lib/cli/jsBom.js +3 -0
  23. package/lib/cli/jvmBom.js +365 -40
  24. package/lib/cli/managedBom.js +19 -3
  25. package/lib/cli/nativeBom.js +10 -0
  26. package/lib/core/env.js +26 -0
  27. package/lib/core/fs.js +126 -3
  28. package/lib/core/globPatterns.js +218 -0
  29. package/lib/core/processTree.js +99 -12
  30. package/lib/core/projectConfig.js +332 -25
  31. package/lib/core/toolRegistry.js +15 -1
  32. package/lib/ecosystems/denoutils.js +2 -2
  33. package/lib/ecosystems/golem.js +3 -8
  34. package/lib/ecosystems/gradleutils.js +1082 -6
  35. package/lib/ecosystems/jsEvidence.js +90 -38
  36. package/lib/ecosystems/kosi.js +3 -5
  37. package/lib/ecosystems/npmVersionResolution.js +376 -0
  38. package/lib/ecosystems/parsers-python.js +89 -28
  39. package/lib/ecosystems/parsers-rust.js +117 -15
  40. package/lib/ecosystems/remote/huggingface.js +22 -0
  41. package/lib/ecosystems/rusi.js +2 -4
  42. package/lib/ecosystems/scalasem.js +2 -1
  43. package/lib/evinser/evinser.js +196 -34
  44. package/lib/evinser/scalasem.js +5 -1
  45. package/lib/helpers/agenticToolutils.js +112 -1
  46. package/lib/helpers/bomSigner.js +43 -9
  47. package/lib/helpers/jssSigner.js +1276 -0
  48. package/lib/inventory/agentBlueprint.js +193 -0
  49. package/lib/inventory/agentToolNames.js +145 -0
  50. package/lib/inventory/aiCollector.js +153 -7
  51. package/lib/inventory/aiInventory.js +44 -8
  52. package/lib/inventory/aiProviders.js +324 -0
  53. package/lib/inventory/bomUtils.js +8 -1
  54. package/lib/inventory/ciParsers/githubActionsLock.js +821 -0
  55. package/lib/inventory/citations.js +31 -2
  56. package/lib/inventory/communityAiConfigParser.js +978 -80
  57. package/lib/inventory/cyclonedx20.js +152 -0
  58. package/lib/inventory/cyclonedx20Common.js +286 -0
  59. package/lib/inventory/cyclonedx20Derived.js +159 -0
  60. package/lib/inventory/cyclonedx20Parties.js +552 -0
  61. package/lib/inventory/cyclonedx20Read.js +768 -0
  62. package/lib/inventory/cyclonedx20ReadCommon.js +374 -0
  63. package/lib/inventory/cyclonedx20ReadComponents.js +692 -0
  64. package/lib/inventory/cyclonedx20ReadContext.js +380 -0
  65. package/lib/inventory/cyclonedx20ReadEvidence.js +466 -0
  66. package/lib/inventory/cyclonedx20ReadSections.js +599 -0
  67. package/lib/inventory/cyclonedx20Render.js +766 -0
  68. package/lib/inventory/cyclonedx20RenderComponents.js +716 -0
  69. package/lib/inventory/cyclonedx20RenderDefinitions.js +405 -0
  70. package/lib/inventory/cyclonedx20RenderEvidence.js +726 -0
  71. package/lib/inventory/cyclonedx20RenderHardware.js +203 -0
  72. package/lib/inventory/cyclonedx20RenderPatents.js +174 -0
  73. package/lib/inventory/cyclonedx20RenderRefIds.js +314 -0
  74. package/lib/inventory/cyclonedx20RenderSections.js +499 -0
  75. package/lib/inventory/cyclonedx20Tables.js +594 -0
  76. package/lib/inventory/deps.js +106 -13
  77. package/lib/inventory/dosai.js +236 -1
  78. package/lib/inventory/dosaiParsers.js +3 -6
  79. package/lib/inventory/dotnetRuntime.js +164 -14
  80. package/lib/inventory/ecosystemFormulationParsers.js +979 -0
  81. package/lib/inventory/envcontext.js +132 -38
  82. package/lib/inventory/evidenceUtils.js +2 -1
  83. package/lib/inventory/formulationParsers.js +95 -13
  84. package/lib/inventory/hbom.js +45 -6
  85. package/lib/inventory/hbomLoader.js +166 -0
  86. package/lib/inventory/mcpConfigParser.js +5 -0
  87. package/lib/inventory/occurrenceKey.js +90 -0
  88. package/lib/inventory/pqcMigration.js +426 -0
  89. package/lib/inventory/rustFormulationParser.js +21 -10
  90. package/lib/inventory/source.js +65 -6
  91. package/lib/parsers/huggingfaceManifest.js +9 -1
  92. package/lib/parsers/huggingfaceUtils.js +18 -0
  93. package/lib/parsers/kiroPermissions.js +166 -0
  94. package/lib/server/server.js +36 -34
  95. package/lib/stages/postgen/postgen.js +41 -1
  96. package/lib/stages/postgen/specVersionCompat.js +76 -0
  97. package/lib/validator/bomValidator.js +8 -1
  98. package/lib/validator/complianceEngine.js +30 -3
  99. package/lib/validator/complianceRules.js +1416 -4
  100. package/lib/validator/generated/validate-2.0.mjs +57554 -13851
  101. package/lib/validator/index.js +48 -7
  102. package/lib/validator/reporters/json.js +6 -0
  103. package/package.json +9 -9
  104. package/types/bin/repl.d.ts.map +1 -1
  105. package/types/lib/audit/index.d.ts +6 -2
  106. package/types/lib/audit/index.d.ts.map +1 -1
  107. package/types/lib/cli/bomAssembly.d.ts +16 -0
  108. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  109. package/types/lib/cli/cliOptions.d.ts +6 -0
  110. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  111. package/types/lib/cli/index.d.ts.map +1 -1
  112. package/types/lib/cli/jsBom.d.ts +2 -1
  113. package/types/lib/cli/jsBom.d.ts.map +1 -1
  114. package/types/lib/cli/jvmBom.d.ts +15 -0
  115. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  116. package/types/lib/cli/managedBom.d.ts.map +1 -1
  117. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  118. package/types/lib/core/boundedFile.d.ts +30 -0
  119. package/types/lib/core/boundedFile.d.ts.map +1 -1
  120. package/types/lib/core/env.d.ts +10 -0
  121. package/types/lib/core/env.d.ts.map +1 -1
  122. package/types/lib/core/fs.d.ts +4 -0
  123. package/types/lib/core/fs.d.ts.map +1 -1
  124. package/types/lib/core/globPatterns.d.ts +70 -0
  125. package/types/lib/core/globPatterns.d.ts.map +1 -0
  126. package/types/lib/core/paths.d.ts +9 -0
  127. package/types/lib/core/paths.d.ts.map +1 -1
  128. package/types/lib/core/processTree.d.ts +16 -5
  129. package/types/lib/core/processTree.d.ts.map +1 -1
  130. package/types/lib/core/projectConfig.d.ts +47 -8
  131. package/types/lib/core/projectConfig.d.ts.map +1 -1
  132. package/types/lib/core/toolRegistry.d.ts.map +1 -1
  133. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  134. package/types/lib/ecosystems/gradleutils.d.ts +248 -8
  135. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  136. package/types/lib/ecosystems/jsEvidence.d.ts +14 -1
  137. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  138. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  139. package/types/lib/ecosystems/npmVersionResolution.d.ts +119 -0
  140. package/types/lib/ecosystems/npmVersionResolution.d.ts.map +1 -0
  141. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  142. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  143. package/types/lib/ecosystems/pythonutils.d.ts +1 -1
  144. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  145. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  146. package/types/lib/ecosystems/scalasem.d.ts +58 -16
  147. package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
  148. package/types/lib/evinser/evinser.d.ts +61 -9
  149. package/types/lib/evinser/evinser.d.ts.map +1 -1
  150. package/types/lib/evinser/scalasem.d.ts.map +1 -1
  151. package/types/lib/helpers/agenticToolutils.d.ts +53 -19
  152. package/types/lib/helpers/agenticToolutils.d.ts.map +1 -1
  153. package/types/lib/helpers/bomSigner.d.ts +20 -3
  154. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  155. package/types/lib/helpers/jssSigner.d.ts +288 -0
  156. package/types/lib/helpers/jssSigner.d.ts.map +1 -0
  157. package/types/lib/helpers/vsixutils.d.ts +303 -19
  158. package/types/lib/helpers/vsixutils.d.ts.map +1 -1
  159. package/types/lib/inventory/agentBlueprint.d.ts +70 -0
  160. package/types/lib/inventory/agentBlueprint.d.ts.map +1 -0
  161. package/types/lib/inventory/agentToolNames.d.ts +51 -0
  162. package/types/lib/inventory/agentToolNames.d.ts.map +1 -0
  163. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  164. package/types/lib/inventory/aiInventory.d.ts.map +1 -1
  165. package/types/lib/inventory/aiProviders.d.ts +85 -0
  166. package/types/lib/inventory/aiProviders.d.ts.map +1 -0
  167. package/types/lib/inventory/bomUtils.d.ts.map +1 -1
  168. package/types/lib/inventory/ciParsers/githubActionsLock.d.ts +101 -0
  169. package/types/lib/inventory/ciParsers/githubActionsLock.d.ts.map +1 -0
  170. package/types/lib/inventory/citations.d.ts +5 -0
  171. package/types/lib/inventory/citations.d.ts.map +1 -1
  172. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  173. package/types/lib/inventory/cyclonedx20.d.ts +99 -0
  174. package/types/lib/inventory/cyclonedx20.d.ts.map +1 -0
  175. package/types/lib/inventory/cyclonedx20Common.d.ts +102 -0
  176. package/types/lib/inventory/cyclonedx20Common.d.ts.map +1 -0
  177. package/types/lib/inventory/cyclonedx20Derived.d.ts +74 -0
  178. package/types/lib/inventory/cyclonedx20Derived.d.ts.map +1 -0
  179. package/types/lib/inventory/cyclonedx20Parties.d.ts +91 -0
  180. package/types/lib/inventory/cyclonedx20Parties.d.ts.map +1 -0
  181. package/types/lib/inventory/cyclonedx20Read.d.ts +51 -0
  182. package/types/lib/inventory/cyclonedx20Read.d.ts.map +1 -0
  183. package/types/lib/inventory/cyclonedx20ReadCommon.d.ts +69 -0
  184. package/types/lib/inventory/cyclonedx20ReadCommon.d.ts.map +1 -0
  185. package/types/lib/inventory/cyclonedx20ReadComponents.d.ts +77 -0
  186. package/types/lib/inventory/cyclonedx20ReadComponents.d.ts.map +1 -0
  187. package/types/lib/inventory/cyclonedx20ReadContext.d.ts +118 -0
  188. package/types/lib/inventory/cyclonedx20ReadContext.d.ts.map +1 -0
  189. package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts +40 -0
  190. package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts.map +1 -0
  191. package/types/lib/inventory/cyclonedx20ReadSections.d.ts +45 -0
  192. package/types/lib/inventory/cyclonedx20ReadSections.d.ts.map +1 -0
  193. package/types/lib/inventory/cyclonedx20Render.d.ts +53 -0
  194. package/types/lib/inventory/cyclonedx20Render.d.ts.map +1 -0
  195. package/types/lib/inventory/cyclonedx20RenderComponents.d.ts +73 -0
  196. package/types/lib/inventory/cyclonedx20RenderComponents.d.ts.map +1 -0
  197. package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts +29 -0
  198. package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts.map +1 -0
  199. package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts +110 -0
  200. package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts.map +1 -0
  201. package/types/lib/inventory/cyclonedx20RenderHardware.d.ts +42 -0
  202. package/types/lib/inventory/cyclonedx20RenderHardware.d.ts.map +1 -0
  203. package/types/lib/inventory/cyclonedx20RenderPatents.d.ts +26 -0
  204. package/types/lib/inventory/cyclonedx20RenderPatents.d.ts.map +1 -0
  205. package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts +55 -0
  206. package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts.map +1 -0
  207. package/types/lib/inventory/cyclonedx20RenderSections.d.ts +45 -0
  208. package/types/lib/inventory/cyclonedx20RenderSections.d.ts.map +1 -0
  209. package/types/lib/inventory/cyclonedx20Tables.d.ts +134 -0
  210. package/types/lib/inventory/cyclonedx20Tables.d.ts.map +1 -0
  211. package/types/lib/inventory/deps.d.ts +35 -2
  212. package/types/lib/inventory/deps.d.ts.map +1 -1
  213. package/types/lib/inventory/dosai.d.ts +19 -0
  214. package/types/lib/inventory/dosai.d.ts.map +1 -1
  215. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  216. package/types/lib/inventory/dotnetRuntime.d.ts +51 -4
  217. package/types/lib/inventory/dotnetRuntime.d.ts.map +1 -1
  218. package/types/lib/inventory/ecosystemFormulationParsers.d.ts +73 -0
  219. package/types/lib/inventory/ecosystemFormulationParsers.d.ts.map +1 -0
  220. package/types/lib/inventory/envcontext.d.ts +22 -6
  221. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  222. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  223. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  224. package/types/lib/inventory/hbom.d.ts +11 -0
  225. package/types/lib/inventory/hbom.d.ts.map +1 -1
  226. package/types/lib/inventory/hbomLoader.d.ts +54 -0
  227. package/types/lib/inventory/hbomLoader.d.ts.map +1 -1
  228. package/types/lib/inventory/jvmLocalRepos.d.ts +5 -1
  229. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -1
  230. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  231. package/types/lib/inventory/occurrenceKey.d.ts +52 -0
  232. package/types/lib/inventory/occurrenceKey.d.ts.map +1 -0
  233. package/types/lib/inventory/pqcMigration.d.ts +84 -0
  234. package/types/lib/inventory/pqcMigration.d.ts.map +1 -0
  235. package/types/lib/inventory/rustFormulationParser.d.ts +7 -2
  236. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  237. package/types/lib/inventory/scalaCoords.d.ts.map +1 -1
  238. package/types/lib/inventory/scalaDedupe.d.ts +43 -0
  239. package/types/lib/inventory/scalaDedupe.d.ts.map +1 -0
  240. package/types/lib/inventory/source.d.ts +15 -0
  241. package/types/lib/inventory/source.d.ts.map +1 -1
  242. package/types/lib/parsers/huggingfaceManifest.d.ts +10 -1
  243. package/types/lib/parsers/huggingfaceManifest.d.ts.map +1 -1
  244. package/types/lib/parsers/huggingfaceUtils.d.ts +12 -0
  245. package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
  246. package/types/lib/parsers/kiroPermissions.d.ts +62 -0
  247. package/types/lib/parsers/kiroPermissions.d.ts.map +1 -0
  248. package/types/lib/parsers/vscodeExtensionId.d.ts +48 -0
  249. package/types/lib/parsers/vscodeExtensionId.d.ts.map +1 -0
  250. package/types/lib/server/server.d.ts.map +1 -1
  251. package/types/lib/stages/postgen/postgen.d.ts +7 -0
  252. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  253. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  254. package/types/lib/stages/postgen/specVersionCompat.d.ts +25 -0
  255. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  256. package/types/lib/validator/bomValidator.d.ts +5 -1
  257. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  258. package/types/lib/validator/complianceEngine.d.ts +4 -4
  259. package/types/lib/validator/complianceEngine.d.ts.map +1 -1
  260. package/types/lib/validator/complianceRules.d.ts +14 -2
  261. package/types/lib/validator/complianceRules.d.ts.map +1 -1
  262. package/types/lib/validator/index.d.ts +10 -0
  263. package/types/lib/validator/index.d.ts.map +1 -1
  264. package/types/lib/validator/reporters/json.d.ts.map +1 -1
@@ -16,14 +16,27 @@ export declare function isDocumentationJar(jarName: string): boolean;
16
16
  */
17
17
  export declare function collectMvnDependencies(mavenCmd: string, basePath: string, cleanup?: boolean, includeCacheDir?: boolean): Promise<{}>;
18
18
  /**
19
- * Method to collect class names from all jars in a directory
19
+ * Method to collect class names from all jars and Android libraries in a
20
+ * directory
20
21
  *
21
- * @param {string} jarPath Path containing jars
22
+ * @param {string} jarPath Path containing jars, or a single jar or aar file
22
23
  * @param {object} pomPathMap Map containing jar to pom names. Required to successfully parse gradle cache.
23
24
  *
24
25
  * @return object containing jar name and class list
25
26
  */
26
27
  export declare function collectJarNS(jarPath: string, pomPathMap?: object): Promise<{}>;
28
+ /**
29
+ * The jar namespace map entries of components a jar scan produced, in the
30
+ * shape {@link collectJarNS} writes (`{ namespaces: string[] }`), from their
31
+ * `internal:Namespaces` properties. The scan reads each jar from a temporary
32
+ * copy, so no `jarFile` is recorded. Purls `existing` already maps keep the
33
+ * entry they have, which names the jar it was read from.
34
+ *
35
+ * @param {Object[]} components Components with `internal:Namespaces` properties
36
+ * @param {Object} [existing] Jar namespace map already collected
37
+ * @returns {Object} New entries keyed by purl
38
+ */
39
+ export declare function namespaceMappingOfComponents(components: Object[], existing?: Object): Object;
27
40
  /**
28
41
  * Convert a JAR namespace mapping (produced by {@link collectJarNS}) into an array
29
42
  * of CycloneDX package component objects.
@@ -174,6 +187,26 @@ export declare function readZipEntriesMatching(zipFile: string, pathFragment: st
174
187
  * @returns List of classes and sources matching certain known patterns
175
188
  */
176
189
  export declare function getJarClasses(jarFile: string): Promise<any>;
190
+ /**
191
+ * Method to get the classes of an Android library. An `.aar` keeps its code
192
+ * in `classes.jar` at its root and any number of further jars under `libs/`,
193
+ * each of which is read in turn.
194
+ *
195
+ * Each inner jar is unpacked to a temporary file, so in dry run mode, which
196
+ * blocks those writes, an aar yields no classes. An inner jar that declares
197
+ * more than `maxInnerJarBytes` uncompressed is skipped without being
198
+ * decompressed, because the whole entry is held in memory while it is copied.
199
+ *
200
+ * @param {string} aarFile Aar file to read
201
+ * @param {Object} [opts] Options
202
+ * @param {number} [opts.maxInnerJarBytes] Uncompressed size bound for each
203
+ * inner jar. Defaults to 256 MiB.
204
+ *
205
+ * @returns {Promise<string[]>} Sorted class names of every jar inside
206
+ */
207
+ export declare function getAarClasses(aarFile: string, { maxInnerJarBytes }?: {
208
+ maxInnerJarBytes?: number;
209
+ }): Promise<string[]>;
177
210
  /**
178
211
  * Recursively flatten a Python package's transitive dependencies into the
179
212
  * dependencies map and flat package list.
@@ -1 +1 @@
1
- {"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../../lib/inventory/deps.js"],"names":[],"mappings":"AAoCA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAH/B,MAG+B,GAF7B,OAAO,CAInB;AA0DD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,QAAQ,EAPC,MAOD,EACR,QAAQ,EAPC,MAOD,EACR,OAAO,GANE,OAMK,EACd,eAAe,GANN,OAMc,eA6ExB;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAL/B,MAK+B,EAAE,UAAU,GAJ3C,MAIgD,eA4I1D;AAED;;;;;;;;;GASG;AACH,wBAAsB,sBAAsB,CAAC,YAAY,EAH9C,MAG8C,GAF5C,OAAO,CAAC,MAAM,EAAE,CAAC,CAgE7B;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,UAAU,KAAA,GAFzB,MAAM,CAkClB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAHjC,MAGiC,GAF/B,MAAM,CA0BlB;AAgBD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,GAH1C,MAG+C,GAF7C,MAAM,CAsBlB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAJ7B,MAI6B,EAAE,IAAI,EAHnC,MAGmC,GAFjC,MAAM,CAqBlB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAHrC,MAGqC,GAFnC,MAAM,CAiBlB;AACD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAL1C,MAK0C,EAAE,OAAO,AAJ3D,CAEA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,MAQF,EACP,YAAY,EARH,MAQG,EACZ,EAAE,eAAyB,EAAE,aAA+B,EAAE,AAR7D,CAGA,EAFA;IAAsB,eAAe,AAArC,CACA,EADQ,MAAM,CACd;IAAsB,aAAa,AAAnC,CACA,EADQ,MAAM,CACd;CAKkE,GALxD,OAAO,CAAC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC,CAkDxD;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAJhC,MAIgC,gBAqE1C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,aAAa,CACjC,OAAO,EARE,MAQF,EACP,EAAE,gBAA0C,EAAE,AAR7C,CAIA,EAHA;IAAsB,gBAAgB,AAAtC,CAGA,EAHQ,MAAM,CAGd;CAIkD,GAJxC,OAAO,CAAC,MAAM,EAAE,CAAC,CA0D7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,eAAe,EANhC,MAMgC,EAAE,OAAO,EALzC,MAAM,EAKmC,EAAE,cAAc,EAJzD,MAIyD,EAAE,CAAC,EAH5D,MAG4D,GAF1D,IAAI,CAqDhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAJtB,MAAM,GAAC,MAIe,EAAE,CAAC,EAHzB,MAAM,GAAC,MAGkB,GAFvB,MAAM,CAWlB"}
@@ -128,6 +128,25 @@ export declare function dosaiReportFileOmittedSections(reportFile: string): stri
128
128
  * @returns {string[]} The ones cdxgen reads
129
129
  */
130
130
  export declare function dosaiSectionsCdxgenReads(omittedSections: string[]): string[];
131
+ /**
132
+ * Whether an existing dosai methods slice is newer than the sources it
133
+ * describes.
134
+ *
135
+ * A slice written by an earlier scan holds the occurrences of the sources as
136
+ * they were then, so a slice that predates an edit must be regenerated rather
137
+ * than reused: reusing one keeps occurrences of call sites that no longer
138
+ * exist (issue 4675). The slice is fresh only when its mtime is not older
139
+ * than the newest mtime among the files dosai analyses under the directory.
140
+ * A missing slice, a slice whose mtime cannot be read, a source that cannot
141
+ * be stat-ed, and a tree that exceeds the walk bounds all count as stale: the
142
+ * callers regenerate the slice, which is the run a fresh scan pays anyway.
143
+ *
144
+ * @param {string} slicesFile Candidate dosai methods slice
145
+ * @param {string} projectDir Directory dosai analyses
146
+ * @param {Object} [options] Scan options; options.exclude prunes the walk
147
+ * @returns {boolean} True when the slice is newer than every source it describes
148
+ */
149
+ export declare function dosaiSlicesFileIsFresh(slicesFile: string, projectDir: string, options?: Object): boolean;
131
150
  /**
132
151
  * The largest number of distinct method calls cdxgen keeps from one report.
133
152
  *
@@ -1 +1 @@
1
- {"version":3,"file":"dosai.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dosai.js"],"names":[],"mappings":"AA+KA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAL1C,MAAM,GAAC,MAKmC,GAJxC;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAAC,GAAC,SAAS,CAmB9E;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,AAHrD,CACA,EADQ;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAGV,GAF3C,MAAM,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,AAHrD,CACA,EADQ;IAAC,OAAO,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAC,SAAS,CAAC,CAAA;CAGV,GAF3C,MAAM,CAIlB;AAwMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAJpC,MAAM,EAI8B,E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AQ,CAAC,MAAM,CAKwB,EAAE,YAAY,EAJrD,GAAG,CAAC,MAAM,EAAE,MAAM,CAImC,EAAE,QAAQ,AAHvE,CACA,EADQ,MAG+D,GAF7D,MAAM,GAAC,SAAS,CAgB5B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EANnC,MAMmC,EAAE,YAAY,EALjD,GAAG,CAAC,MAAM,EAAE,MAAM,CAK+B,EAAE,QAAQ,AAJnE,CACA,EADQ,MAI2D,GAHzD,MAAM,GAAC,SAAS,CA6B5B"}
@@ -11,8 +11,17 @@ export declare function runtimePackFromDepsJson(depsJson: Object, framework: str
11
11
  rid: string;
12
12
  } | undefined;
13
13
  /**
14
- * The CPE NVD uses for a shared framework version: `.net` from 5.0 on,
15
- * `.net_core` before it, and `asp.net_core` for ASP.NET Core.
14
+ * The CPE NVD uses for a shared framework version, with the version and update
15
+ * fields spelled the way the NVD CPE dictionary spells them.
16
+ *
17
+ * The product is `.net` from 5.0 on, `.net_core` before it, and `asp.net_core`
18
+ * for ASP.NET Core. NVD names a .NET Core x.y.0 release and its pre-releases
19
+ * with two version parts (`.net_core:3.1`, `.net_core:3.0:preview9`), and the
20
+ * .NET 5.0 pre-releases the same way (`.net:5.0:rc1`); every other version
21
+ * keeps three. A release candidate is `rc<N>`, and a preview is
22
+ * `preview.<N>` for .NET 7, 8 and 10 and `preview<N>` otherwise. A release
23
+ * keeps the `*` update, which is the only one NVD lists for some releases. A
24
+ * pre-release of any other kind names no version NVD has, so it gets no CPE.
16
25
  *
17
26
  * @param {string} framework framework directory name
18
27
  * @param {string} version runtime version
@@ -24,14 +33,52 @@ export declare function dotnetCpe(framework: string, version: string): string |
24
33
  *
25
34
  * @param {string} framework framework directory name
26
35
  * @param {{pack: string, version: string, rid: string}} runtime runtime pack
27
- * @param {string} location root-relative path of the deps.json
36
+ * @param {string} [location] root-relative path of the deps.json. A runtime
37
+ * found on the scanning host gets none, since host paths can name the user's
38
+ * home directory.
28
39
  * @returns {Object|undefined} component, or undefined when no purl can be built
29
40
  */
30
41
  export declare function createDotnetRuntimeComponent(framework: string, runtime: {
31
42
  pack: string;
32
43
  version: string;
33
44
  rid: string;
34
- }, location: string): Object | undefined;
45
+ }, location?: string): Object | undefined;
46
+ /**
47
+ * Parse the output of `dotnet --list-runtimes`, one `<framework> <version>
48
+ * [<directory>]` line per installed runtime. Warnings, update notices, blank
49
+ * lines, unknown frameworks and versions of a shape no runtime pack names are
50
+ * left out, and no more than MAX_FRAMEWORKS runtimes are kept.
51
+ *
52
+ * https://learn.microsoft.com/dotnet/core/install/how-to-detect-installed-versions
53
+ *
54
+ * @param {string} output output of `dotnet --list-runtimes`
55
+ * @returns {{framework: string, version: string, frameworkDir: string}[]} one
56
+ * entry per installed runtime
57
+ */
58
+ export declare function parseDotnetListRuntimes(output: string): {
59
+ framework: string;
60
+ version: string;
61
+ frameworkDir: string;
62
+ }[];
63
+ /**
64
+ * Create the platform component for one runtime the host install reports.
65
+ *
66
+ * The identity comes from the deps.json in the runtime's own directory, read
67
+ * with the directory as the root so the read cannot leave it and a symlink is
68
+ * not followed. Only an absolute directory is read, which is what the dotnet
69
+ * host prints. A runtime whose deps.json is missing, unreadable or names
70
+ * another version keeps its name, its version and its CPE, without a purl:
71
+ * without the runtime identifier of the pack there is no correct nuget purl.
72
+ *
73
+ * @param {{framework: string, version: string, frameworkDir: string}} entry
74
+ * one entry of parseDotnetListRuntimes
75
+ * @returns {Object} platform component
76
+ */
77
+ export declare function createHostDotnetRuntimeComponent(entry: {
78
+ framework: string;
79
+ version: string;
80
+ frameworkDir: string;
81
+ }): Object;
35
82
  /**
36
83
  * Find the .NET shared frameworks installed under a root that no package
37
84
  * manager owns, and return one platform component per runtime pack.
@@ -1 +1 @@
1
- {"version":3,"file":"dotnetRuntime.d.ts","sourceRoot":"","sources":["../../../lib/inventory/dotnetRuntime.js"],"names":[],"mappings":"AAgEA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC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AM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAMS,EAAE,QAAQ,AALtE,CAGA,EAHQ,MAK8D,GAF5D,MAAM,GAAC,SAAS,CA8B5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAJnC,MAImC,GAHjC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAC,EAAE,CAiCxE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gCAAgC,CAAC,KAAK,EAJ3C;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAId,GAFzC,MAAM,CA8BlB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAJlC,MAIkC,EAAE,UAAU,AAHtD,CACA,EADQ,MAAM,EAG6C,GAFjD,MAAM,EAAE,CAwDpB"}
@@ -0,0 +1,73 @@
1
+ export declare const MAX_READ_BYTES: number;
2
+ export declare const MAX_ASSETS_READ_BYTES: number;
3
+ /**
4
+ * The path of a build input relative to the scanned project root, with
5
+ * forward slashes, as recorded in bom-refs and `internal:SrcFile`. A file
6
+ * outside the root, or a call without a root, records only its file name,
7
+ * so no path of the scanning machine reaches the BOM.
8
+ *
9
+ * @param {string} filePath file the component describes
10
+ * @param {string} [rootDir] scanned project root
11
+ * @returns {string} project-relative path, or the file name
12
+ */
13
+ export declare function formulationSourcePath(filePath: string, rootDir?: string): string;
14
+ /**
15
+ * Parser for make and CMake build inputs (C/C++ and friends).
16
+ *
17
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
18
+ */
19
+ export declare const makefileFormulationParser: {
20
+ id: string;
21
+ patterns: string[];
22
+ parse(files: string[], options?: Object, context?: {
23
+ rootDir?: string;
24
+ }): {
25
+ components: Object[];
26
+ };
27
+ };
28
+ /**
29
+ * Parser for go.mod build inputs. The compiled binaries are read by the
30
+ * binary/OBOM path through the bounded Go buildinfo reader, not here.
31
+ *
32
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
33
+ */
34
+ export declare const goModuleFormulationParser: {
35
+ id: string;
36
+ patterns: string[];
37
+ parse(files: string[], options?: Object, context?: {
38
+ rootDir?: string;
39
+ }): {
40
+ components: Object[];
41
+ };
42
+ };
43
+ /**
44
+ * Parser for pip requirements and constraints files.
45
+ *
46
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
47
+ */
48
+ export declare const pythonRequirementsFormulationParser: {
49
+ id: string;
50
+ patterns: string[];
51
+ parse(files: string[], options?: Object, context?: {
52
+ rootDir?: string;
53
+ }): {
54
+ components: Object[];
55
+ };
56
+ };
57
+ /**
58
+ * Parser for .NET build inputs: project.assets.json (the file `dotnet
59
+ * restore` writes; some projects call it packages.assets.json) and the
60
+ * SDK-style .csproj project files.
61
+ *
62
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
63
+ */
64
+ export declare const dotnetProjectFormulationParser: {
65
+ id: string;
66
+ patterns: string[];
67
+ parse(files: string[], options?: Object, context?: {
68
+ rootDir?: string;
69
+ }): {
70
+ components: Object[];
71
+ };
72
+ };
73
+ //# sourceMappingURL=ecosystemFormulationParsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecosystemFormulationParsers.d.ts","sourceRoot":"","sources":["../../../lib/inventory/ecosystemFormulationParsers.js"],"names":[],"mappings":"AAiBA,eAAO,MAAM,cAAc,QAAkB,CAAC;AAI9C,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AAOtD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAJnC,MAImC,EAAE,OAAO,AAHp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OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAsBxI,CAAC"}
@@ -33,7 +33,8 @@ export declare function getOriginUrl(dir: string): string | undefined;
33
33
  * @param {string} configKey Git config key
34
34
  * @param {string} dir repo directory
35
35
  *
36
- * @returns Output from git config or undefined
36
+ * @returns {string|undefined} The branch name, or undefined when git fails,
37
+ * for example when the directory is not a git working tree or has no commit
37
38
  */
38
39
  export declare function getBranch(_configKey: any, dir: string): string | undefined;
39
40
  /**
@@ -44,19 +45,28 @@ export declare function getBranch(_configKey: any, dir: string): string | undefi
44
45
  */
45
46
  export declare function gitTreeHashes(dir: string): {};
46
47
  /**
47
- * Retrieves the files list from git
48
- * @param {string} dir repo directory
48
+ * Retrieves the files git tracks under a directory at HEAD. Only the
49
+ * directory's own subtree is listed, with names relative to it, so a scan of
50
+ * one directory of a larger repository does not record the rest of that
51
+ * repository.
49
52
  *
50
- * @returns Output from git config or undefined
53
+ * @param {string} dir directory inside a git working tree
54
+ *
55
+ * @returns {Object[]} files with their blob hash, name, OmniBOR id and SWHID;
56
+ * empty when git fails, for example when the directory is not a git working
57
+ * tree or has no commit
51
58
  */
52
- export declare function listFiles(dir: string): any[];
59
+ export declare function listFiles(dir: string): Object[];
53
60
  /**
54
61
  * Execute a git command
55
62
  *
56
63
  * @param {string} dir Repo directory
57
64
  * @param {Array} args arguments to git command
58
65
  *
59
- * @returns Output from the git command
66
+ * @returns {string|undefined} git's standard output, or undefined when git
67
+ * could not run or exited with a non-zero status. Text git writes to standard
68
+ * error, including warnings of a successful command, is never part of the
69
+ * result.
60
70
  */
61
71
  export declare function execGitCommand(dir: string, args: any[]): string | undefined;
62
72
  /**
@@ -102,6 +112,12 @@ export declare function collectJavaInfo(dir: string): {
102
112
  /**
103
113
  * Collect dotnet version
104
114
  *
115
+ * `version` is the version `dotnet --version` prints, which is the SDK's. .NET
116
+ * advisories name runtime versions, so the component itself carries no purl
117
+ * and no CPE. Each shared framework `dotnet --list-runtimes` reports is a
118
+ * nested component built by createHostDotnetRuntimeComponent, without a
119
+ * bom-ref like the other toolchains.
120
+ *
105
121
  * @param {string} dir Working directory
106
122
  * @returns Object containing dotnet details
107
123
  */
@@ -1 +1 @@
1
- {"version":3,"file":"envcontext.d.ts","sourceRoot":"","sources":["../../../lib/inventory/envcontext.js"],"names":[],"mappings":"AAkEA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAE4D,CAAC;AAwDvE;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,wBAkBpC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAL3B,MAK2B,EAAE,GAAG,EAJhC,MAIgC,sBAE1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAJrB,MAIqB,sBAE/B;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,UAAU,KAAA,EAAE,GAAG,EAJ9B,MAI8B,sBAExC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAJtB,MAIsB,MAkBhC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAJlB,MAIkB,SA4B5B;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB,EAAE,IAAI,OAAA,sBAiBvC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EALtB,MAKsB,EAAE,QAAQ,GAJhC,MAIqC,GAFnC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC,CA+BhD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EALvB,MAKuB,EAAE,QAAQ,GAJjC,MAIsC,GAFpC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CA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AAO,EAX5C,MAW4C,EAAE,OAAO,AAT7D,CAIA,EAJQ,MAS0D,GALxD;IAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAwO7D"}
1
+ {"version":3,"file":"formulationParsers.d.ts","sourceRoot":"","sources":["../../../lib/inventory/formulationParsers.js"],"names":[],"mappings":"AA6HA;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAF1B;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,WAAU;CAEvB,QAkBpC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAFb,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,WAAU;CAAE,CAAC,CAItE;AAqGD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAZnC,MAYmC,EAAE,OAAO,EAX5C,MAW4C,EAAE,OAAO,AAT7D,CAIA,EAJQ,MAS0D,GALxD;IAAE,WAAW,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CA8P7D"}
@@ -48,6 +48,17 @@ export declare function normalizeHbomOptions(options?: object): object;
48
48
  * @returns {Object} The same BOM with refreshed analysis properties
49
49
  */
50
50
  export declare function addHbomAnalysisProperties(bomJson: Object): Object;
51
+ /**
52
+ * The 1.x-shaped model of a collector result. cdxgen asks the collector for
53
+ * 1.7; a collector that still answers with a CycloneDX 2.0 document (a
54
+ * `specFormat`, or specVersion 2.0) is read with readCycloneDx20, so the
55
+ * 1.x pipeline that follows never mistakes it for a 1.x BOM and loses its
56
+ * inventories.
57
+ *
58
+ * @param {object} collected What collectHardware returned
59
+ * @returns {object} The 1.x-shaped HBOM
60
+ */
61
+ export declare function toInternalHbom(collected: object): object;
51
62
  /**
52
63
  * Generate an HBOM using the optional cdx-hbom package.
53
64
  *
@@ -1 +1 @@
1
- {"version":3,"file":"hbom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbom.js"],"names":[],"mappings":"AAiWA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAHpC,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAGU,GAFlC,OAAO,CAMnB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAHxC,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAGc,GAFtC,OAAO,CAUnB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAF/C,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAEqB,QAgBzD;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAF/C,MAAM,GAAC,MAAM,GAAC,SAAS,GAAC,IAEuB,QAOzD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,AAH7C,CACA,EADQ,MAG0C,EAAE,WAAW,AAF/D,CACF,EADU,MAEgE,QAmB1E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,AAHzC,CACA,EADQ,MAGsC,GAFpC,MAAM,CA8BlB;AA8GD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAHtC,MAGsC,GAFpC,MAAM,CA8HlB;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,OAAO,CAAC,MAAM,CAAC,CAiC3B"}
1
+ {"version":3,"file":"hbom.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbom.js"],"names":[],"mappings":"AAoWA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAHpC,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAGU,GAFlC,OAAO,CAMnB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAHxC,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAGc,GAFtC,OAAO,CAUnB;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAF/C,MAAM,GAAC,MAAM,EAAE,GAAC,SAAS,GAAC,IAEqB,QAgBzD;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,WAAW,EAF/C,MAAM,GAAC,MAAM,GAAC,SAAS,GAAC,IAEuB,QAQzD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,AAH7C,CACA,EADQ,MAG0C,EAAE,WAAW,AAF/D,CACF,EADU,MAEgE,QAmB1E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,AAHzC,CACA,EADQ,MAGsC,GAFpC,MAAM,CAkClB;AA8GD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAHtC,MAGsC,GAFpC,MAAM,CA8HlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAH7B,MAG6B,GAF3B,MAAM,CAsBlB;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,OAAO,CAAC,MAAM,CAAC,CAgC3B"}
@@ -1,7 +1,61 @@
1
+ /**
2
+ * The places cdx-hbom is loaded from, in order: a local checkout next to
3
+ * cdxgen, else the installed package.
4
+ */
5
+ export declare const HBOM_MODULE_LOCATIONS: Readonly<{
6
+ localModulePath: any;
7
+ localMapperPath: any;
8
+ packageMapperSpecifier: "@cdxgen/cdx-hbom/cdx20";
9
+ }>;
1
10
  /**
2
11
  * Resolve the optional cdx-hbom module.
3
12
  *
4
13
  * @returns {Promise<object>} Loaded cdx-hbom module namespace.
5
14
  */
6
15
  export declare function importHbomModule(): Promise<object>;
16
+ /**
17
+ * Load the optional CycloneDX 2.0 hardware mapper,
18
+ * `toCdx20HardwareComponent`, from the same cdx-hbom that importHbomModule
19
+ * loads: the local checkout when it exists (its src/common/cdx20.js), else
20
+ * the installed package's `./cdx20` export. A cdx-hbom without the mapper
21
+ * (the published 0.7.0 has no `./cdx20` export) or one that fails to load
22
+ * gives null, and the 2.0 render then keeps its generic conversion.
23
+ *
24
+ * @param {object} [locations] Where to look; defaults to
25
+ * HBOM_MODULE_LOCATIONS
26
+ * @returns {Promise<Function|null>} The mapper, or null
27
+ */
28
+ export declare function loadHardwareMapper(locations?: object): Promise<Function | null>;
29
+ /** The identifier policy cdx-hbom records when raw identifiers were kept. */
30
+ export declare const RAW_IDENTIFIER_POLICY = "raw-identifiers-enabled";
31
+ /**
32
+ * The identifier policy the collector recorded for the run, on the HBOM
33
+ * subject (`metadata.component`) or in `metadata.properties`.
34
+ *
35
+ * @param {object} internalBom The 1.x-shaped internal model
36
+ * @returns {string|undefined} The `cdx:hbom:identifierPolicy` value
37
+ */
38
+ export declare function recordedIdentifierPolicy(internalBom: object): string | undefined;
39
+ /**
40
+ * The renderCycloneDx20 context for an internal model: the hardware mapper
41
+ * and its identifier options when the model has a component with a
42
+ * cdx:hbom:* property and a mapper is available, otherwise an empty context,
43
+ * so a BOM without hardware never loads cdx-hbom. Hardware identifiers are
44
+ * asserted only when the collector recorded `raw-identifiers-enabled` for the
45
+ * run (it does when HBOM generation was asked to include sensitive
46
+ * identifiers); a redacted run never yields identifiers, whichever command
47
+ * renders it.
48
+ *
49
+ * @param {object} internalBom The 1.x-shaped internal model
50
+ * @param {object} [locations] Passed to loadHardwareMapper
51
+ * @returns {Promise<{hardwareMapper?: Function, hardwareOptions?: {includeSensitiveIdentifiers: boolean, identifierPolicy?: string}}>}
52
+ * The render context
53
+ */
54
+ export declare function hardwareRenderContext(internalBom: object, locations?: object): Promise<{
55
+ hardwareMapper?: Function;
56
+ hardwareOptions?: {
57
+ includeSensitiveIdentifiers: boolean;
58
+ identifierPolicy?: string;
59
+ };
60
+ }>;
7
61
  //# sourceMappingURL=hbomLoader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hbomLoader.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbomLoader.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAAsB,gBAAgB,IAFzB,OAAO,CAAC,MAAM,CAAC,CAqB3B"}
1
+ {"version":3,"file":"hbomLoader.d.ts","sourceRoot":"","sources":["../../../lib/inventory/hbomLoader.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;EAIhC,CAAC;AAEH;;;;GAIG;AACH,wBAAsB,gBAAgB,IAFzB,OAAO,CAAC,MAAM,CAAC,CAqB3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CAAC,SAAS,AAJ/C,CAEA,EAFQ,MAI+D,GAF7D,OAAO,CAAC,WAAS,IAAI,CAAC,CA2BlC;AAgCD,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,4BAA4B,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAHzC,MAGyC,GAFvC,MAAM,GAAC,SAAS,CAe5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAL5C,MAK4C,EAAE,SAAS,AAJ/D,CACA,EADQ,MAIuD,GAHrD,OAAO,CAAC;IAAC,cAAc,CAAC,WAAW;IAAC,eAAe,CAAC,EAAE;QAAC,2BAA2B,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC,CAAA;CAAC,CAAC,CAmBrI"}
@@ -84,7 +84,11 @@ export declare function coursierCacheDir(): string | undefined;
84
84
  */
85
85
  export declare function coursierPrefixToUrl(parts: string[]): string | null;
86
86
  /**
87
- * Locate a Maven coordinate's directory in the Coursier cache.
87
+ * Locate a Maven coordinate's directory in the Coursier cache. Coursier
88
+ * leaves an empty version directory behind in every repository it asked and
89
+ * missed, so a directory counts only when it holds the artifact's jar or POM;
90
+ * otherwise a project's own module would be credited to whichever repository
91
+ * the build happened to probe first.
88
92
  *
89
93
  * @param {string} group Maven groupId.
90
94
  * @param {string} name Maven artifactId, including any Scala suffix.
@@ -1 +1 @@
1
- {"version":3,"file":"jvmLocalRepos.d.ts","sourceRoot":"","sources":["../../../lib/inventory/jvmLocalRepos.js"],"names":[],"mappings":"AA2CA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAF1B,IAAI,CAShB;AAuDD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAH7C,MAG6C,GAF3C,MAAM,GAAC,SAAS,CAkC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAAM,EAIiB,EAAE,OAAO,AAHxC,CACA,EADQ,MAGgD,GAF9C;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAC,CA8BvD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAJnC,MAImC,EAAE,EAAE,UAAkB,EAAE,AAHnE,CACA,EADQ;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAG2C,GAF9D;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,aAAa,GAAC,eAAe,CAAA;CAAC,CAuB5F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,UAAU,EAAE,AAJlD,CAEA,EADA;IAAsB,UAAU,AAAhC,CACA,EADQ,MAAM,CACd;CAEuD,GAF7C,MAAM,EAAE,CAuDpB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAFnB,MAAM,EAAE,CAqBpB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAFnB,MAAM,GAAC,SAAS,CAsB5B;AAiDD;;;;;GAKG;AACH,wBA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,GAFzC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAmD1H;AAiHD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAHpC,MAGoC,GAFlC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAqBzH"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"AAmxBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAFlB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAiD9H,CAAC"}
1
+ {"version":3,"file":"mcpConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/mcpConfigParser.js"],"names":[],"mappings":"AAwxBA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAFlB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAiD9H,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The key of a place in a purl's occurrence set (`purlLocationMap`).
3
+ *
4
+ * Every location that enters an occurrence set is keyed by this function,
5
+ * whatever evidence source added it: the seeding from the input BOM
6
+ * (`initFromSbom`), the atom `usages` and `callsites` slices, the golem, rusi,
7
+ * kosi, dosai and scalasem reports, the C include attribution and the Swift
8
+ * semantics slices. Backslashes become `/`, so a place spelled with `\` in the
9
+ * input BOM (Windows cdxgen output) and `/` in a slice is one occurrence, not
10
+ * two (issue 4726). The path is otherwise left as spelled: no resolving, no
11
+ * case folding, no stripping of a leading `./`.
12
+ *
13
+ * A place a line already names is keyed `file#line`; a place a callsites
14
+ * record names down to its column (counted from 0, as atom writes it) is keyed
15
+ * `file:line:offset`, so two use
16
+ * sites on one line are two occurrences. An occurrence with only `location`
17
+ * and `line` names the line as a whole: it is the same place as any use site
18
+ * that line carries, and it is kept as an occurrence of its own only while no
19
+ * `file:line:offset` key of that line exists (the writer drops the line-only
20
+ * key then, see `dropSubsumedOccurrenceKeys`). That rule is what keeps a
21
+ * re-run of evinse over its own output at the same occurrences: the first run
22
+ * writes the `file:line:offset` keys, and the second run seeds and re-adds
23
+ * exactly those.
24
+ *
25
+ * @param {string} location File path or other location text
26
+ * @param {number} [line] Line number; not a positive number means the location names no line
27
+ * @param {number} [offset] Column within the line, counted from 0 as atom writes it; a value that is not an integer of 0 or more (atom writes -1 for an unknown column) means the place is the line
28
+ * @returns {string|undefined} Key in the `file:line:offset`, `file#line` or plain `file` shape; undefined when the location is empty
29
+ */
30
+ export declare function occurrenceLocationKey(location: string, line?: number, offset?: number): string | undefined;
31
+ /**
32
+ * Drop the occurrence keys a use-site key subsumes.
33
+ *
34
+ * A `file:line:offset` key names a use site on a line; the line-only
35
+ * `file#line` key of the same line names no place of its own any more, so it
36
+ * is removed rather than counted beside the use sites (issue 4726: an
37
+ * occurrence seeded from an input BOM with only `location` and `line` is the
38
+ * same place as a callsites occurrence at that line).
39
+ *
40
+ * @param {string[]} keys Occurrence-set keys
41
+ * @returns {string[]} The keys without the subsumed line-only entries
42
+ */
43
+ export declare function dropSubsumedOccurrenceKeys(keys: string[]): string[];
44
+ /**
45
+ * The location part of an occurrence-set key: `src/a.js` for `src/a.js#3`,
46
+ * `src/a.js:3:14` and `src/a.js` alike.
47
+ *
48
+ * @param {string} key Key made by `occurrenceLocationKey`
49
+ * @returns {string} The location the key names
50
+ */
51
+ export declare function occurrenceKeyLocation(key: string): string;
52
+ //# sourceMappingURL=occurrenceKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"occurrenceKey.d.ts","sourceRoot":"","sources":["../../../lib/inventory/occurrenceKey.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EALnC,MAKmC,EAAE,IAAI,AAJjD,CACA,EADQ,MAIyC,EAAE,MAAM,AAHzD,CACA,EADQ,MAGiD,GAF/C,MAAM,GAAC,SAAS,CAa5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAHpC,MAAM,EAG8B,GAFlC,MAAM,EAAE,CAiBpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAH9B,MAG8B,GAF5B,MAAM,CAalB"}