@cdxgen/cdxgen 13.1.0 → 13.3.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 (283) hide show
  1. package/README.md +32 -15
  2. package/bin/cdxgen.js +243 -122
  3. package/bin/evinse.js +7 -0
  4. package/bin/sign.js +88 -14
  5. package/bin/tracebom.js +64 -4
  6. package/bin/validate.js +29 -7
  7. package/bin/verify.js +79 -39
  8. package/data/crypto-oid.json +88 -12
  9. package/data/remediations.json +47 -0
  10. package/data/rules/ai-bom.yaml +78 -0
  11. package/data/rules/cargo-rust.yaml +132 -0
  12. package/data/rules/mcp-servers.yaml +122 -0
  13. package/lib/audit/targets.js +6 -1
  14. package/lib/cli/bomAssembly.js +117 -15
  15. package/lib/cli/cliOptions.js +93 -1
  16. package/lib/cli/index.js +235 -5
  17. package/lib/cli/jsBom.js +108 -26
  18. package/lib/cli/jvmBom.js +68 -12
  19. package/lib/cli/managedBom.js +264 -41
  20. package/lib/cli/nativeBom.js +923 -15
  21. package/lib/core/activity.js +120 -2
  22. package/lib/core/env.js +44 -7
  23. package/lib/core/fs.js +174 -6
  24. package/lib/core/metadataProperties.js +97 -0
  25. package/lib/core/projectConfig.js +31 -4
  26. package/lib/core/userAgent.js +151 -0
  27. package/lib/ecosystems/bunutils.js +269 -101
  28. package/lib/ecosystems/cargoCache.js +364 -0
  29. package/lib/ecosystems/caxa.js +447 -7
  30. package/lib/ecosystems/cmakeResolver.js +66 -0
  31. package/lib/ecosystems/cppEvidence.js +104 -33
  32. package/lib/ecosystems/ecosystems.js +260 -99
  33. package/lib/ecosystems/golem.js +11 -1
  34. package/lib/ecosystems/gradleutils.js +185 -9
  35. package/lib/ecosystems/jsEvidence.js +19 -20
  36. package/lib/ecosystems/kosi.js +1263 -0
  37. package/lib/ecosystems/npmutils.js +110 -9
  38. package/lib/ecosystems/parsers-crystal.js +179 -0
  39. package/lib/ecosystems/parsers-dotnet.js +120 -49
  40. package/lib/ecosystems/parsers-elm.js +816 -0
  41. package/lib/ecosystems/parsers-gleam.js +1 -1
  42. package/lib/ecosystems/parsers-go.js +47 -9
  43. package/lib/ecosystems/parsers-js.js +171 -50
  44. package/lib/ecosystems/parsers-julia.js +268 -0
  45. package/lib/ecosystems/parsers-lua.js +218 -0
  46. package/lib/ecosystems/parsers-misc.js +919 -161
  47. package/lib/ecosystems/parsers-nim.js +221 -0
  48. package/lib/ecosystems/parsers-opam.js +180 -0
  49. package/lib/ecosystems/parsers-perl.js +277 -0
  50. package/lib/ecosystems/parsers-python.js +27 -15
  51. package/lib/ecosystems/parsers-r.js +148 -0
  52. package/lib/ecosystems/parsers-rebar.js +411 -0
  53. package/lib/ecosystems/parsers-rust.js +954 -33
  54. package/lib/ecosystems/parsers-spack.js +204 -0
  55. package/lib/ecosystems/parsers-stack.js +264 -0
  56. package/lib/ecosystems/parsers-terraform.js +194 -0
  57. package/lib/ecosystems/rubyutils.js +1426 -166
  58. package/lib/ecosystems/rusi.js +158 -7
  59. package/lib/evinser/evinser.js +547 -129
  60. package/lib/evinser/swiftsem.js +1914 -302
  61. package/lib/helpers/agenticToolutils.js +925 -0
  62. package/lib/helpers/bomSigner.js +652 -221
  63. package/lib/inventory/agentFormulationParser.js +57 -4
  64. package/lib/inventory/aiCollector.js +504 -10
  65. package/lib/inventory/aiInventory.js +12 -0
  66. package/lib/inventory/analyzer.js +488 -30
  67. package/lib/inventory/astWorker.js +6 -0
  68. package/lib/inventory/atomUtils.js +568 -31
  69. package/lib/inventory/auditCategories.js +8 -0
  70. package/lib/inventory/cbomutils.js +30 -0
  71. package/lib/inventory/cdxrs.js +110 -14
  72. package/lib/inventory/communityAiConfigParser.js +215 -2
  73. package/lib/inventory/depsUtils.js +183 -11
  74. package/lib/inventory/display.js +4 -5
  75. package/lib/inventory/dosai.js +627 -13
  76. package/lib/inventory/dynamic.js +39 -1
  77. package/lib/inventory/envcontext.js +9 -6
  78. package/lib/inventory/evidenceUtils.js +26 -5
  79. package/lib/inventory/fetchBatch.js +190 -19
  80. package/lib/inventory/fetchRate.js +74 -11
  81. package/lib/inventory/forgeEnricher.js +3 -2
  82. package/lib/inventory/jvmToolEnv.js +6 -5
  83. package/lib/inventory/mcpConfigParser.js +166 -2
  84. package/lib/inventory/mcpDiscovery.js +11 -0
  85. package/lib/inventory/mcpServerManifest.js +389 -0
  86. package/lib/inventory/mcpbBundle.js +419 -0
  87. package/lib/inventory/plugins.js +3 -0
  88. package/lib/inventory/protobom.js +62 -89
  89. package/lib/inventory/protobomLoader.js +4 -0
  90. package/lib/inventory/purl.js +152 -3
  91. package/lib/inventory/rustFormulationParser.js +1 -1
  92. package/lib/inventory/sbomDocument.js +2 -70
  93. package/lib/inventory/source.js +47 -23
  94. package/lib/inventory/stylePackageRefs.js +41 -0
  95. package/lib/inventory/svelteUtils.js +524 -0
  96. package/lib/inventory/traceRunner.js +210 -21
  97. package/lib/managers/binary.js +115 -24
  98. package/lib/managers/docker.js +440 -20
  99. package/lib/managers/oci.js +39 -1
  100. package/lib/parsers/cmakeLists.js +452 -0
  101. package/lib/parsers/huggingfaceUtils.js +15 -7
  102. package/lib/parsers/largeJson.js +454 -0
  103. package/lib/parsers/npmrc.js +19 -1
  104. package/lib/parsers/onnx.js +294 -0
  105. package/lib/parsers/safetensors.js +114 -0
  106. package/lib/stages/postgen/introspection/markers.js +29 -6
  107. package/lib/stages/postgen/postgen.js +237 -16
  108. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
  109. package/lib/validator/bomValidator.js +6 -16
  110. package/lib/validator/index.js +48 -10
  111. package/lib/validator/reporters/console.js +3 -0
  112. package/lib/validator/reporters/json.js +1 -0
  113. package/lib/validator/reporters/sarif.js +7 -0
  114. package/package.json +27 -27
  115. package/types/lib/audit/targets.d.ts.map +1 -1
  116. package/types/lib/cli/bomAssembly.d.ts +2 -1
  117. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  118. package/types/lib/cli/cliOptions.d.ts +33 -1
  119. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  120. package/types/lib/cli/index.d.ts +2 -2
  121. package/types/lib/cli/index.d.ts.map +1 -1
  122. package/types/lib/cli/jsBom.d.ts +23 -0
  123. package/types/lib/cli/jsBom.d.ts.map +1 -1
  124. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  125. package/types/lib/cli/managedBom.d.ts +33 -0
  126. package/types/lib/cli/managedBom.d.ts.map +1 -1
  127. package/types/lib/cli/nativeBom.d.ts +88 -8
  128. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  129. package/types/lib/core/activity.d.ts.map +1 -1
  130. package/types/lib/core/env.d.ts +21 -0
  131. package/types/lib/core/env.d.ts.map +1 -1
  132. package/types/lib/core/fs.d.ts +55 -0
  133. package/types/lib/core/fs.d.ts.map +1 -1
  134. package/types/lib/core/metadataProperties.d.ts +39 -0
  135. package/types/lib/core/metadataProperties.d.ts.map +1 -0
  136. package/types/lib/core/projectConfig.d.ts +6 -2
  137. package/types/lib/core/projectConfig.d.ts.map +1 -1
  138. package/types/lib/core/userAgent.d.ts +56 -0
  139. package/types/lib/core/userAgent.d.ts.map +1 -0
  140. package/types/lib/ecosystems/bunutils.d.ts +12 -5
  141. package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
  142. package/types/lib/ecosystems/cargoCache.d.ts +75 -0
  143. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -0
  144. package/types/lib/ecosystems/caxa.d.ts +14 -0
  145. package/types/lib/ecosystems/caxa.d.ts.map +1 -1
  146. package/types/lib/ecosystems/cmakeResolver.d.ts +23 -0
  147. package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
  148. package/types/lib/ecosystems/cppEvidence.d.ts +2 -2
  149. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  150. package/types/lib/ecosystems/ecosystems.d.ts +15 -1
  151. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  152. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  153. package/types/lib/ecosystems/gradleutils.d.ts +40 -4
  154. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  155. package/types/lib/ecosystems/jsEvidence.d.ts +5 -2
  156. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  157. package/types/lib/ecosystems/kosi.d.ts +86 -0
  158. package/types/lib/ecosystems/kosi.d.ts.map +1 -0
  159. package/types/lib/ecosystems/npmutils.d.ts +42 -0
  160. package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
  161. package/types/lib/ecosystems/parsers-crystal.d.ts +27 -0
  162. package/types/lib/ecosystems/parsers-crystal.d.ts.map +1 -0
  163. package/types/lib/ecosystems/parsers-dotnet.d.ts +19 -0
  164. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  165. package/types/lib/ecosystems/parsers-elm.d.ts +79 -0
  166. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -0
  167. package/types/lib/ecosystems/parsers-go.d.ts +10 -0
  168. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  169. package/types/lib/ecosystems/parsers-js.d.ts +10 -4
  170. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  171. package/types/lib/ecosystems/parsers-julia.d.ts +57 -0
  172. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -0
  173. package/types/lib/ecosystems/parsers-lua.d.ts +50 -0
  174. package/types/lib/ecosystems/parsers-lua.d.ts.map +1 -0
  175. package/types/lib/ecosystems/parsers-misc.d.ts +90 -3
  176. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  177. package/types/lib/ecosystems/parsers-nim.d.ts +43 -0
  178. package/types/lib/ecosystems/parsers-nim.d.ts.map +1 -0
  179. package/types/lib/ecosystems/parsers-opam.d.ts +31 -0
  180. package/types/lib/ecosystems/parsers-opam.d.ts.map +1 -0
  181. package/types/lib/ecosystems/parsers-perl.d.ts +36 -0
  182. package/types/lib/ecosystems/parsers-perl.d.ts.map +1 -0
  183. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  184. package/types/lib/ecosystems/parsers-r.d.ts +35 -0
  185. package/types/lib/ecosystems/parsers-r.d.ts.map +1 -0
  186. package/types/lib/ecosystems/parsers-rebar.d.ts +42 -0
  187. package/types/lib/ecosystems/parsers-rebar.d.ts.map +1 -0
  188. package/types/lib/ecosystems/parsers-rust.d.ts +199 -0
  189. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  190. package/types/lib/ecosystems/parsers-spack.d.ts +33 -0
  191. package/types/lib/ecosystems/parsers-spack.d.ts.map +1 -0
  192. package/types/lib/ecosystems/parsers-stack.d.ts +35 -0
  193. package/types/lib/ecosystems/parsers-stack.d.ts.map +1 -0
  194. package/types/lib/ecosystems/parsers-terraform.d.ts +34 -0
  195. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -0
  196. package/types/lib/ecosystems/pythonutils.d.ts +1 -1
  197. package/types/lib/ecosystems/rubyutils.d.ts +143 -2
  198. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  199. package/types/lib/ecosystems/rusi.d.ts +13 -0
  200. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  201. package/types/lib/evinser/evinser.d.ts +81 -2
  202. package/types/lib/evinser/evinser.d.ts.map +1 -1
  203. package/types/lib/evinser/swiftsem.d.ts +280 -15
  204. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  205. package/types/lib/helpers/agenticToolutils.d.ts +87 -0
  206. package/types/lib/helpers/agenticToolutils.d.ts.map +1 -0
  207. package/types/lib/helpers/bomSigner.d.ts +106 -13
  208. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  209. package/types/lib/inventory/agentFormulationParser.d.ts.map +1 -1
  210. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  211. package/types/lib/inventory/aiInventory.d.ts.map +1 -1
  212. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  213. package/types/lib/inventory/atomUtils.d.ts +145 -3
  214. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  215. package/types/lib/inventory/auditCategories.d.ts +4 -0
  216. package/types/lib/inventory/auditCategories.d.ts.map +1 -1
  217. package/types/lib/inventory/cbomutils.d.ts.map +1 -1
  218. package/types/lib/inventory/cdxrs.d.ts +8 -3
  219. package/types/lib/inventory/cdxrs.d.ts.map +1 -1
  220. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  221. package/types/lib/inventory/depsUtils.d.ts +15 -0
  222. package/types/lib/inventory/depsUtils.d.ts.map +1 -1
  223. package/types/lib/inventory/display.d.ts.map +1 -1
  224. package/types/lib/inventory/dosai.d.ts +87 -1
  225. package/types/lib/inventory/dosai.d.ts.map +1 -1
  226. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  227. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  228. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  229. package/types/lib/inventory/fetchBatch.d.ts +34 -0
  230. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  231. package/types/lib/inventory/fetchRate.d.ts +9 -6
  232. package/types/lib/inventory/fetchRate.d.ts.map +1 -1
  233. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  234. package/types/lib/inventory/jvmToolEnv.d.ts +5 -4
  235. package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -1
  236. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  237. package/types/lib/inventory/mcpDiscovery.d.ts.map +1 -1
  238. package/types/lib/inventory/mcpServerManifest.d.ts +19 -0
  239. package/types/lib/inventory/mcpServerManifest.d.ts.map +1 -0
  240. package/types/lib/inventory/mcpbBundle.d.ts +19 -0
  241. package/types/lib/inventory/mcpbBundle.d.ts.map +1 -0
  242. package/types/lib/inventory/plugins.d.ts.map +1 -1
  243. package/types/lib/inventory/protobom.d.ts +18 -13
  244. package/types/lib/inventory/protobom.d.ts.map +1 -1
  245. package/types/lib/inventory/protobomLoader.d.ts.map +1 -1
  246. package/types/lib/inventory/purl.d.ts +71 -2
  247. package/types/lib/inventory/purl.d.ts.map +1 -1
  248. package/types/lib/inventory/sbomDocument.d.ts.map +1 -1
  249. package/types/lib/inventory/source.d.ts.map +1 -1
  250. package/types/lib/inventory/stylePackageRefs.d.ts +17 -0
  251. package/types/lib/inventory/stylePackageRefs.d.ts.map +1 -0
  252. package/types/lib/inventory/svelteUtils.d.ts +124 -0
  253. package/types/lib/inventory/svelteUtils.d.ts.map +1 -0
  254. package/types/lib/inventory/traceRunner.d.ts +47 -1
  255. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  256. package/types/lib/managers/binary.d.ts +30 -1
  257. package/types/lib/managers/binary.d.ts.map +1 -1
  258. package/types/lib/managers/docker.d.ts +29 -0
  259. package/types/lib/managers/docker.d.ts.map +1 -1
  260. package/types/lib/managers/oci.d.ts +14 -0
  261. package/types/lib/managers/oci.d.ts.map +1 -1
  262. package/types/lib/parsers/cmakeLists.d.ts +76 -0
  263. package/types/lib/parsers/cmakeLists.d.ts.map +1 -0
  264. package/types/lib/parsers/huggingfaceUtils.d.ts +8 -1
  265. package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
  266. package/types/lib/parsers/largeJson.d.ts +52 -0
  267. package/types/lib/parsers/largeJson.d.ts.map +1 -0
  268. package/types/lib/parsers/npmrc.d.ts +5 -0
  269. package/types/lib/parsers/npmrc.d.ts.map +1 -1
  270. package/types/lib/parsers/onnx.d.ts +28 -0
  271. package/types/lib/parsers/onnx.d.ts.map +1 -0
  272. package/types/lib/parsers/safetensors.d.ts +22 -0
  273. package/types/lib/parsers/safetensors.d.ts.map +1 -0
  274. package/types/lib/stages/postgen/introspection/markers.d.ts +3 -2
  275. package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -1
  276. package/types/lib/stages/postgen/postgen.d.ts +33 -0
  277. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  278. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  279. package/types/lib/validator/index.d.ts +10 -1
  280. package/types/lib/validator/index.d.ts.map +1 -1
  281. package/types/lib/validator/reporters/console.d.ts.map +1 -1
  282. package/types/lib/validator/reporters/json.d.ts.map +1 -1
  283. package/types/lib/validator/reporters/sarif.d.ts.map +1 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The spellings under which a config file may list custom metadata
3
+ * properties: those of the `--metadata-property` flag, and the plural that
4
+ * the CDXGEN_METADATA_PROPERTIES environment variable maps to.
5
+ */
6
+ export declare const METADATA_PROPERTY_CONFIG_KEYS: string[];
7
+ /**
8
+ * Report whether a property name belongs to a namespace cdxgen reserves for
9
+ * the facts it establishes itself, such as `cdx:bom:componentSrcFiles`.
10
+ *
11
+ * @param {string} name Property name
12
+ * @returns {boolean} true for a reserved name
13
+ */
14
+ export declare function isReservedMetadataPropertyName(name: string): boolean;
15
+ /**
16
+ * Normalize user-supplied metadata properties into `[{name, value}]`
17
+ * (discussion 4391).
18
+ *
19
+ * Accepted shapes:
20
+ * - a `name=value` string, or a JSON document holding any of the shapes below
21
+ * — an environment variable
22
+ * - an array of `name=value` strings or `{name, value}` objects — the
23
+ * `--metadata-property` flag and a JSON config file
24
+ * - a plain object mapping a name to a value, or to a list of values for a
25
+ * property that repeats — a JSON document or a YAML config file
26
+ *
27
+ * Values must be strings, numbers, or booleans. An entry without a name, a
28
+ * `name=value` string without a separator, and an empty or structured value
29
+ * are dropped rather than guessed at: a property with a mangled name or an
30
+ * `[object Object]` value is worse than none.
31
+ *
32
+ * @param {unknown} input Properties in any accepted shape
33
+ * @returns {{name: string, value: string}[]} Normalized properties
34
+ */
35
+ export declare function parseMetadataProperties(input: unknown): {
36
+ name: string;
37
+ value: string;
38
+ }[];
39
+ //# sourceMappingURL=metadataProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadataProperties.d.ts","sourceRoot":"","sources":["../../../lib/core/metadataProperties.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,UAKzC,CAAC;AAMF;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAHxC,MAGwC,GAFtC,OAAO,CAMnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAHlC,OAGkC,GAFhC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAAE,CAiD3C"}
@@ -9,15 +9,19 @@ export declare const PROJECT_CONFIG_FILENAMES: string[];
9
9
  * whenever that tree is. Path options are therefore confined to the config's
10
10
  * own directory - a scanned project may choose where in itself the BOM lands,
11
11
  * but not write outside it - and options that redirect data off the host or
12
- * widen what cdxgen executes are announced on the console.
12
+ * widen what cdxgen executes are announced on the console. A project may
13
+ * describe itself with custom metadata properties, but not in the namespaces
14
+ * cdxgen reserves for the facts it establishes, so a scanned tree cannot pass
15
+ * its own claims off as cdxgen's.
13
16
  *
14
17
  * @param {Object} config parsed config file contents
15
18
  * @param {string} configDir directory the config file was read from
16
- * @returns {{config: Object, rejected: string[], announced: string[]}} sanitized config and what it did
19
+ * @returns {{config: Object, rejected: string[], announced: string[], reservedProperties: string[]}} sanitized config and what it did
17
20
  */
18
21
  export declare function sanitizeProjectConfig(config: Object, configDir: string): {
19
22
  config: Object;
20
23
  rejected: string[];
21
24
  announced: string[];
25
+ reservedProperties: string[];
22
26
  };
23
27
  //# sourceMappingURL=projectConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../lib/core/projectConfig.js"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,wBAAwB,UAKpC,CAAC;AAsEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAJjC,MAIiC,EAAE,SAAS,EAH5C,MAG4C,GAF1C;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAC,CA4BrE"}
1
+ {"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../lib/core/projectConfig.js"],"names":[],"mappings":"AASA;;GAEG;AACH,eAAO,MAAM,wBAAwB,UAKpC,CAAC;AAsEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAJjC,MAIiC,EAAE,SAAS,EAH5C,MAG4C,GAF1C;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAAC,CA+CnG"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Outbound `user-agent` construction.
3
+ *
4
+ * Package registries police automated traffic through this header, and their
5
+ * requirements differ. GitHub rejects an absent one with a 403; crates.io
6
+ * rejects an absent one and additionally blocks a configurable list of exact
7
+ * strings and prefixes at the CDN edge; Packagist asks for a `mailto=` contact;
8
+ * PyPI asks for a value that uniquely identifies the consumer, with contact
9
+ * information; pub.dev documents a `name/version (+url)` shape. The default
10
+ * built here satisfies all of them at once.
11
+ *
12
+ * Two escape hatches exist for operators whose traffic a registry has taken
13
+ * issue with: `CDXGEN_USER_AGENT` replaces the header everywhere, and
14
+ * `CDXGEN_USER_AGENT_<REGISTRY>` replaces it for one destination.
15
+ */
16
+ /**
17
+ * The registry key covering a host, if any.
18
+ *
19
+ * @param {String} hostname Lower-case hostname of the request
20
+ * @returns {String|undefined} Registry key such as `CRATES`, or undefined
21
+ */
22
+ export declare function registryKeyForHost(hostname: string): string | undefined;
23
+ /**
24
+ * The default user-agent: `cdxgen/<version> (+<home url>; mailto=<address>)`.
25
+ * Setting CDXGEN_CONTACT_EMAIL substitutes a different address, which is what
26
+ * an operator running cdxgen at scale should do so that a registry contacts
27
+ * them rather than the project.
28
+ *
29
+ * The `@scope/name` npm spelling is deliberately avoided. crates.io blocks
30
+ * user-agents beginning `@CycloneDX/cdxgen` outright, and a leading `@` is
31
+ * unusual enough elsewhere to invite the same treatment.
32
+ *
33
+ * @returns {String} Default user-agent for outbound requests
34
+ */
35
+ export declare function defaultUserAgent(): string;
36
+ /**
37
+ * The user-agent to send to a host. A `CDXGEN_USER_AGENT_<REGISTRY>` override
38
+ * wins for the hosts of that registry, then the global `CDXGEN_USER_AGENT`,
39
+ * then the default. Blank overrides are ignored: several registries reject an
40
+ * empty header outright, so falling back is safer than honouring it.
41
+ *
42
+ * @param {String} [hostname] Hostname the request is bound for
43
+ * @returns {String} User-agent header value
44
+ */
45
+ export declare function getUserAgent(hostname?: string): string;
46
+ /**
47
+ * Whether a user-agent carries a substring that crates.io blocks. Useful for
48
+ * warning an operator whose override would be refused there.
49
+ *
50
+ * @param {String} userAgent User-agent value to test
51
+ * @returns {String|undefined} The offending substring, or undefined
52
+ */
53
+ export declare function blockedUserAgentSubstring(userAgent: string): string | undefined;
54
+ /** Registry keys that `CDXGEN_USER_AGENT_<REGISTRY>` accepts. */
55
+ export declare const USER_AGENT_REGISTRY_KEYS: readonly string[];
56
+ //# sourceMappingURL=userAgent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userAgent.d.ts","sourceRoot":"","sources":["../../../lib/core/userAgent.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAwDH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,QAAA,GAF9B,SAAO,SAAS,CAe5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,WAI/B;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,QAAQ,AAHlC,CACA,QAEkC,UAUpC;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,QAAA,GAFtC,SAAO,SAAS,CAU5B;AAED,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,mBAEpC,CAAC"}
@@ -14,14 +14,21 @@ export declare function parseBunDescriptor(descriptor: string): {
14
14
  version: string;
15
15
  };
16
16
  /**
17
- * Parse a bun text lockfile (`bun.lock`, lockfileVersion 1).
17
+ * Parse a bun text lockfile (`bun.lock`, lockfileVersion 1-3; v1 was written
18
+ * by the Zig implementation in bun 1.2.x-1.3.x and v2/v3 by the Rust one in
19
+ * bun 1.4+ - the content shape is identical, only parse strictness changed).
18
20
  *
19
21
  * Bun's text lockfile is JSONC (JSON with trailing commas). It records the
20
22
  * workspace roots under `workspaces` and the fully resolved dependency tree
21
- * under `packages`, where each entry is an array of the form
22
- * `["name@version", "registry", { dependencies, optionalDependencies, bin,
23
- * os, cpu, ... }, "sha512-..."]`. Nested duplicate versions are keyed by their
24
- * dependency path (eg `"parent/child"`).
23
+ * under `packages`, where nested duplicate versions are keyed by their
24
+ * dependency path (eg `"parent/child"`). The entry layout after the leading
25
+ * `"name@version"` descriptor depends on the resolution type (see the
26
+ * Stringifier in bun's bun.lock.rs):
27
+ * - npm: `["name@version", tarballUrlOrEmpty, { dependencies, bin, os, ... }, "sha512-..."]`
28
+ * - git/github: `["name@git+repo", { ... }, ".bun-tag", "sha512-..."]`
29
+ * - tarball/folder/symlink: `["name@url", { ... }, "sha512-..."]`
30
+ * - workspace: `["name@workspace:path"]`
31
+ * so the elements are recognised by shape instead of fixed indices.
25
32
  *
26
33
  * The binary lockfile (`bun.lockb`) is intentionally not supported - callers
27
34
  * should ask users to regenerate it with `bun install --save-text-lockfile`.
@@ -1 +1 @@
1
- {"version":3,"file":"bunutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/bunutils.js"],"names":[],"mappings":"AAuBA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EALlC,MAKkC,GAJhC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAwB1D;AAyBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAAC,WAAW,EALnC,MAKmC,EAAE,OAAO,AAJpD,CACA,EADQ,MAIiD,GAH/C,OAAO,CAAC;IAAC,OAAO,QAAQ;IAAC,gBAAgB,QAAO;CAAC,CAAC,CAoT9D"}
1
+ {"version":3,"file":"bunutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/bunutils.js"],"names":[],"mappings":"AAgCA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EALlC,MAKkC,GAJhC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAwB1D;AA2ED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,YAAY,CAAC,WAAW,EALnC,MAKmC,EAAE,OAAO,AAJpD,CACA,EADQ,MAIiD,GAH/C,OAAO,CAAC;IAAC,OAAO,QAAQ;IAAC,gBAAgB,QAAO;CAAC,CAAC,CA0Z9D"}
@@ -0,0 +1,75 @@
1
+ export type CargoCacheMetadata = {
2
+ /**
3
+ * Crate description.
4
+ */
5
+ description?: string;
6
+ /**
7
+ * SPDX license expression.
8
+ */
9
+ license?: string;
10
+ /**
11
+ * Source repository URL.
12
+ */
13
+ repository?: string;
14
+ /**
15
+ * Homepage URL.
16
+ */
17
+ homepage?: string;
18
+ /**
19
+ * Minimum supported Rust version.
20
+ */
21
+ rustVersion?: string;
22
+ /**
23
+ * SHA-256 of the published `.crate` archive.
24
+ */
25
+ checksum?: string;
26
+ /**
27
+ * Feature table.
28
+ */
29
+ features?: Object;
30
+ /**
31
+ * Whether this version was yanked.
32
+ */
33
+ yanked?: boolean;
34
+ /**
35
+ * RFC 3339 publish timestamp.
36
+ */
37
+ publishTime?: string;
38
+ /**
39
+ * Newest non-yanked version in the index.
40
+ */
41
+ latestVersion?: string;
42
+ /**
43
+ * Which local files answered, for provenance.
44
+ */
45
+ sources: string[];
46
+ };
47
+ /**
48
+ * Reset memoized state. Tests that point `CARGO_HOME` at a fixture need the
49
+ * next call to look again rather than reuse the previous run's answer.
50
+ *
51
+ * @returns {void}
52
+ */
53
+ export declare function resetCargoCacheState(): void;
54
+ /**
55
+ * Whether the local registry should be consulted before crates.io.
56
+ *
57
+ * @returns {boolean} false when `CARGO_METADATA_SOURCE=registry` opts out.
58
+ */
59
+ export declare function localCargoMetadataEnabled(): boolean;
60
+ /**
61
+ * Resolve the Cargo registry root.
62
+ *
63
+ * @returns {string} Absolute path to `$CARGO_HOME/registry`.
64
+ */
65
+ export declare function getCargoRegistryDir(): string;
66
+ /**
67
+ * Read everything the local registry knows about one crate version.
68
+ *
69
+ * @param {string} name Crate name.
70
+ * @param {string} version Exact version.
71
+ * @returns {CargoCacheMetadata|undefined} Metadata, or undefined when neither
72
+ * local source has this crate.
73
+ */
74
+ export declare function readCargoCacheMetadata(name: string, version: string): CargoCacheMetadata | undefined;
75
+ //# sourceMappingURL=cargoCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cargoCache.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cargoCache.js"],"names":[],"mappings":"AAsCG,YAAkB,kBAAkB,GACpC;;;;IAAoB,WAAW,AAA/B,CACA,EADW,MAAM,CACjB;;;;IAAoB,OAAO,AAA3B,CACA,EADW,MAAM,CACjB;;;;IAAoB,UAAU,AAA9B,CACA,EADW,MAAM,CACjB;;;;IAAoB,QAAQ,AAA5B,CACA,EADW,MAAM,CACjB;;;;IAAoB,WAAW,AAA/B,CACA,EADW,MAAM,CACjB;;;;IAAoB,QAAQ,AAA5B,CACA,EADW,MAAM,CACjB;;;;IAAoB,QAAQ,AAA5B,CACA,EADW,MAAM,CACjB;;;;IAAqB,MAAM,AAA3B,CACA,EADW,OAAO,CAClB;;;;IAAoB,WAAW,AAA/B,CACA,EADW,MAAM,CACjB;;;;IAAoB,aAAa,AAAjC,CACA,EADW,MAAM,CACjB;;;;IAAqB,OAAO,EAAjB,MAAM,EAAE,CACrB;CAAA,CAAA;AAUD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAFvB,IAAI,CAKhB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,IAF5B,OAAO,CAOnB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAFtB,MAAM,CAOlB;AAkCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EALhC,MAKgC,EAAE,OAAO,EAJzC,MAIyC,GAHvC,kBAAkB,GAAC,SAAS,CA0BxC"}
@@ -5,4 +5,18 @@
5
5
  * @returns {Promise<Object>} Parsed metadata object.
6
6
  */
7
7
  export declare function parseCaxaMetadata(mfile: string): Promise<Object>;
8
+ /**
9
+ * Complete caxa metadata from the application the binary extracts (or was
10
+ * built from): npm integrity from the lockfile pnpm or npm leaves in
11
+ * node_modules, the native tools a cdxgen plugins manifest describes, with
12
+ * their own dependencies, and the PHP, Ruby and Java packages vendored inside
13
+ * npm packages. Everything found is linked from the npm package whose
14
+ * directory contains it; npm packages that are not in the metadata are
15
+ * ignored.
16
+ *
17
+ * @param {Object} mdata Parsed caxa metadata (see parseCaxaMetadata)
18
+ * @param {string} appDir Directory of the extracted app
19
+ * @returns {Promise<Object>} The metadata, with components and dependencies added
20
+ */
21
+ export declare function enrichCaxaMetadataFromApp(mdata: Object, appDir: string): Promise<Object>;
8
22
  //# sourceMappingURL=caxa.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"caxa.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/caxa.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAHlC,MAGkC,GAFhC,OAAO,CAAC,MAAM,CAAC,CAkE3B"}
1
+ {"version":3,"file":"caxa.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/caxa.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAHlC,MAGkC,GAFhC,OAAO,CAAC,MAAM,CAAC,CA0E3B;AAiXD;;;;;;;;;;;;GAYG;AACH,wBAAsB,yBAAyB,CAAC,KAAK,EAJ1C,MAI0C,EAAE,MAAM,EAHlD,MAGkD,GAFhD,OAAO,CAAC,MAAM,CAAC,CAyC3B"}
@@ -172,5 +172,28 @@ export declare function buildDependentPurl(resolvedUrl: string, version?: string
172
172
  * @returns {Object[]} Components with one entry per package name, in first-seen order
173
173
  */
174
174
  export declare function collapseCmakeVersions(pkgList: Object[]): Object[];
175
+ /**
176
+ * Keep one component per dependency downloaded at configure time.
177
+ *
178
+ * The same `FetchContent_Declare` may be read from several files, and a
179
+ * `find_package(<name>)` names the package a `FetchContent_Declare(<name>)` or
180
+ * `CPMAddPackage` fetches. Within the components scraped from CMake files, the
181
+ * first fetched component of each name stands for all of them, and a plain
182
+ * `find_package` entry of that name is dropped.
183
+ *
184
+ * @param {Object[]} pkgList Components scraped from CMake-like files
185
+ * @returns {Object[]} The components, in first-seen order
186
+ */
187
+ export declare function preferFetchedCmakeDependencies(pkgList: Object[]): Object[];
188
+ /**
189
+ * Drop the components scraped from CMake files for a dependency the build tree
190
+ * has resolved: the gitclone script names the repository and tag that were
191
+ * really checked out, so its component replaces the declared one.
192
+ *
193
+ * @param {Object[]} pkgList Components collected so far
194
+ * @param {string} name Name of the resolved dependency
195
+ * @returns {Object[]} The components without the scraped entries for `name`
196
+ */
197
+ export declare function withoutScrapedFetchDependency(pkgList: Object[], name: string): Object[];
175
198
  export { GIT_COMMAND, toRepoRelative };
176
199
  //# sourceMappingURL=cmakeResolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmakeResolver.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cmakeResolver.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,OAAO,EAEL,WAAW,EAEZ,MAAM,4BAA4B,CAAC;AAgBpC;;;;;;;;GAQG;AACH,iBAAS,cAAc,CAAC,OAAO,EAJpB,MAIoB,EAAE,QAAQ,EAH9B,MAG8B,GAF5B,MAAM,GAAC,IAAI,CAWvB;AAED;;;;;;;;;;GAUG;AACH,wB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@@ -17,16 +17,16 @@ export declare function getCppModules(src: string, options: object, osPkgsList:
17
17
  "bom-ref": string;
18
18
  group?: undefined;
19
19
  } | {
20
+ purl?: undefined;
20
21
  description?: undefined;
21
22
  license?: undefined;
22
- purl?: undefined;
23
23
  "bom-ref"?: undefined;
24
24
  group: any;
25
25
  name: any;
26
26
  version: string;
27
27
  type: string;
28
28
  } | undefined;
29
- pkgList: any[];
29
+ pkgList: object[];
30
30
  dependenciesList: {
31
31
  ref: any;
32
32
  dependsOn: any[];
@@ -1 +1 @@
1
- {"version":3,"file":"cppEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cppEvidence.js"],"names":[],"mappings":"AA4BA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EALtB,MAKsB,EAAE,OAAO,EAJ/B,MAI+B,EAAE,UAAU,EAH3C,KAG2C,EAAE,QAAQ,EAFrD,KAEqD;;;;;;;;;;;;;;;;;;;;;;;;;EA4Q/D"}
1
+ {"version":3,"file":"cppEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/cppEvidence.js"],"names":[],"mappings":"AAwDA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EALtB,MAKsB,EAAE,OAAO,EAJ/B,MAI+B,EAAE,UAAU,EAH3C,KAG2C,EAAE,QAAQ,EAFrD,KAEqD;;;;;;;;;;;;;;;;;;;;;;;;;EAuT/D"}
@@ -236,9 +236,23 @@ export declare function getGoPkgVCSUrl(group: string, name: string): Promise<any
236
236
  /**
237
237
  * Method to retrieve metadata for rust packages by querying crates
238
238
  *
239
+ * The local Cargo registry is consulted first, because crates.io's crawler
240
+ * policy allows one request per second and a populated `~/.cargo` already
241
+ * holds the license, description, repository, checksum and yanked flag for
242
+ * every crate the build compiled.
243
+ *
244
+ * What it does not hold is publisher identity, so a caller that needs the
245
+ * publisher-drift and release-cadence signals — the predictive audit does —
246
+ * passes `preferLocalCache: false` and takes the slower registry path.
247
+ *
239
248
  * @param {Array} pkgList Package list
249
+ * @param {Object} [options] Options
250
+ * @param {boolean} [options.preferLocalCache=true] Answer from the local Cargo
251
+ * registry where it can, and query crates.io only for the rest.
240
252
  */
241
- export declare function getCratesMetadata(pkgList: any[]): Promise<any[]>;
253
+ export declare function getCratesMetadata(pkgList: any[], options?: {
254
+ preferLocalCache?: boolean;
255
+ }): Promise<any[]>;
242
256
  /**
243
257
  * Method to retrieve metadata for dart packages by querying pub.dev
244
258
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ecosystems.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/ecosystems.js"],"names":[],"mappings":"AA6FA,eAAO,IAAI,cAAc,IAAK,CAAC;AAY/B;;;;GAIG;AACH,wBAAgB,mBAAmB,SAElC;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,OAAO,EAH1C,MAAM,EAGoC,GAFxC,OAAO,CAAC,MAAM,EAAE,CAAC,CAmC7B;AAyBD;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,OAAO,OAAA,EAAE,WAAW,KAAA,kBAiGxD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAL/B,MAK+B,EAAE,IAAI,EAJrC,MAIqC,EAAE,OAAO,EAH9C,MAG8C,GAF5C,MAAM,GAAC,IAAI,CAmIvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,OAAO,OAAA,EACP,YAAY,GAPH,MAOQ,EACjB,KAAK,UAAQ,SA+Ed;AA4ND;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAA,UAGnE;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAA,GAF/D,MAAM,GAAC,SAAS,CA6B3B;AAgBD;;;;;;;;;GASG;AACH,wBAAsB,WAAW,CAAC,E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"file":"golem.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/golem.js"],"names":[],"mappings":"AA+iDA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,OAAO,CAInB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAJ/B,MAI+B,GAH7B,MAAM,GAAC,SAAS,CAY5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EALzB,MAKyB,EAAE,UAAU,EAJrC,MAIqC,EAAE,OAAO,AAHtD,CACA,EADQ,MAGmD,GAFjD,OAAO,CAmDnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,EAAE,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,MAAM,GAAC,SAAS,CA2B5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,AAL7C,CACA,EADQ,MAK0C,EAAE,UAAU,AAJ9D,CACA,EADQ,KAAK,CAAC,MAAM,CAI+C,GAHzD;IAAC,sBAAsB,2BAAgC;IAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,mBAAmB,0BAA0B;IAAC,cAAc,wBAAwB;IAAC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,eAAe,wBAAuB;CAAC,CAsFpQ"}
1
+ {"version":3,"file":"golem.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/golem.js"],"names":[],"mappings":"AAyjDA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAH/B,MAG+B,GAF7B,OAAO,CAInB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAJ/B,MAI+B,GAH7B,MAAM,GAAC,SAAS,CAY5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EALzB,MAKyB,EAAE,UAAU,EAJrC,MAIqC,EAAE,OAAO,AAHtD,CACA,EADQ,MAGmD,GAFjD,OAAO,CAmDnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,EAAE,OAAO,AAH7C,CACA,EADQ,MAG0C,GAFxC,MAAM,GAAC,SAAS,CA2B5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,AAL7C,CACA,EADQ,MAK0C,EAAE,UAAU,AAJ9D,CACA,EADQ,KAAK,CAAC,MAAM,CAI+C,GAHzD;IAAC,sBAAsB,2BAAgC;IAAC,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,mBAAmB,0BAA0B;IAAC,cAAc,wBAAwB;IAAC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,eAAe,wBAAuB;CAAC,CAsFpQ"}
@@ -1,10 +1,16 @@
1
1
  /**
2
2
  * Method to return the gradle command to use.
3
3
  *
4
+ * Project-local wrapper scripts (`gradlew`) are attacker-controlled files in
5
+ * the scanned project, so they are only used when dependency tooling is
6
+ * allowed (`options.installDeps !== false`); otherwise the system Gradle is
7
+ * used.
8
+ *
4
9
  * @param {string} srcPath Path to look for gradlew wrapper
5
10
  * @param {string|null} rootPath Root directory to look for gradlew wrapper
11
+ * @param {Object} [options] CLI options (`installDeps` gates wrapper use)
6
12
  */
7
- export declare function getGradleCommand(srcPath: string, rootPath: string | null): string;
13
+ export declare function getGradleCommand(srcPath: string, rootPath: string | null, options?: Object): string;
8
14
  /**
9
15
  * Method to combine the general gradle arguments, the sub-commands and the sub-commands' arguments in the correct way
10
16
  *
@@ -57,7 +63,7 @@ export declare function parseGradleProperties(rawOutput: string, gradleModuleNam
57
63
  *
58
64
  * @returns {string} The combined output for all subprojects of the Gradle properties task
59
65
  */
60
- export declare function executeParallelGradleProperties(dir: string, allProjectsStr: array, extraArgs?: array): string;
66
+ export declare function executeParallelGradleProperties(dir: string, allProjectsStr: array, extraArgs?: array, options?: {}): string;
61
67
  /**
62
68
  * Forget the causes diagnosed so far, so a process that generates more than
63
69
  * one BOM diagnoses each run on its own.
@@ -159,14 +165,44 @@ _includeCacheDir?: boolean): Promise<Object>;
159
165
  /**
160
166
  * Method to return the mill command to use.
161
167
  *
168
+ * The project-local `mill` script is an attacker-controlled file in the
169
+ * scanned project, so it is only used when dependency tooling is allowed
170
+ * (`options.installDeps !== false`).
171
+ *
162
172
  * @param {string} srcPath Path to look for mill wrapper
173
+ * @param {Object} [options] CLI options (`installDeps` gates wrapper use)
163
174
  */
164
- export declare function getMillCommand(srcPath: string): string;
175
+ export declare function getMillCommand(srcPath: string, options?: Object): string;
165
176
  /**
166
177
  * Method to return the maven command to use.
167
178
  *
179
+ * Project-local wrapper scripts (`mvnw`) are attacker-controlled files in the
180
+ * scanned project, so they are only used when dependency tooling is allowed
181
+ * (`options.installDeps !== false`); otherwise the installed Maven is used.
182
+ *
168
183
  * @param {string} srcPath Path to look for maven wrapper
169
184
  * @param {string} rootPath Root directory to look for maven wrapper
185
+ * @param {Object} [options] CLI options (`installDeps` gates wrapper use)
186
+ */
187
+ export declare function getMavenCommand(srcPath: string, rootPath: string, options?: Object): string;
188
+ /**
189
+ * Parse a Gradle version catalog (`gradle/libs.versions.toml`).
190
+ *
191
+ * A catalog declares coordinates the build scripts then reference by alias.
192
+ * It is a declaration, not a resolution: entries may go unused, and their
193
+ * versions may be references into the `[versions]` table. Because of that,
194
+ * catalog components are emitted only as a fallback when Gradle itself
195
+ * produced no dependency information, and every component carries a
196
+ * `cdx:gradle:catalog=true` property so consumers can tell declared catalog
197
+ * entries from a resolved graph.
198
+ *
199
+ * Only libraries whose version resolves to a literal (inline or via
200
+ * `version.ref`) are emitted; rich or unresolved versions would produce purls
201
+ * that identify no artifact. Plugins are skipped because they are build-time
202
+ * only.
203
+ *
204
+ * @param {string} catalogFile Path to `libs.versions.toml`
205
+ * @returns {Object[]} Package records for resolvable library entries
170
206
  */
171
- export declare function getMavenCommand(srcPath: string, rootPath: string): string;
207
+ export declare function parseGradleVersionCatalog(catalogFile: string): Object[];
172
208
  //# sourceMappingURL=gradleutils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gradleutils.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/gradleutils.js"],"names":[],"mappings":"AAuCA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAH7B,MAG6B,EAAE,QAAQ,EAFvC,MAAM,GAAC,IAEgC,UA2FjD;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EARN,MAAM,EAQA,EACf,iBAAiB,EARR,MAAM,EAQE,EACjB,yBAAyB,EARhB,MAAM,EAQU,EACzB,mBAAmB,EARV,GAQU,GANR,MAAM,EAAE,CA2CpB;AAcD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAJ1C,MAI0C,EAAE,aAAa,EAHzD,MAAM,EAGmD,GAFvD,GAAG,CAqCf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAFlC,MAEkC;;;EAsD5C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAHpC,MAGoC,EAAE,gBAAgB,GAFtD,MAE6D;;;;;;;;EAoDvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAPM,MAON,EACH,cAAc,EAPL,KAOK,EACd,SAAS,GAPA,KAOK,GALH,MAAM,CAuFlB;AAiBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAF3B,IAAI,CAKhB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAF7B,OAAO,CAInB;AAiGD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EANzC,MAMyC,EAAE,OAAO,GAJ1D;IAAyB,OAAO,AAAhC,CACA,EADQ,MAAM,CACd;IAAyB,aAAa,AAAtC,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MAGiD,GAF/C,MAAM,CAkBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAH5C,MAG4C,GAF1C,MAAM,CAuBlB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAHtC,MAGsC,GAFpC,MAAM,CA8ClB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAPD,MAOC,EACV,SAAS,EAPA,MAOA,EACT,QAAQ,GAPC,OAOM,EAAE,qCAAqC;AACtD,gBAAgB,GAPP,OAOe,GANb,OAAO,CAAC,MAAM,CAAC,CAgC3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAH3B,MAG2B,EAAE,OAAO,AAF5C,CACF,EADU,MAEyC,UAcnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAJ5B,MAI4B,EAAE,QAAQ,EAHtC,MAGsC,EAAE,OAAO,AAFvD,CACF,EADU,MAEoD,UAsK9D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAH1C,MAG0C,GAFxC,MAAM,EAAE,CAoEpB"}
@@ -3,8 +3,11 @@
3
3
  *
4
4
  * For each component, resolves its module aliases (including the deno jsr
5
5
  * specifier), records imported/exported modules as properties, attaches
6
- * occurrence evidence, and adjusts the component scope to "required" when the
7
- * package is used or "optional" when it is not.
6
+ * occurrence evidence, and promotes the component scope to "required" when the
7
+ * package is used. A package with no observed usage keeps the scope its
8
+ * manifest parser assigned: static import analysis cannot see packages loaded
9
+ * from configuration, bundler entrypoints, stylesheets, or plugins, so a
10
+ * missing import is not evidence that a package is optional.
8
11
  *
9
12
  * @param {Array<object>} pkgList Package components to enrich.
10
13
  * @param {object} allImports Map of import specifier to usage evidence objects.
@@ -1 +1 @@
1
- {"version":3,"file":"jsEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/jsEvidence.js"],"names":[],"mappings":"AA0GA;;;;;;;;;;;;;;GAcG;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,CAqMlC"}
1
+ {"version":3,"file":"jsEvidence.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/jsEvidence.js"],"names":[],"mappings":"AA0GA;;;;;;;;;;;;;;;;;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,CAiMlC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Builds the workspace component candidate for one kosi module.
3
+ *
4
+ * kosi derives module names from Gradle settings files, so a quoted literal
5
+ * (rootProject.name = 'KotlinGoat') rides into the reported purl. A purl
6
+ * cdx-purl rejects anchors nothing and must not reach the BOM: keep the
7
+ * reported purl when it parses, rebuild one from the cleaned coordinates
8
+ * when it does not, and return undefined when neither works.
9
+ *
10
+ * @param {Object|undefined} workspaceModule One entry of kosi's modules[].
11
+ * @returns {Object|undefined} Component candidate with a valid purl, or undefined.
12
+ */
13
+ export declare function kosiWorkspaceComponent(workspaceModule: Object | undefined): Object | undefined;
14
+ export declare function isKosiKotlinLanguage(language: any): boolean;
15
+ /**
16
+ * True when kosi is disabled by CDXGEN_KOSI_DISABLE (1/all/true) or --no-kosi.
17
+ * The check happens before any binary resolution so a disabled run never
18
+ * even looks for the plugin.
19
+ */
20
+ export declare function kosiDisabled(): any;
21
+ /**
22
+ * Orchestrates the kosi runs over src and returns the parsed reports: one
23
+ * `all` pass (every slice kind, dependency tier) and one `reachable` pass
24
+ * (call-graph reachability from the roots). The analysis is read-only and
25
+ * offline: kosi never executes the project's build. A classpath.txt beside
26
+ * the sources (the documented build-tool report) is passed through when
27
+ * present.
28
+ *
29
+ * @param {string} src Directory to analyze.
30
+ * @param {Object} options Configuration options.
31
+ * @returns {Object|undefined} { report, reachableReport } or undefined.
32
+ */
33
+ export declare function analyzeKosiProject(src: string, options?: Object): Object | undefined;
34
+ /**
35
+ * Merges the reachable pass's evidence into the all pass's maps, mutating
36
+ * the first argument.
37
+ *
38
+ * The reachable pass's slices are the all pass's INTERSECTED with call-graph
39
+ * reachability from the roots, so every key it produces is a key the all pass
40
+ * already has, and the unions below cannot add one. That made the second full
41
+ * `--backend resolved --deps` analysis — the most expensive thing this arm
42
+ * runs, and it runs it twice — contribute exactly nothing: the one fact it
43
+ * computes, reachability, was discarded at the merge (the P23 review's R144).
44
+ * It is recorded now, on the components whose evidence survived the
45
+ * intersection, which is the signal an SBOM consumer prioritises with. kosi's
46
+ * own schema deliberately stopped carrying `reachableFromRoots` per slice in
47
+ * P22 because there it was a mode-level fact wearing a per-slice field's
48
+ * clothes; here it is neither, it is the measured difference between two runs.
49
+ */
50
+ export declare function mergeKosiEvidence(all: any, reachable: any): any;
51
+ /**
52
+ * Services evidence: kosi's outbound services[] rows are already
53
+ * CycloneDX-shaped.
54
+ */
55
+ export declare function collectKosiServices(kosiReport?: {}, servicesMap?: {}): {};
56
+ /**
57
+ * INBOUND endpoints: kosi's apiEndpoints[] rows are the routes the analysed
58
+ * application itself serves, which `services[]` (kosi's OUTBOUND calls)
59
+ * does not carry. Without this the whole inbound surface — the path
60
+ * template, the framework that declared it, and above all whether anything
61
+ * authenticates it — stopped at the kosi report and never reached the
62
+ * SaaSBOM.
63
+ *
64
+ * One service per endpoint, named the way detectServicesFromOpenAPI names
65
+ * its own (`service-<path>-<method>`), so an OpenAPI spec and a kosi run
66
+ * over the same route converge on one entry instead of two.
67
+ *
68
+ * `authenticated` is left UNDEFINED when the endpoint declares no
69
+ * authentication: kosi's empty list means "nothing was declared here",
70
+ * which is not the same claim as "this route is unauthenticated", and
71
+ * cdxgen's own detectors use undefined for exactly that unknown.
72
+ *
73
+ * @param {Object} kosiReport The parsed JSON generated by kosi.
74
+ * @param {Object} servicesMap Map populated with detected service definitions
75
+ * @returns {Object} The mutated services map
76
+ */
77
+ export declare function collectKosiApiEndpoints(kosiReport?: Object, servicesMap?: Object): Object;
78
+ export declare function collectKosiEvidence(kosiReport?: {}, components?: any[]): {
79
+ componentPropertiesMap: {};
80
+ cryptoComponents: any[];
81
+ cryptoGeneratePurls: {};
82
+ dataFlowFrames: {};
83
+ metadataProperties: any[];
84
+ purlLocationMap: {};
85
+ };
86
+ //# sourceMappingURL=kosi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kosi.d.ts","sourceRoot":"","sources":["../../../lib/ecosystems/kosi.js"],"names":[],"mappings":"AAoCA;;;;;;;;;;;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,CAkD5B;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"}