@cdxgen/cdxgen 13.0.1 → 13.2.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 (286) hide show
  1. package/README.md +30 -16
  2. package/bin/audit.js +6 -0
  3. package/bin/cdxgen.js +141 -7
  4. package/bin/evinse.js +3 -1
  5. package/data/component-tags.json +8 -1
  6. package/data/crypto-oid.json +88 -12
  7. package/data/frameworks-list.json +86 -1
  8. package/data/remediations.json +1167 -0
  9. package/data/rules/ai-bom.yaml +78 -0
  10. package/data/rules/asar-archives.yaml +1 -1
  11. package/data/rules/build-fidelity.yaml +782 -0
  12. package/data/rules/cargo-rust.yaml +132 -0
  13. package/data/rules/mcp-servers.yaml +122 -0
  14. package/data/rules/package-integrity.yaml +13 -13
  15. package/lib/audit/index.js +48 -4
  16. package/lib/audit/scoring.js +2 -8
  17. package/lib/audit/targets.js +6 -1
  18. package/lib/cli/bomAssembly.js +32 -1
  19. package/lib/cli/cliOptions.js +94 -7
  20. package/lib/cli/index.js +268 -49
  21. package/lib/cli/jsBom.js +91 -5
  22. package/lib/cli/jvmBom.js +1515 -1314
  23. package/lib/cli/managedBom.js +249 -28
  24. package/lib/cli/nativeBom.js +986 -10
  25. package/lib/core/activity.js +120 -2
  26. package/lib/core/buildLedger.js +799 -0
  27. package/lib/core/deferredExit.js +141 -0
  28. package/lib/core/env.js +108 -2
  29. package/lib/core/fs.js +60 -0
  30. package/lib/core/logger.js +12 -99
  31. package/lib/core/severity.js +16 -0
  32. package/lib/core/syncFileWriter.js +106 -0
  33. package/lib/core/userAgent.js +151 -0
  34. package/lib/ecosystems/cargoCache.js +364 -0
  35. package/lib/ecosystems/caxa.js +13 -5
  36. package/lib/ecosystems/cppEvidence.js +40 -2
  37. package/lib/ecosystems/ecosystems.js +250 -91
  38. package/lib/ecosystems/golem.js +11 -1
  39. package/lib/ecosystems/gradleutils.js +498 -17
  40. package/lib/ecosystems/kosi.js +1256 -0
  41. package/lib/ecosystems/parsers-crystal.js +179 -0
  42. package/lib/ecosystems/parsers-dotnet.js +69 -39
  43. package/lib/ecosystems/parsers-elm.js +816 -0
  44. package/lib/ecosystems/parsers-gleam.js +1 -1
  45. package/lib/ecosystems/parsers-js.js +26 -0
  46. package/lib/ecosystems/parsers-julia.js +268 -0
  47. package/lib/ecosystems/parsers-jvm.js +9 -0
  48. package/lib/ecosystems/parsers-lua.js +218 -0
  49. package/lib/ecosystems/parsers-misc.js +188 -2
  50. package/lib/ecosystems/parsers-nim.js +221 -0
  51. package/lib/ecosystems/parsers-opam.js +180 -0
  52. package/lib/ecosystems/parsers-perl.js +277 -0
  53. package/lib/ecosystems/parsers-python.js +172 -36
  54. package/lib/ecosystems/parsers-r.js +148 -0
  55. package/lib/ecosystems/parsers-rebar.js +411 -0
  56. package/lib/ecosystems/parsers-rust.js +944 -19
  57. package/lib/ecosystems/parsers-spack.js +204 -0
  58. package/lib/ecosystems/parsers-stack.js +264 -0
  59. package/lib/ecosystems/parsers-terraform.js +194 -0
  60. package/lib/ecosystems/pypiClassifiers.js +326 -0
  61. package/lib/ecosystems/pythonutils.js +49 -1
  62. package/lib/ecosystems/rubyutils.js +13 -0
  63. package/lib/ecosystems/rusi.js +126 -6
  64. package/lib/evinser/evinser.js +141 -13
  65. package/lib/helpers/agenticToolutils.js +925 -0
  66. package/lib/helpers/remote/dependency-track.js +81 -14
  67. package/lib/inventory/agentFormulationParser.js +57 -4
  68. package/lib/inventory/aiCollector.js +504 -10
  69. package/lib/inventory/aiInventory.js +12 -0
  70. package/lib/inventory/analyzer.js +488 -30
  71. package/lib/inventory/astWorker.js +6 -0
  72. package/lib/inventory/auditCategories.js +17 -0
  73. package/lib/inventory/cbomutils.js +30 -0
  74. package/lib/inventory/cdxrs.js +7 -2
  75. package/lib/inventory/communityAiConfigParser.js +215 -2
  76. package/lib/inventory/depsUtils.js +72 -0
  77. package/lib/inventory/dosai.js +508 -22
  78. package/lib/inventory/envcontext.js +215 -24
  79. package/lib/inventory/evidenceUtils.js +13 -0
  80. package/lib/inventory/fetchBatch.js +131 -2
  81. package/lib/inventory/fetchRate.js +74 -11
  82. package/lib/inventory/forgeEnricher.js +3 -2
  83. package/lib/inventory/jvmToolEnv.js +594 -0
  84. package/lib/inventory/mcpConfigParser.js +166 -2
  85. package/lib/inventory/mcpDiscovery.js +11 -0
  86. package/lib/inventory/mcpServerManifest.js +389 -0
  87. package/lib/inventory/mcpbBundle.js +419 -0
  88. package/lib/inventory/osinfo.js +1 -0
  89. package/lib/inventory/plugins.js +3 -0
  90. package/lib/inventory/protobom.js +54 -88
  91. package/lib/inventory/protobomLoader.js +4 -0
  92. package/lib/inventory/rustFormulationParser.js +1 -1
  93. package/lib/inventory/source.js +10 -4
  94. package/lib/inventory/stylePackageRefs.js +41 -0
  95. package/lib/inventory/svelteUtils.js +524 -0
  96. package/lib/inventory/toolRequirements.js +903 -0
  97. package/lib/managers/binary.js +24 -0
  98. package/lib/managers/docker.js +26 -5
  99. package/lib/parsers/huggingfaceUtils.js +15 -7
  100. package/lib/parsers/onnx.js +294 -0
  101. package/lib/parsers/safetensors.js +114 -0
  102. package/lib/server/server.js +1 -1
  103. package/lib/stages/postgen/annotationBuilder.js +97 -0
  104. package/lib/stages/postgen/auditBom.js +76 -79
  105. package/lib/stages/postgen/introspection/annotate.js +320 -0
  106. package/lib/stages/postgen/introspection/commandFacts.js +293 -0
  107. package/lib/stages/postgen/introspection/emit.js +192 -0
  108. package/lib/stages/postgen/introspection/formulationEvidence.js +427 -0
  109. package/lib/stages/postgen/introspection/markers.js +250 -0
  110. package/lib/stages/postgen/introspection/reflect.js +1214 -0
  111. package/lib/stages/postgen/introspection/report.js +1208 -0
  112. package/lib/stages/postgen/introspection/score.js +1067 -0
  113. package/lib/stages/postgen/introspection/shapeCommand.js +304 -0
  114. package/lib/stages/postgen/parentEdge.js +156 -0
  115. package/lib/stages/postgen/postgen.js +284 -3
  116. package/lib/stages/postgen/ruleEngine.js +17 -0
  117. package/lib/stages/pregen/envAudit.js +42 -2
  118. package/lib/stages/pregen/pregen.js +1171 -6
  119. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +462 -0
  120. package/lib/validator/bomValidator.js +11 -2
  121. package/package.json +26 -26
  122. package/types/lib/audit/index.d.ts.map +1 -1
  123. package/types/lib/audit/scoring.d.ts +2 -8
  124. package/types/lib/audit/scoring.d.ts.map +1 -1
  125. package/types/lib/audit/targets.d.ts.map +1 -1
  126. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  127. package/types/lib/cli/cliOptions.d.ts +2 -1
  128. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  129. package/types/lib/cli/index.d.ts +10 -2
  130. package/types/lib/cli/index.d.ts.map +1 -1
  131. package/types/lib/cli/jsBom.d.ts +23 -0
  132. package/types/lib/cli/jsBom.d.ts.map +1 -1
  133. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  134. package/types/lib/cli/managedBom.d.ts +33 -0
  135. package/types/lib/cli/managedBom.d.ts.map +1 -1
  136. package/types/lib/cli/nativeBom.d.ts +88 -8
  137. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  138. package/types/lib/core/activity.d.ts.map +1 -1
  139. package/types/lib/core/buildLedger.d.ts +272 -0
  140. package/types/lib/core/buildLedger.d.ts.map +1 -0
  141. package/types/lib/core/deferredExit.d.ts +84 -0
  142. package/types/lib/core/deferredExit.d.ts.map +1 -0
  143. package/types/lib/core/env.d.ts +43 -1
  144. package/types/lib/core/env.d.ts.map +1 -1
  145. package/types/lib/core/fs.d.ts +21 -0
  146. package/types/lib/core/fs.d.ts.map +1 -1
  147. package/types/lib/core/logger.d.ts +2 -11
  148. package/types/lib/core/logger.d.ts.map +1 -1
  149. package/types/lib/core/severity.d.ts +11 -0
  150. package/types/lib/core/severity.d.ts.map +1 -0
  151. package/types/lib/core/syncFileWriter.d.ts +33 -0
  152. package/types/lib/core/syncFileWriter.d.ts.map +1 -0
  153. package/types/lib/core/userAgent.d.ts +56 -0
  154. package/types/lib/core/userAgent.d.ts.map +1 -0
  155. package/types/lib/ecosystems/cargoCache.d.ts +75 -0
  156. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -0
  157. package/types/lib/ecosystems/caxa.d.ts.map +1 -1
  158. package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
  159. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  160. package/types/lib/ecosystems/ecosystems.d.ts +15 -1
  161. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  162. package/types/lib/ecosystems/gradleutils.d.ts +53 -0
  163. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  164. package/types/lib/ecosystems/kosi.d.ts +73 -0
  165. package/types/lib/ecosystems/kosi.d.ts.map +1 -0
  166. package/types/lib/ecosystems/parsers-crystal.d.ts +27 -0
  167. package/types/lib/ecosystems/parsers-crystal.d.ts.map +1 -0
  168. package/types/lib/ecosystems/parsers-dotnet.d.ts +19 -0
  169. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  170. package/types/lib/ecosystems/parsers-elm.d.ts +79 -0
  171. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -0
  172. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  173. package/types/lib/ecosystems/parsers-julia.d.ts +57 -0
  174. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -0
  175. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  176. package/types/lib/ecosystems/parsers-lua.d.ts +50 -0
  177. package/types/lib/ecosystems/parsers-lua.d.ts.map +1 -0
  178. package/types/lib/ecosystems/parsers-misc.d.ts +23 -0
  179. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  180. package/types/lib/ecosystems/parsers-nim.d.ts +43 -0
  181. package/types/lib/ecosystems/parsers-nim.d.ts.map +1 -0
  182. package/types/lib/ecosystems/parsers-opam.d.ts +31 -0
  183. package/types/lib/ecosystems/parsers-opam.d.ts.map +1 -0
  184. package/types/lib/ecosystems/parsers-perl.d.ts +36 -0
  185. package/types/lib/ecosystems/parsers-perl.d.ts.map +1 -0
  186. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  187. package/types/lib/ecosystems/parsers-r.d.ts +35 -0
  188. package/types/lib/ecosystems/parsers-r.d.ts.map +1 -0
  189. package/types/lib/ecosystems/parsers-rebar.d.ts +42 -0
  190. package/types/lib/ecosystems/parsers-rebar.d.ts.map +1 -0
  191. package/types/lib/ecosystems/parsers-rust.d.ts +199 -0
  192. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  193. package/types/lib/ecosystems/parsers-spack.d.ts +33 -0
  194. package/types/lib/ecosystems/parsers-spack.d.ts.map +1 -0
  195. package/types/lib/ecosystems/parsers-stack.d.ts +35 -0
  196. package/types/lib/ecosystems/parsers-stack.d.ts.map +1 -0
  197. package/types/lib/ecosystems/parsers-terraform.d.ts +34 -0
  198. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -0
  199. package/types/lib/ecosystems/pypiClassifiers.d.ts +80 -0
  200. package/types/lib/ecosystems/pypiClassifiers.d.ts.map +1 -0
  201. package/types/lib/ecosystems/pythonutils.d.ts +21 -1
  202. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  203. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  204. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  205. package/types/lib/evinser/evinser.d.ts +34 -1
  206. package/types/lib/evinser/evinser.d.ts.map +1 -1
  207. package/types/lib/helpers/agenticToolutils.d.ts +87 -0
  208. package/types/lib/helpers/agenticToolutils.d.ts.map +1 -0
  209. package/types/lib/helpers/remote/dependency-track.d.ts +45 -4
  210. package/types/lib/helpers/remote/dependency-track.d.ts.map +1 -1
  211. package/types/lib/inventory/agentFormulationParser.d.ts.map +1 -1
  212. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  213. package/types/lib/inventory/aiInventory.d.ts.map +1 -1
  214. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  215. package/types/lib/inventory/auditCategories.d.ts +12 -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/communityAiConfigParser.d.ts.map +1 -1
  219. package/types/lib/inventory/depsUtils.d.ts.map +1 -1
  220. package/types/lib/inventory/dosai.d.ts +43 -0
  221. package/types/lib/inventory/dosai.d.ts.map +1 -1
  222. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  223. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  224. package/types/lib/inventory/fetchBatch.d.ts +43 -0
  225. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  226. package/types/lib/inventory/fetchRate.d.ts +9 -6
  227. package/types/lib/inventory/fetchRate.d.ts.map +1 -1
  228. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  229. package/types/lib/inventory/jvmToolEnv.d.ts +190 -0
  230. package/types/lib/inventory/jvmToolEnv.d.ts.map +1 -0
  231. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  232. package/types/lib/inventory/mcpDiscovery.d.ts.map +1 -1
  233. package/types/lib/inventory/mcpServerManifest.d.ts +19 -0
  234. package/types/lib/inventory/mcpServerManifest.d.ts.map +1 -0
  235. package/types/lib/inventory/mcpbBundle.d.ts +19 -0
  236. package/types/lib/inventory/mcpbBundle.d.ts.map +1 -0
  237. package/types/lib/inventory/osinfo.d.ts.map +1 -1
  238. package/types/lib/inventory/plugins.d.ts.map +1 -1
  239. package/types/lib/inventory/protobom.d.ts +18 -13
  240. package/types/lib/inventory/protobom.d.ts.map +1 -1
  241. package/types/lib/inventory/protobomLoader.d.ts.map +1 -1
  242. package/types/lib/inventory/source.d.ts.map +1 -1
  243. package/types/lib/inventory/stylePackageRefs.d.ts +17 -0
  244. package/types/lib/inventory/stylePackageRefs.d.ts.map +1 -0
  245. package/types/lib/inventory/svelteUtils.d.ts +124 -0
  246. package/types/lib/inventory/svelteUtils.d.ts.map +1 -0
  247. package/types/lib/inventory/toolRequirements.d.ts +216 -0
  248. package/types/lib/inventory/toolRequirements.d.ts.map +1 -0
  249. package/types/lib/managers/binary.d.ts.map +1 -1
  250. package/types/lib/managers/docker.d.ts.map +1 -1
  251. package/types/lib/parsers/huggingfaceUtils.d.ts +8 -1
  252. package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
  253. package/types/lib/parsers/onnx.d.ts +28 -0
  254. package/types/lib/parsers/onnx.d.ts.map +1 -0
  255. package/types/lib/parsers/safetensors.d.ts +22 -0
  256. package/types/lib/parsers/safetensors.d.ts.map +1 -0
  257. package/types/lib/stages/postgen/annotationBuilder.d.ts +53 -0
  258. package/types/lib/stages/postgen/annotationBuilder.d.ts.map +1 -0
  259. package/types/lib/stages/postgen/auditBom.d.ts.map +1 -1
  260. package/types/lib/stages/postgen/introspection/annotate.d.ts +81 -0
  261. package/types/lib/stages/postgen/introspection/annotate.d.ts.map +1 -0
  262. package/types/lib/stages/postgen/introspection/commandFacts.d.ts +32 -0
  263. package/types/lib/stages/postgen/introspection/commandFacts.d.ts.map +1 -0
  264. package/types/lib/stages/postgen/introspection/emit.d.ts +71 -0
  265. package/types/lib/stages/postgen/introspection/emit.d.ts.map +1 -0
  266. package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts +154 -0
  267. package/types/lib/stages/postgen/introspection/formulationEvidence.d.ts.map +1 -0
  268. package/types/lib/stages/postgen/introspection/markers.d.ts +58 -0
  269. package/types/lib/stages/postgen/introspection/markers.d.ts.map +1 -0
  270. package/types/lib/stages/postgen/introspection/reflect.d.ts +77 -0
  271. package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -0
  272. package/types/lib/stages/postgen/introspection/report.d.ts +85 -0
  273. package/types/lib/stages/postgen/introspection/report.d.ts.map +1 -0
  274. package/types/lib/stages/postgen/introspection/score.d.ts +149 -0
  275. package/types/lib/stages/postgen/introspection/score.d.ts.map +1 -0
  276. package/types/lib/stages/postgen/introspection/shapeCommand.d.ts +79 -0
  277. package/types/lib/stages/postgen/introspection/shapeCommand.d.ts.map +1 -0
  278. package/types/lib/stages/postgen/parentEdge.d.ts +35 -0
  279. package/types/lib/stages/postgen/parentEdge.d.ts.map +1 -0
  280. package/types/lib/stages/postgen/postgen.d.ts +35 -2
  281. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  282. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  283. package/types/lib/stages/pregen/envAudit.d.ts.map +1 -1
  284. package/types/lib/stages/pregen/pregen.d.ts +131 -0
  285. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  286. package/types/lib/validator/bomValidator.d.ts.map +1 -1
@@ -0,0 +1,216 @@
1
+ /**
2
+ * Resolve the ecosystem a declared tool belongs to.
3
+ *
4
+ * @param {string} tool Declared tool name
5
+ * @returns {string} cdxgen ecosystem name, or "generic" for unknown tools.
6
+ */
7
+ export declare function ecosystemForTool(tool: string): string;
8
+ /**
9
+ * Check whether a version identifier carries a prerelease suffix such as
10
+ * `-rc-3`, `-M2`, or `-milestone-1`. The marker list is exact so that vendor
11
+ * suffixes that merely begin with the same letters, such as the `-crac` java
12
+ * distributions, stay classified as stable.
13
+ *
14
+ * @param {string} version Version identifier
15
+ * @returns {boolean} True for prerelease versions.
16
+ */
17
+ export declare function isPrereleaseVersion(version: string): boolean;
18
+ /**
19
+ * Compare two dotted version identifiers. Numeric components are compared
20
+ * numerically, stable releases rank above prereleases, and prerelease
21
+ * suffixes are compared token-wise so `rc-9` beats `rc-10` only when
22
+ * numerically larger. Missing components count as zero, so `21` equals
23
+ * `21.0.0`.
24
+ *
25
+ * @param {string} a First version
26
+ * @param {string} b Second version
27
+ * @returns {number} Negative when a < b, positive when a > b, zero on equality.
28
+ */
29
+ export declare function compareVersions(a: string, b: string): number;
30
+ /**
31
+ * Extract the JDK major from a `java --version` style description such as
32
+ * `openjdk 21.0.11 2025-04-15` or a bare sdkman java identifier such as
33
+ * `25-tem`. General availability releases print an undotted major
34
+ * (`openjdk 25 2025-09-16`), so the first token starting with a digit is
35
+ * used rather than requiring a dotted version.
36
+ *
37
+ * @param {string} versionDesc Version description string
38
+ * @returns {number|undefined} JDK major version.
39
+ */
40
+ export declare function extractJavaMajor(versionDesc: string): number | undefined;
41
+ /**
42
+ * Extract the first version-looking token from a tool version description,
43
+ * such as `go version go1.23.1 darwin/arm64` or `rustc 1.82.0 (f6e511eec
44
+ * 2024-10-08)`. Leading letters (`v20.11.1`, `go1.23.1`) and quoting are
45
+ * stripped before validation.
46
+ *
47
+ * @param {string} versionDesc Raw version description
48
+ * @returns {string|undefined} The version token, when one is found.
49
+ */
50
+ export declare function extractVersionToken(versionDesc: string): string | undefined;
51
+ export type RequirementVerdict = "satisfied" | "violated" | "unparseable";
52
+ /**
53
+ * Verdict of a declared-requirement check. `unparseable` means the wanted or
54
+ * found value carries no comparable version, which is never evidence of a
55
+ * defect: an unparseable requirement must not produce a mismatch.
56
+ *
57
+ * @typedef {"satisfied"|"violated"|"unparseable"} RequirementVerdict
58
+ */
59
+ /**
60
+ * Check whether a found version satisfies a declared requirement. Wanted
61
+ * forms handled: exact versions (`3.9.9`), major-only and partial pins
62
+ * (`21`, `20.11`), `.x` ranges (`20.x`), caret and tilde ranges (`^20.11`,
63
+ * `~4.9`), comparison ranges (`>=18`, `<21`), hyphen ranges (`1.9 - 2.3`),
64
+ * whitespace-conjoined ranges (`>=18 <=20`), `||` alternatives, and the
65
+ * unconstrained `*`/`latest`. Anything else is unparseable and never
66
+ * violates.
67
+ *
68
+ * @param {string} found Version actually present, possibly embedded in a
69
+ * longer description such as `go version go1.23.1 darwin/arm64`.
70
+ * @param {string} wanted Declared requirement.
71
+ * @returns {RequirementVerdict} Verdict of the check.
72
+ */
73
+ export declare function checkVersionRequirement(found: string, wanted: string): RequirementVerdict;
74
+ /**
75
+ * Classify the result of a failed tool probe. A probe that was denied the
76
+ * right to run must be reported as `denied` — the tool may well be present —
77
+ * while only evidence that the command does not exist counts as `missing`.
78
+ *
79
+ * @param {Object|string|undefined} result Result object from spawnSync, or
80
+ * undefined when no result shape is known.
81
+ * @returns {"found"|"denied"|"missing"} Classification of the probe result.
82
+ */
83
+ export declare function classifyProbeResult(result: Object | string | undefined): "found" | "denied" | "missing";
84
+ /**
85
+ * Classify the active environment restriction that would stop a command from
86
+ * running, without the human-readable wording. `describeSpawnRestriction`
87
+ * derives its message from this classifier, and consumers that need to act on
88
+ * the cause rather than the prose use it directly.
89
+ *
90
+ * @param {string} command Command that would run
91
+ * @returns {"dry-run"|"secure-mode"|"allowlist"|"deno"|undefined} Restriction cause, or undefined when nothing restricts the command.
92
+ */
93
+ export declare function classifySpawnRestriction(command: string): "dry-run" | "secure-mode" | "allowlist" | "deno" | undefined;
94
+ /**
95
+ * Explain why a command probe may not run in the current environment, so a
96
+ * failed probe can be reported as degraded evidence rather than a missing
97
+ * tool.
98
+ *
99
+ * @param {string} command Command that was probed
100
+ * @returns {string|undefined} Human-readable restriction, or undefined when
101
+ * the environment does not restrict the command.
102
+ */
103
+ export declare function describeSpawnRestriction(command: string): string | undefined;
104
+ /**
105
+ * Parse the content of an asdf/mise `.tool-versions` file into the first
106
+ * version each tool declares. Comment lines and inline comments are ignored;
107
+ * a tool line listing several versions keeps the first.
108
+ *
109
+ * @param {string} content `.tool-versions` file content
110
+ * @returns {Object|undefined} Map of tool name to declared version.
111
+ */
112
+ export declare function parseToolVersionsFile(content: string): Object | undefined;
113
+ /**
114
+ * Parse the `go` and `toolchain` directives of a `go.mod` file. The
115
+ * `toolchain` directive wins when both are present because it names the
116
+ * exact toolchain the module asks for.
117
+ *
118
+ * @param {string} content `go.mod` file content
119
+ * @returns {Object|undefined} `{ tool, version, directive }` with
120
+ * `directive` naming the line the version came from.
121
+ */
122
+ export declare function parseGoModFile(content: string): Object | undefined;
123
+ /**
124
+ * Parse a `rust-toolchain.toml` or plain `rust-toolchain` file into its
125
+ * channel. Target-specific subsections are ignored, so only the `[toolchain]`
126
+ * section's `channel` key is read.
127
+ *
128
+ * @param {string} content Toolchain file content
129
+ * @returns {Object|undefined} `{ channel }` when a channel is declared.
130
+ */
131
+ export declare function parseRustToolchainFile(content: string): Object | undefined;
132
+ /**
133
+ * Parse a `package.json` content into the tool requirements it declares
134
+ * through `engines` and `packageManager`. The `packageManager` pin's
135
+ * integrity-hash suffix (`pnpm@9.1.0+sha512.…`) is stripped to the bare
136
+ * version.
137
+ *
138
+ * @param {string} content `package.json` content
139
+ * @returns {Object|undefined} Map of tool name to declared version.
140
+ */
141
+ export declare function parsePackageJsonToolRequirements(content: string): Object | undefined;
142
+ /**
143
+ * Parse a `global.json` file into the .NET SDK version it pins.
144
+ *
145
+ * @param {string} content `global.json` content
146
+ * @returns {Object|undefined} Map with the `dotnet` requirement.
147
+ */
148
+ export declare function parseGlobalJsonToolRequirements(content: string): Object | undefined;
149
+ /**
150
+ * Parse the `requires-python` declaration of a `pyproject.toml` file.
151
+ *
152
+ * @param {string} content `pyproject.toml` content
153
+ * @returns {Object|undefined} Map with the `python` requirement.
154
+ */
155
+ export declare function parsePyprojectRequiresPython(content: string): Object | undefined;
156
+ /**
157
+ * Parse an `.nvmrc` file into the Node.js version it requests.
158
+ *
159
+ * @param {string} content `.nvmrc` content
160
+ * @returns {Object|undefined} Map with the `node` requirement.
161
+ */
162
+ export declare function parseNvmrc(content: string): Object | undefined;
163
+ /**
164
+ * Parse a `.python-version` file into the interpreter version it requests.
165
+ *
166
+ * @param {string} content `.python-version` content
167
+ * @returns {Object|undefined} Map with the `python` requirement.
168
+ */
169
+ export declare function parsePythonVersionFile(content: string): Object | undefined;
170
+ /**
171
+ * Parse a `.java-version` file into the JDK version it pins. Both the bare
172
+ * major (`21`) and a full version (`21.0.5`) occur in the wild, and both are
173
+ * passed through verbatim — an install command needs the exact declaration.
174
+ *
175
+ * The legacy `1.N` spelling of a pre-9 release (`1.8`, `1.8.0_302`) is
176
+ * normalised to its modern major (`8`), because it is the major line that
177
+ * names a package: the literal declaration yields `Temurin.1.JDK`, which no
178
+ * provisioner offers.
179
+ *
180
+ * Distribution-prefixed values written by version managers (`temurin-21`,
181
+ * `openjdk64-17.0.1`) name a vendor build rather than a release, so they are
182
+ * left unparsed rather than turned into an install argument no provisioner
183
+ * accepts; the run then reports the version as unresolved and the agent asks.
184
+ *
185
+ * @param {string} content `.java-version` content
186
+ * @returns {Object|undefined} Map with the `java` requirement.
187
+ */
188
+ export declare function parseJavaVersionFile(content: string): Object | undefined;
189
+ /**
190
+ * Parse the `BUNDLED WITH` section of a `Gemfile.lock` into the bundler
191
+ * version the lockfile was written with.
192
+ *
193
+ * @param {string} content `Gemfile.lock` content
194
+ * @returns {string|undefined} Bundler version, when declared.
195
+ */
196
+ export declare function parseGemfileLockBundlerVersion(content: string): string | undefined;
197
+ /**
198
+ * Read every declared tool requirement a project directory declares through
199
+ * its well-known tool pin files: `.tool-versions`, `.nvmrc`, `.java-version`,
200
+ * `.python-version`, `pyproject.toml`, `go.mod`, `rust-toolchain.toml`,
201
+ * `rust-toolchain`, `package.json`, and `global.json`. Missing files are
202
+ * skipped; each entry names the file that declared it so the report can
203
+ * trace every expectation back to its source.
204
+ *
205
+ * @param {string} projectPath Project directory to inspect
206
+ * @returns {Array<{tool: string, wanted: string, source: string, ecosystem: string, path: string}>}
207
+ * Declared requirements, empty when the directory declares none.
208
+ */
209
+ export declare function readDeclaredToolRequirements(projectPath: string): Array<{
210
+ tool: string;
211
+ wanted: string;
212
+ source: string;
213
+ ecosystem: string;
214
+ path: string;
215
+ }>;
216
+ //# sourceMappingURL=toolRequirements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolRequirements.d.ts","sourceRoot":"","sources":["../../../lib/inventory/toolRequirements.js"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAH1B,MAG0B,GAFxB,MAAM,CAIlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAHhC,MAGgC,GAF9B,OAAO,CAanB;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AAM,gBACN,MAAM,KACJ,OAAO,CAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAgC3C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;CA2E1B,CAAC;AAkCF;;GAEG;AACH,eAAO,MAAM,QAAQ,sCA2LpB,CAAC;AAGC,YAA4B,gBAAgB,GAAlC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAkB;AAiH/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,kBANZ,MAAM,OACN,MAAM,WACN,MAAM,KACJ,OAAO,CAAC,OAAO,CAqF3B,CAAC;AAiGF;;;GAGG;AACH,eAAO,MAAM,aAAa,mEAqGzB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB,iBATrB,MAAM,aACN,MAAM,WACN,MAAM,wBACN,MAAM,WACN,MAAM,KACJ,OAAO,CAAC,MAAM,CAgI1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,oDAkJvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,iDAkJ1B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,kBALb,MAAM,UACN,OAAO,KACL,OAAO,CAAC,MAAM,GAAC,SAAS,CAKpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,cALpB,MAAM,iBACN,MAAM,KACJ,MAAM,GAAC,SA2CnB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,qBAHpB,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC,cACnC,KAAK,CAAC,MAAM,CAAC,SA4BvB,CAAC"}
@@ -84,9 +84,16 @@ export declare function toHuggingFacePurl(repoId: string, version?: string, repo
84
84
  * Normalize a direct Hugging Face URL or purl into a repo reference.
85
85
  *
86
86
  * @param {string} value direct URL, API URL, or purl
87
+ * @param {object} [parseOptions] parsing options
88
+ * @param {boolean} [parseOptions.explicitOnly=false] resolve only unambiguous
89
+ * references (`pkg:huggingface/...` purls and huggingface.co URLs) so that
90
+ * ambiguous `owner/repo`-shaped values keep their filesystem-path meaning
91
+ * until an AI inventory type is explicitly selected
87
92
  * @returns {{ assetType: string, repoId: string, version?: string }|undefined} normalized reference
88
93
  */
89
- export declare function normalizeHuggingFaceReference(value: string): {
94
+ export declare function normalizeHuggingFaceReference(value: string, parseOptions?: {
95
+ explicitOnly?: boolean;
96
+ }): {
90
97
  assetType: string;
91
98
  repoId: string;
92
99
  version?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"huggingfaceUtils.d.ts","sourceRoot":"","sources":["../../../lib/parsers/huggingfaceUtils.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAEyC,CAAC;AACpD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAFlC,GAAG,CAAC,MAAM,CAYlB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,EAFtC,MAEkE,CAAC;AAC7E;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAFpC,MAE8D,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAgB,oCAAoC,CAAC,SAAS,EAJnD,MAImD,GAHjD,MAAM,GAAC,SAAS,CAW5B;AAED;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CAAC,aAAa,EAJxD,MAIwD,GAHtD,MAAM,GAAC,SAAS,CAiB5B;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAHrC,MAGqC,GAFnC,MAAM,GAAC,SAAS,CAoC5B;AAYD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAHxC,MAGwC,GAFtC,MAAM,CAQlB;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAJrC,MAIqC,EAAE,MAAM,EAH7C,MAG6C,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,MAIoC,EAAE,OAAO,AAH5D,CACA,EADQ;IAAE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAC,SAAS,KAAK,MAAM,GAAC,SAAS,CAAA;CAGH,GAFvD;IAAE,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAC,SAAS,CAyBtG;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,AAHhD,CACA,EADQ,KAAK,CAAC,MAAM,CAGiC,GAF3C,KAAK,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBlE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,kBAAkB,EAHnD,MAAM,GAAC,MAG4C,GAFjD,MAAM,GAAC,SAAS,CAoB5B"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Read the identifying header fields of an ONNX model file.
3
+ *
4
+ * Only `ir_version`, `producer_name`, `producer_version`, `model_version`,
5
+ * and the `opset_import` entries are extracted. The graph and every other
6
+ * payload are skipped by offset without being read, so no tensor data is
7
+ * ever loaded and no model code is executed.
8
+ *
9
+ * @param {string} filePath Path to the `.onnx` file
10
+ * @returns {{
11
+ * irVersion: number,
12
+ * producerName: string,
13
+ * producerVersion: string,
14
+ * modelVersion: number,
15
+ * opsets: Array<{domain: string, version: number}>,
16
+ * } | undefined} Header summary, or undefined when it cannot be read
17
+ */
18
+ export declare function readOnnxHeader(filePath: string): {
19
+ irVersion: number;
20
+ producerName: string;
21
+ producerVersion: string;
22
+ modelVersion: number;
23
+ opsets: Array<{
24
+ domain: string;
25
+ version: number;
26
+ }>;
27
+ } | undefined;
28
+ //# sourceMappingURL=onnx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onnx.d.ts","sourceRoot":"","sources":["../../../lib/parsers/onnx.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAT5B,MAS4B,GAR1B;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CAClD,GAAG,SAAS,CAwGf"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Read and parse the JSON header of a safetensors model file.
3
+ *
4
+ * Only the leading header is read; tensor payloads are ignored. The returned
5
+ * object separates the optional `__metadata__` map from the per-tensor
6
+ * descriptors.
7
+ *
8
+ * @param {string} filePath Path to a `.safetensors` file
9
+ * @returns {{
10
+ * metadata: Object,
11
+ * tensorCount: number,
12
+ * dtypes: string[],
13
+ * totalParameters: number,
14
+ * } | undefined} Parsed header summary, or undefined when it cannot be read
15
+ */
16
+ export declare function readSafetensorsHeader(filePath: string): {
17
+ metadata: Object;
18
+ tensorCount: number;
19
+ dtypes: string[];
20
+ totalParameters: number;
21
+ } | undefined;
22
+ //# sourceMappingURL=safetensors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safetensors.d.ts","sourceRoot":"","sources":["../../../lib/parsers/safetensors.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EARnC,MAQmC,GAPjC;IACR,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,SAAS,CAuCf"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Shared assembly of CycloneDX document-level annotations.
3
+ *
4
+ * Two postgen features attach findings to the BOM document as annotations
5
+ * whose `subjects` is the BOM serial number: the BOM audit's rule findings and
6
+ * the build introspection's remediations. Both describe the document rather
7
+ * than a component, both are annotated by the cdxgen tool component from
8
+ * metadata, and both carry the document's own timestamp because an annotation
9
+ * describes the document it is attached to. The structured facts travel as
10
+ * `name`/`value` pairs rendered into the annotation text, one `:evidence:<key>`
11
+ * entry per evidence item.
12
+ */
13
+ /**
14
+ * Flatten an evidence object into `:evidence:<key>` property entries. Nested
15
+ * values are serialized as JSON so every property value stays a string.
16
+ *
17
+ * @param {string} propertyNamePrefix Property namespace, e.g. "cdx:audit".
18
+ * @param {Object} evidence Arbitrary key/value evidence facts.
19
+ * @returns {{name: string, value: string}[]} Property entries.
20
+ */
21
+ export declare function evidenceProperties(propertyNamePrefix: string, evidence: Object): {
22
+ name: string;
23
+ value: string;
24
+ }[];
25
+ /**
26
+ * Build one document-level annotation. Returns undefined when the BOM carries
27
+ * no cdxgen tool component to annotate with; the caller decides whether that
28
+ * is worth a warning.
29
+ *
30
+ * @param {Object} params Annotation inputs.
31
+ * @param {Object} params.bomJson CycloneDX BOM the annotation describes.
32
+ * @param {string} params.message Leading annotation sentence.
33
+ * @param {{name: string, value: string}[]} params.properties Structured facts rendered into the annotation text.
34
+ * @returns {Object|undefined} CycloneDX annotation, or undefined without an annotator.
35
+ */
36
+ export declare function buildDocumentAnnotation({ bomJson, message, properties }: {
37
+ bomJson: Object;
38
+ message: string;
39
+ properties: {
40
+ name: string;
41
+ value: string;
42
+ }[];
43
+ }): Object | undefined;
44
+ /**
45
+ * Warn that a document could not be annotated because it carries no cdxgen
46
+ * tool component. Suppressed outside debug mode, where the missing annotator
47
+ * is an expected shape for foreign BOMs.
48
+ *
49
+ * @param {string} feature Feature that wanted to annotate.
50
+ * @returns {void}
51
+ */
52
+ export declare function warnMissingAnnotator(feature: string): void;
53
+ //# sourceMappingURL=annotationBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotationBuilder.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/annotationBuilder.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,kBAAkB,EAJ1C,MAI0C,EAAE,QAAQ,EAHpD,MAGoD,GAFlD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAAE,CAe3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,EALrE;IAAuB,OAAO,EAAtB,MAAM,CACd;IAAuB,OAAO,EAAtB,MAAM,CACd;IAAgD,UAAU,EAAlD;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,EAAE,CACvC;CAEqE,GAF3D,MAAM,GAAC,SAAS,CAkB5B;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAHjC,MAGiC,GAF/B,IAAI,CAQhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"auditBom.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/auditBom.js"],"names":[],"mappings":"AA8DA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB,OAAO,CAInB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAH1B,MAG0B,GAFxB,OAAO,CA4BnB;AAuBD;;;;;GAKG;AACH,wBAAsB,+BAA+B,CAAC,OAAO,AAH1D,CACA,EADQ,MAGuD,GAFrD,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAKrG;AAED;;;;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AAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAKrG;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAHvC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAGvC,GAFrC,MAAM,CAOlB;AA+BD;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAHzC,MAGyC,EAAE,OAAO,GAFlD,MAEuD,QAuBjE;AAED;;;;;;;GAOG;AACH,wBAAsB,2BAA2B,CAAC,OAAO,EAH9C,MAG8C,EAAE,OAAO,GAFvD,MAE4D,iBAkCtE;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,OAAO,CAwC1B;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,OAAA,GAFvC,MAAM,CAmClB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,OAAA,GAF/B,MAAM,CAQlB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,OAAA,EAAE,OAAO,EAHxC,MAGwC,SAyElD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAA,OAQpD"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * BOM mutations that carry the introspection verdict inside the document:
3
+ * eight metadata properties and a block of document-level annotations.
4
+ *
5
+ * Sidecar report files get lost; the BOM travels. A consumer who receives
6
+ * only the BOM still learns how much to trust it from the metadata properties,
7
+ * and the annotations carry one entry per remediation the loop should act on.
8
+ * No component or dependency is touched.
9
+ *
10
+ * Both mutations are replace-by-name: a document that was already introspected
11
+ * (a BOM enriched again after an evidence pass) loses its previous
12
+ * introspection state and gains a fresh one, so the verdict always describes
13
+ * the final document.
14
+ */
15
+ /**
16
+ * Version of the introspection BOM surface. Matches the JSON report's
17
+ * schemaVersion so the two stay comparable.
18
+ *
19
+ * @type {string}
20
+ */
21
+ export declare const INTROSPECTION_SCHEMA_VERSION: string;
22
+ /**
23
+ * Namespace of every property and annotation entry this module emits.
24
+ *
25
+ * @type {string}
26
+ */
27
+ export declare const INTROSPECTION_PROPERTY_PREFIX: string;
28
+ /**
29
+ * The metadata properties that summarize the verdict, in emission order. The
30
+ * overall tier and confidence are omitted when the run produced no scored row
31
+ * (nothing was graded, so no verdict is claimed); per-ecosystem rows cover the
32
+ * scored ecosystems only, since unsupported ones have neither a tier nor a
33
+ * score.
34
+ *
35
+ * @param {Object} reflection Reflection document from reflectOnRun.
36
+ * @param {Object} scored Scoring document from scoreReflection.
37
+ * @returns {{name: string, value: string}[]} Metadata property entries.
38
+ */
39
+ export declare function introspectionMetadataProperties(reflection: Object, scored: Object): {
40
+ name: string;
41
+ value: string;
42
+ }[];
43
+ /**
44
+ * Attach the introspection verdict to the document: metadata properties plus
45
+ * the summary and remediation annotations. Any introspection state left on the
46
+ * document by a previous pass is removed first, so enrichment flows that run
47
+ * post-processing twice leave exactly one verdict.
48
+ *
49
+ * @param {Object} bomJson CycloneDX BOM, mutated in place.
50
+ * @param {Object} reflection Reflection document from reflectOnRun.
51
+ * @param {Object} scored Scoring document from scoreReflection.
52
+ * @param {Object} [guards] Emission guards.
53
+ * @param {boolean} [guards.annotations] False skips the annotations, for documents at a spec version that predates them.
54
+ * @returns {Object} The mutated BOM.
55
+ */
56
+ export declare function applyIntrospectionToBom(bomJson: Object, reflection: Object, scored: Object, guards?: {
57
+ annotations?: boolean;
58
+ }): Object;
59
+ /**
60
+ * Stamp every formulation workflow with the id of the run that reflected over
61
+ * the document, so a later consumer of the BOM can tell a formulation record
62
+ * this run generated from one that arrived with a foreign BOM. The stamp is
63
+ * replace-by-name, matching how the rest of the verdict mutates the
64
+ * document: a BOM enriched twice keeps only the latest run's id.
65
+ *
66
+ * @param {Object} bomJson CycloneDX BOM, mutated in place.
67
+ * @param {string} runId Run id of the introspection pass.
68
+ * @returns {Object} The mutated BOM.
69
+ */
70
+ export declare function applyFormulationRunIdMarker(bomJson: Object, runId: string): Object;
71
+ /**
72
+ * Whether a BOM already carries an introspection verdict.
73
+ *
74
+ * Evidence collection re-processes a finished BOM through a fresh wrapper, so
75
+ * the document itself is the only marker that survives between passes.
76
+ *
77
+ * @param {Object} bomJson CycloneDX BOM.
78
+ * @returns {boolean} True when the BOM was already introspected.
79
+ */
80
+ export declare function hasIntrospectionVerdict(bomJson: Object): boolean;
81
+ //# sourceMappingURL=annotate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotate.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/annotate.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,EAF/B,MAEuC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAFhC,MAEsD,CAAC;AAEjE;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,EAJ/C,MAI+C,EAAE,MAAM,EAHvD,MAGuD,GAFrD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,EAAE,CA6C3C;AAoHD;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EARE,MAQF,EACP,UAAU,EARD,MAQC,EACV,MAAM,EARG,MAQH,EACN,MAAM,AARL,CAEA,EADA;IAAyB,WAAW,AAApC,CACA,EADQ,OAAO,CACf;CAMU,GANA,MAAM,CAsClB;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAJxC,MAIwC,EAAE,KAAK,EAH/C,MAG+C,GAF7C,MAAM,CAsBlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAOnB"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Command-facts collector for command shaping.
3
+ *
4
+ * Gathers, once per run and cached, the project facts the command resolver
5
+ * consumes: which maven and gradle wrapper scripts the project root carries,
6
+ * which Python manager owns its lock files, and which npm client the project
7
+ * names or locks. Detection is filesystem reads only — existence and, for
8
+ * the platform's own shell scripts, the executable bit. Nothing here spawns
9
+ * a process: whether a wrapper actually runs is a question the run itself
10
+ * answers elsewhere, and shaping that cannot know says so through the
11
+ * resolver's fallbacks.
12
+ */
13
+ /**
14
+ * Gather the command-shaping facts for a project root. The result is cached
15
+ * per root, so repeated scoring passes over the same project read the
16
+ * filesystem once.
17
+ *
18
+ * @param {string} projectRoot Directory that was scanned.
19
+ * @param {Object} [options] Test hooks.
20
+ * @param {"posix"|"windows"} [options.platform] Platform override; defaults to the runtime platform.
21
+ * @returns {import("./shapeCommand.js").CommandFacts} Facts for the resolver.
22
+ */
23
+ export declare function collectCommandFacts(projectRoot: string, options?: {
24
+ platform?: "posix" | "windows";
25
+ }): import("./shapeCommand.js").CommandFacts;
26
+ /**
27
+ * Forget the gathered facts. Test hook; a production run gathers once.
28
+ *
29
+ * @returns {void}
30
+ */
31
+ export declare function clearCommandFactsCache(): void;
32
+ //# sourceMappingURL=commandFacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandFacts.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/commandFacts.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA+NH;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EALpC,MAKoC,EAAE,OAAO,AAJrD,CAEA,EADA;IAAoC,QAAQ,AAA5C,CACA,EADQ,OAAO,GAAC,SAAS,CACzB;CAE0D,GAFhD,OAAO,mBAAmB,EAAE,YAAY,CAyCpD;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAFzB,IAAI,CAIhB"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Report emission for build introspection: resolving report destinations,
3
+ * writing the markdown and JSON reports, and printing the console summary.
4
+ *
5
+ * This module is the only place in the introspection chain that touches the
6
+ * filesystem or prints, which keeps every renderer above it pure and
7
+ * testable against committed fixtures. All writes go through the safe
8
+ * wrappers, and dry-run mode produces the report without writing anything.
9
+ */
10
+ /**
11
+ * Report destination meaning "write this report to the diagnostic stream".
12
+ *
13
+ * @type {string}
14
+ */
15
+ export declare const INTROSPECTION_STDERR_TARGET: string;
16
+ /**
17
+ * Resolve the report destinations for a run. A user-provided path wins; the
18
+ * defaults are derived from the BOM output path so the reports travel with
19
+ * the BOM, falling back to the working directory when the BOM goes to stdout.
20
+ *
21
+ * @param {Object} [options] CLI options.
22
+ * @param {string} [options.output] Path the BOM is written to, or "-" for stdout.
23
+ * @param {string} [options.introspectReport] Requested markdown report path.
24
+ * @param {string} [options.introspectJson] Requested JSON report path.
25
+ * @returns {{reportPath: string, jsonPath: string}} Resolved destinations; "-" means the diagnostic stream.
26
+ */
27
+ export declare function resolveIntrospectionReportPaths(options?: {
28
+ output?: string;
29
+ introspectReport?: string;
30
+ introspectJson?: string;
31
+ }): {
32
+ reportPath: string;
33
+ jsonPath: string;
34
+ };
35
+ /**
36
+ * Mark every remediation in a scoring document blocked because a dry-run
37
+ * records intent without executing anything: no fix the report proposes can
38
+ * be applied by this run, so the loop must not try.
39
+ *
40
+ * @param {Object} scored Scoring document from scoreReflection, mutated in place.
41
+ * @returns {void}
42
+ */
43
+ export declare function blockRemediationsForDryRun(scored: Object): void;
44
+ /**
45
+ * Write the markdown and JSON reports for a completed reflection and return
46
+ * the destinations they reached. Dry-run mode prints the markdown report to
47
+ * the diagnostic stream instead of creating files, matching the read-only
48
+ * contract of the mode.
49
+ *
50
+ * @param {Object} reflection Reflection document from reflectOnRun.
51
+ * @param {Object} scored Scoring document from scoreReflection.
52
+ * @param {Object} [options] CLI options naming the report destinations.
53
+ * @returns {{reportTarget: string|undefined, jsonTarget: string|undefined, dryRun: boolean}} Destinations reached; undefined means the report was not produced as a file.
54
+ */
55
+ export declare function emitIntrospectionReports(reflection: Object, scored: Object, options?: Object): {
56
+ reportTarget: string | undefined;
57
+ jsonTarget: string | undefined;
58
+ dryRun: boolean;
59
+ };
60
+ /**
61
+ * Print the console summary for a completed introspection. Called after the
62
+ * reports are delivered, so every path it names exists (or is the explicit
63
+ * stream marker). Diagnostics go to the diagnostic stream so a piped stdout
64
+ * never carries anything but the BOM payload.
65
+ *
66
+ * @param {Object} scored Scoring document from scoreReflection.
67
+ * @param {Object} [delivery] Destinations returned by emitIntrospectionReports.
68
+ * @returns {void}
69
+ */
70
+ export declare function printIntrospectionSummary(scored: Object, delivery?: Object): void;
71
+ //# sourceMappingURL=emit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emit.d.ts","sourceRoot":"","sources":["../../../../../lib/stages/postgen/introspection/emit.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAiBH;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAF9B,MAEoC,CAAC;AAO/C;;;;;;;;;;GAUG;AACH,wBAAgB,+BAA+B,CAAC,OAAO,AANpD,CAIA,EAHA;IAAyB,MAAM,AAA/B,CACA,EADQ,MAAM,CACd;IAAyB,gBAAgB,AAAzC,CACA,EADQ,MAAM,CACd;IAAyB,cAAc,AAAvC,CACA,EADQ,MAAM,CACd;CAEyD,GAF/C;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,CAgBlD;AAiDD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAHtC,MAGsC,GAFpC,IAAI,CAchB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EALxC,MAKwC,EAAE,MAAM,EAJhD,MAIgD,EAAE,OAAO,AAHjE,CACA,EADQ,MAG8D,GAF5D;IAAC,YAAY,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,UAAU,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAC,CAe3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAJrC,MAIqC,EAAE,QAAQ,AAHvD,CACA,EADQ,MAGoD,GAFlD,IAAI,CAwBhB"}