@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
@@ -2,8 +2,8 @@ export { summarizeAiInventory } from "../inventory/aiInventory.js";
2
2
  export { createAndroidBom, createBinaryBom, dedupeBom, listComponents, } from "./bomAssembly.js";
3
3
  export { createAsarBom, createCaxaBom, createChromeExtensionBom, createNodejsBom, createVscodeExtensionBom, } from "./jsBom.js";
4
4
  export { createJarBom, createJavaBom } from "./jvmBom.js";
5
- export { createCloudBuildBom, createCryptoCertsBom, createCsharpBom, createGitHubBom, createHelmBom, createJenkinsBom, createPHPBom, createPixiBom, createPythonBom, createRubyBom, } from "./managedBom.js";
6
- export { createClojureBom, createCocoaBom, createCppBom, createDartBom, createElixirBom, createGleamBom, createGoBom, createHaskellBom, createNixBom, createRustBom, createSwiftBom, createZigBom, } from "./nativeBom.js";
5
+ export { createCloudBuildBom, createCryptoCertsBom, createCsharpBom, createGitHubBom, createHelmBom, createJenkinsBom, createPerlBom, createPHPBom, createPixiBom, createPythonBom, createRBom, createRubyBom, createTerraformBom, } from "./managedBom.js";
6
+ export { createClojureBom, createCocoaBom, createCppBom, createCrystalBom, createDartBom, createElixirBom, createElmBom, createErlangBom, createGleamBom, createGoBom, createHaskellBom, createJuliaBom, createLuaBom, createNimBom, createNixBom, createOCamlBom, createRustBom, createSpackBom, createSwiftBom, createZigBom, } from "./nativeBom.js";
7
7
  /**
8
8
  * Function to create obom string for the current OS using osquery
9
9
  *
@@ -92,6 +92,14 @@ export declare function createHBom(_path: string, options: Object): Promise<Obje
92
92
  * @param {Object} options Parse options from the cli
93
93
  * @returns {Promise<Object>} Promise resolving to BOM object
94
94
  */
95
+ /**
96
+ * Generate a BOM for one path, letting a deferred fail-on-error abort return
97
+ * the empty BOM the flag promises rather than unwinding past the reports.
98
+ *
99
+ * @param {string} path Source path.
100
+ * @param {Object} options CLI options.
101
+ * @returns {Promise<Object>} BOM NS data.
102
+ */
95
103
  export declare function createBom(path: string, options: Object): Promise<Object>;
96
104
  /**
97
105
  * Method to submit the generated bom to dependency-track or cyclonedx server
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AAmEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAsCnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,eAAe,EACf,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA8B1D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,gBAAgB,CAAC;AAyBxB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAJtB,MAIsB,EAAE,OAAO,EAH/B,MAG+B,GAF7B,OAAO,CAAC,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AE,GAAG,SAAS,CAAC,CA+HjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/cli/index.js"],"names":[],"mappings":"AAyEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAuCnE,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,aAAa,EACb,aAAa,EACb,wBAAwB,EACxB,eAAe,EACf,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0C1D,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,gBAAgB,CAAC;AA8BxB;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAJtB,MAIsB,EAAE,OAAO,EAH/B,MAG+B,GAF7B,OAAO,CAAC,MAAM,CAAC,CAwE3B;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,IAAI,EAJ1C,MAI0C,EAAE,OAAO,EAHnD,MAGmD,GAFjD,OAAO,CAAC,MAAM,CAAC,CAkU3B;AAgCD;;;;;;GAMG;AACH;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAH5B,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAGF,GAF1B,MAAM,CAUlB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAHlC,MAAM,EAG4B,GAFhC,MAAM,CAalB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EALnC,MAAM,GAAC,MAAM,EAKsB,EAAE,OAAO,EAJ5C,MAI4C,GAH1C,OAAO,CAAC,MAAM,CAAC,CAqmC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAJhC,MAIgC,EAAE,OAAO,EAHzC,MAGyC,GAFvC,OAAO,CAAC,MAAM,CAAC,CAoD3B;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAJ1B,MAI0B,EAAE,OAAO,EAHnC,MAGmC,GAFjC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CA0gBrC;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAAC,MAAM,CAAC,CAsB3B;AAED;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAJzB,MAIyB,EAAE,OAAO,EAHlC,MAGkC,GAFhC,OAAO,CAAC,MAAM,CAAC,CAa3B;AA0XD;;;;;;;GAOG;AACH,wBAAsB,SAAS,CAAC,IAAI,EALzB,MAKyB,EAAE,WAAW,EAJtC,MAIsC,GAHrC,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CA+FjD"}
@@ -3,6 +3,13 @@
3
3
  * local Modelfile/`.gguf` file input. Returns the explicit selection from
4
4
  * `getExactAiInventoryType` when one is present.
5
5
  *
6
+ * Direct HuggingFace interpretation of the source path is opt-in: only
7
+ * unambiguous references (`pkg:huggingface/...` purls and huggingface.co
8
+ * URLs) are recognized on their own. Bare `owner/repo`-shaped values are
9
+ * ordinary relative paths (eg: `repotests/sveltejs-realworld`) unless an AI
10
+ * inventory type such as `-t ai` is explicitly selected, in which case
11
+ * `getExactAiInventoryType` already returned it above.
12
+ *
6
13
  * @param {string} path Project or file path
7
14
  * @param {object} options CLI options
8
15
  * @returns {string|undefined} The detected AI inventory type (`"ai"`) or undefined
@@ -52,6 +59,22 @@ export declare function createCaxaBom(path: string, options: Object): Promise<Ob
52
59
  * @returns {Promise<Object>} Promise resolving to BOM object
53
60
  */
54
61
  export declare function createVscodeExtensionBom(path: string, options: Object): Promise<Object>;
62
+ /**
63
+ * Create a BOM that catalogs agentic CLI tools installed for the current user
64
+ * (for example Kiro CLI, zcode, opencode, and Claude Code), along with the
65
+ * agents, plugins, and providers they define.
66
+ *
67
+ * The scan is read-only and value-redacting: it records tool versions where a
68
+ * declarative source exists, plus structural counts, but never reads
69
+ * credentials, transcripts, session logs, or telemetry.
70
+ *
71
+ * @param {string} path Positional input. A host scan does not read a project
72
+ * tree, so an explicit path other than the current directory is rejected
73
+ * rather than silently ignored.
74
+ * @param {Object} options Parse options from the CLI
75
+ * @returns {Promise<Object>} Promise resolving to BOM data
76
+ */
77
+ export declare function createAgenticBom(path: string, options: Object): Promise<Object>;
55
78
  /**
56
79
  * Function to create BOM for Electron ASAR archives.
57
80
  *
@@ -1 +1 @@
1
- {"version":3,"file":"jsBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jsBom.js"],"names":[],"mappings":"AA+FA;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAJlC,MAIkC,EAAE,OAAO,EAH3C,MAG2C,GAFzC,MAAM,GAAC,SAAS,CAwB5B;AAED;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,CAAC,CA4zC3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAFtB,MAE4C,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CACjD,aAAa,EANJ,MAMI,EACb,OAAO,EANE,MAMF,EACP,OAAO,EANE,MAAM,EAMR,EACP,YAAY,EANH,MAAM,EAMH,iBAsBb"}
@@ -1 +1 @@
1
- {"version":3,"file":"jvmBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jvmBom.js"],"names":[],"mappings":"AAwFA;;;;;GAKG;AACH,eAAO,IAAI,gBAAgB,EAFjB,MAIsD,CAAC;AAUjE;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,EAHrB,MAQT,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,aAAa,EAHhB,MAIqE,CAAC;AAEhF;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAL5B,MAK4B,EAAE,OAAO,EAJrC,MAIqC,GAFnC,MAAM,CA8ElB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EALxC,MAKwC,EAAE,MAAM,EAJhD,MAIgD,EAAE,GAAG,EAHrD,MAGqD,GAFnD,MAAM,EAAE,CA4CpB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CA0iD3B"}
1
+ {"version":3,"file":"jvmBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/jvmBom.js"],"names":[],"mappings":"AAiGA;;;;;GAKG;AACH,eAAO,IAAI,gBAAgB,EAFjB,MAIsD,CAAC;AAUjE;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,EAHrB,MAQT,CAAC;AAEF;;;;;GAKG;AAEH,eAAO,MAAM,aAAa,EAHhB,MAIqE,CAAC;AAEhF;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAL5B,MAK4B,EAAE,OAAO,EAJrC,MAIqC,GAFnC,MAAM,CA8ElB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EALxC,MAKwC,EAAE,MAAM,EAJhD,MAIgD,EAAE,GAAG,EAHrD,MAGqD,GAFnD,MAAM,EAAE,CA8DpB;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAwtD3B"}
@@ -102,4 +102,37 @@ export declare function createCsharpBom(path: string, options: Object): Promise<
102
102
  * @returns {Promise<Object>} Promise resolving to BOM object
103
103
  */
104
104
  export declare function createCryptoCertsBom(path: string, options: Object): Promise<Object>;
105
+ /**
106
+ * Function to create bom string for R projects using renv.
107
+ *
108
+ * The `renv.lock` file carries the resolved package set for the project
109
+ * library, including the R version it was produced under.
110
+ *
111
+ * @param {string} path to the project
112
+ * @param {Object} options Parse options from the cli
113
+ * @returns {Object} BOM object
114
+ */
115
+ export declare function createRBom(path: string, options: Object): Object;
116
+ /**
117
+ * Function to create bom string for Perl projects using Carton.
118
+ *
119
+ * The `cpanfile.snapshot` carries the resolved install set; the declared
120
+ * `cpanfile` is consulted to distinguish direct dependencies.
121
+ *
122
+ * @param {string} path to the project
123
+ * @param {Object} options Parse options from the cli
124
+ * @returns {Object} BOM object
125
+ */
126
+ export declare function createPerlBom(path: string, options: Object): Object;
127
+ /**
128
+ * Function to create bom string for Terraform and OpenTofu projects.
129
+ *
130
+ * The `.terraform.lock.hcl` file pins the providers the configuration
131
+ * resolves to, with content hashes suitable for the CycloneDX hashes array.
132
+ *
133
+ * @param {string} path to the project
134
+ * @param {Object} options Parse options from the cli
135
+ * @returns {Object} BOM object
136
+ */
137
+ export declare function createTerraformBom(path: string, options: Object): Object;
105
138
  //# sourceMappingURL=managedBom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"managedBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/managedBom.js"],"names":[],"mappings":"AAqHA;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,QAJ5B,MAAM,Y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wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6B,EAAE,OAAO,EAHtC,MAGsC,GAFpC,OAAO,CAAC,MAAM,CAAC,CAkS3B;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAJ/B,MAI+B,EAAE,OAAO,EAHxC,MAGwC,GAFtC,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAsfrC;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAJpC,MAIoC,EAAE,OAAO,EAH7C,MAG6C,GAF3C,OAAO,CAAC,MAAM,CAAC,CAmF3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAJpB,MAIoB,EAAE,OAAO,EAH7B,MAG6B,GAF3B,MAAM,CA2DlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAJvB,MAIuB,EAAE,OAAO,EAHhC,MAGgC,GAF9B,MAAM,CAmClB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAJ5B,MAI4B,EAAE,OAAO,EAHrC,MAGqC,GAFnC,MAAM,CAyBlB"}
@@ -13,14 +13,7 @@ export declare function getCargoCacheDir(): string | undefined;
13
13
  * @returns {Promise<Object | undefined>} Promise resolving to a BOM object or `undefined`
14
14
  */
15
15
  export declare function createGoBom(path: string, options: Object): Promise<Object | undefined>;
16
- /**
17
- * Function to create bom string for Rust projects
18
- *
19
- * @param {string} path to the project
20
- * @param {Object} options Parse options from the cli
21
- * @returns {Promise<Object|undefined>} Promise resolving to a BOM object or undefined
22
- */
23
- export declare function createRustBom(path: string, options: Object): Promise<Object | undefined>;
16
+ export declare function createRustBom(path: any, options: any): Promise<Object | undefined>;
24
17
  /**
25
18
  * Parses a `.crate` file name into a CycloneDX component (name, version, purl,
26
19
  * bom-ref, and source/cache properties). Returns undefined when the file name
@@ -73,6 +66,19 @@ export declare function createCppBom(path: string, options: Object): Object;
73
66
  * @returns {Object} BOM object
74
67
  */
75
68
  export declare function createClojureBom(path: string, options: Object): Object;
69
+ /**
70
+ * Locate the Stack lock files under a path.
71
+ *
72
+ * Stack names the lock after the configuration file it completes, so the
73
+ * default `stack.yaml` produces `stack.yaml.lock` and a project with several
74
+ * configurations produces one lock per configuration. `stack.lock` is also
75
+ * accepted because tooling and documentation examples have used that name.
76
+ *
77
+ * @param {string} path Project path
78
+ * @param {Object} options Parse options from the cli
79
+ * @returns {string[]} Lock file paths, deduplicated
80
+ */
81
+ export declare function findStackLockFiles(path: string, options: Object): string[];
76
82
  /**
77
83
  * Function to create bom string for Haskell projects
78
84
  *
@@ -140,4 +146,78 @@ export declare function createZigBom(path: string, options: Object): Promise<Obj
140
146
  * @returns {Promise<Object>} Promise resolving to BOM object
141
147
  */
142
148
  export declare function createGleamBom(path: string, options: Object): Promise<Object>;
149
+ /**
150
+ * Function to create bom string for Julia projects.
151
+ *
152
+ * The resolved `Manifest.toml` is preferred over the declared `Project.toml`
153
+ * so the BOM carries pinned versions and the package graph.
154
+ *
155
+ * @param {string} path to the project
156
+ * @param {Object} options Parse options from the cli
157
+ * @returns {Promise<Object>} BOM object
158
+ */
159
+ export declare function createJuliaBom(path: string, options: Object): Promise<Object>;
160
+ /**
161
+ * Function to create bom string for Erlang projects using rebar3.
162
+ *
163
+ * @param {string} path to the project
164
+ * @param {Object} options Parse options from the cli
165
+ * @returns {Promise<Object>} BOM object
166
+ */
167
+ export declare function createErlangBom(path: string, options: Object): Promise<Object>;
168
+ /**
169
+ * Function to create bom string for OCaml projects using opam.
170
+ *
171
+ * Resolved `.opam.locked` files are preferred; a plain `.opam` file is used
172
+ * as a declared fallback with unpinned versions.
173
+ *
174
+ * @param {string} path to the project
175
+ * @param {Object} options Parse options from the cli
176
+ * @returns {Promise<Object>} BOM object
177
+ */
178
+ export declare function createOCamlBom(path: string, options: Object): Promise<Object>;
179
+ /**
180
+ * Function to create bom string for Elm projects.
181
+ *
182
+ * @param {string} path to the project
183
+ * @param {Object} options Parse options from the cli
184
+ * @returns {Promise<Object>} BOM object
185
+ */
186
+ export declare function createElmBom(path: string, options: Object): Promise<Object>;
187
+ /**
188
+ * Function to create bom string for Crystal projects using shards.
189
+ *
190
+ * @param {string} path to the project
191
+ * @param {Object} options Parse options from the cli
192
+ * @returns {Promise<Object>} BOM object
193
+ */
194
+ export declare function createCrystalBom(path: string, options: Object): Promise<Object>;
195
+ /**
196
+ * Function to create bom string for Nim projects using nimble.
197
+ *
198
+ * @param {string} path to the project
199
+ * @param {Object} options Parse options from the cli
200
+ * @returns {Promise<Object>} BOM object
201
+ */
202
+ export declare function createNimBom(path: string, options: Object): Promise<Object>;
203
+ /**
204
+ * Function to create bom string for Lua projects using LuaRocks.
205
+ *
206
+ * When a `luarocks.lock` is present next to a rockspec it supplies the
207
+ * resolved versions; otherwise the rockspec's declared dependencies are
208
+ * inventoried without versions.
209
+ *
210
+ * @param {string} path to the project
211
+ * @param {Object} options Parse options from the cli
212
+ * @returns {Promise<Object>} BOM object
213
+ */
214
+ export declare function createLuaBom(path: string, options: Object): Promise<Object>;
215
+ /**
216
+ * Function to create bom string for Spack environments.
217
+ *
218
+ * @param {string} path to the project
219
+ * @param {Object} options Parse options from the cli
220
+ * @returns {Promise<Object>} BOM object
221
+ */
222
+ export declare function createSpackBom(path: string, options: Object): Promise<Object>;
143
223
  //# sourceMappingURL=nativeBom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nativeBom.d.ts","sourceRoot":"","sources":["../../../lib/cli/nativeBom.js"],"names":[],"mappings":"AA2IA;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAFnB,MAAM,GAAC,SAAS,CAU5B;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAJ3B,MAI2B,EAAE,OAAO,EAHpC,MAGoC,GAFlC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAwavC;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAJ7B,MAI6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B5B;AAED,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,UAAY,CAAC;AAE7C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EALC,MAKD,EACR,eAAe,AALd,CACA,EADQ,MAKwD,GAJtD,OAAO,CA+BnB;AAED;;;;;GAKG;AAEH,wBAAgB,mBAAmB,CAAC,GAAG,EAJ5B,MAI4B,GAH1B,OAAO,CAmBnB;AAmED,uLAAuL;AACvL,eAAO,MAAM,WAAW,UAyItB,CAAC;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,GACzB,CAAC"}
@@ -0,0 +1,272 @@
1
+ /**
2
+ * Build ledger: an opt-in, worker-safe recorder of structured build-adequacy
3
+ * events.
4
+ *
5
+ * Producers record what a run did to its build environment — the tool versions
6
+ * a project expected, the tools that were actually found, the commands that
7
+ * failed, the fallback code paths that were taken — and the post-generation
8
+ * reflection turns those events into a fidelity verdict. The recorder follows
9
+ * the shape of `activity.js` but stays a separate stream: activity records
10
+ * describe security-relevant side effects consumed by the secure-mode
11
+ * machinery, while ledger events describe environment adequacy consumed by the
12
+ * introspection report.
13
+ *
14
+ * Two facts about workers shape the design:
15
+ *
16
+ * 1. A worker thread gets its own instance of this module, so events recorded
17
+ * inside a worker are invisible to the main thread's in-memory buffer.
18
+ * When `CDXGEN_INTROSPECT_LEDGER` is set, every instance appends its events
19
+ * to the same JSONL sidecar through an `O_APPEND` descriptor (only the main
20
+ * thread truncates, at open), which makes the sidecar the only complete
21
+ * record of a multi-worker run. Consumers must therefore prefer the sidecar
22
+ * when it exists and fall back to `getLedgerEvents()` only when it does not.
23
+ * 2. Every write reaches the descriptor synchronously at record time, so a
24
+ * lost tail is impossible; the descriptor is released when the process
25
+ * exits (`closeLogStreams` closes every shared writer) or earlier through
26
+ * {@link closeLedger}.
27
+ *
28
+ * Values that could carry credentials are scrubbed before they are stored or
29
+ * written: `command`, `path`, `detail`, `causeDetail` and `outputExcerpt` pass
30
+ * through sensitive-assignment redaction plus the BOM property sanitizer, so a
31
+ * leaked token can never reach a report file that agents upload.
32
+ */
33
+ export type LedgerEvent = {
34
+ /**
35
+ * One of LEDGER_EVENT_KINDS.
36
+ */
37
+ kind: string;
38
+ /**
39
+ * Canonical project type ("java", "npm", "python", …).
40
+ */
41
+ ecosystem: string;
42
+ /**
43
+ * Tool identity ("maven", "gradle", "swift", "dotnet").
44
+ */
45
+ tool?: string;
46
+ /**
47
+ * Version or version range the project asked for.
48
+ */
49
+ wanted?: string;
50
+ /**
51
+ * Version actually resolved, or undefined when absent.
52
+ */
53
+ found?: string;
54
+ /**
55
+ * How `found` was determined ("PATH", "wrapper", "sdkman", "env").
56
+ */
57
+ source?: string;
58
+ /**
59
+ * Absolute path of the resolved tool or the file that was read.
60
+ */
61
+ path?: string;
62
+ /**
63
+ * Command line, already redacted.
64
+ */
65
+ command?: string;
66
+ exitCode?: number;
67
+ /**
68
+ * One sentence, present tense, no remediation text.
69
+ */
70
+ detail?: string;
71
+ /**
72
+ * Short diagnosed cause of a failure ("gradle cannot run on Java 21"), when the producer derived one.
73
+ */
74
+ causeDetail?: string;
75
+ /**
76
+ * Redacted, at most the last 2000 characters of the failed command's combined stdout and stderr, with interior newlines preserved. Suppressed entirely by `CDXGEN_INTROSPECT_NO_OUTPUT`.
77
+ */
78
+ outputExcerpt?: string;
79
+ /**
80
+ * Key into the remediation catalog (Deliverable 06).
81
+ */
82
+ remediationId?: string;
83
+ /**
84
+ * One of LEDGER_EVENT_IMPACTS.
85
+ */
86
+ impact?: string;
87
+ /**
88
+ * ISO 8601.
89
+ */
90
+ timestamp: string;
91
+ };
92
+ /**
93
+ * A structured build-adequacy event.
94
+ *
95
+ * @typedef {Object} LedgerEvent
96
+ * @property {string} kind One of LEDGER_EVENT_KINDS.
97
+ * @property {string} ecosystem Canonical project type ("java", "npm", "python", …).
98
+ * @property {string} [tool] Tool identity ("maven", "gradle", "swift", "dotnet").
99
+ * @property {string} [wanted] Version or version range the project asked for.
100
+ * @property {string} [found] Version actually resolved, or undefined when absent.
101
+ * @property {string} [source] How `found` was determined ("PATH", "wrapper", "sdkman", "env").
102
+ * @property {string} [path] Absolute path of the resolved tool or the file that was read.
103
+ * @property {string} [command] Command line, already redacted.
104
+ * @property {number} [exitCode]
105
+ * @property {string} [detail] One sentence, present tense, no remediation text.
106
+ * @property {string} [causeDetail] Short diagnosed cause of a failure ("gradle cannot run on Java 21"), when the producer derived one.
107
+ * @property {string} [outputExcerpt] Redacted, at most the last 2000 characters of the failed command's combined stdout and stderr, with interior newlines preserved. Suppressed entirely by `CDXGEN_INTROSPECT_NO_OUTPUT`.
108
+ * @property {string} [remediationId] Key into the remediation catalog (Deliverable 06).
109
+ * @property {string} [impact] One of LEDGER_EVENT_IMPACTS.
110
+ * @property {string} timestamp ISO 8601.
111
+ */
112
+ /**
113
+ * The closed set of event kinds. `kind` is validated against this object: a
114
+ * kind that is not listed is dropped (with a think-log note) rather than
115
+ * recorded, so a producer bug can never fail a customer's SBOM run. Adding a
116
+ * kind here is a schema change; consumers must tolerate unknown kinds by
117
+ * ignoring them.
118
+ *
119
+ * @type {Readonly<Record<string, string>>}
120
+ */
121
+ export declare const LEDGER_EVENT_KINDS: Readonly<Record<string, string>>;
122
+ /**
123
+ * The closed set of `impact` values, describing what a degraded outcome costs
124
+ * the fidelity of the generated BOM.
125
+ *
126
+ * @type {Readonly<Record<string, string>>}
127
+ */
128
+ export declare const LEDGER_EVENT_IMPACTS: Readonly<Record<string, string>>;
129
+ /**
130
+ * Reserved `ecosystem` value for events that describe the recorder itself
131
+ * rather than a project ecosystem, such as the truncation marker. Consumers
132
+ * that group events by ecosystem must treat it as a global observation instead
133
+ * of creating an ecosystem entry for it.
134
+ *
135
+ * @type {string}
136
+ */
137
+ export declare const LEDGER_TOOL_ECOSYSTEM: string;
138
+ /**
139
+ * Module-load snapshot of the build-introspection environment: `CDXGEN_INTROSPECT`
140
+ * is `true`/`1`, or `CDXGEN_INTROSPECT_LEDGER` names a sidecar file. Library
141
+ * callers that configure introspection before importing this module can read
142
+ * it directly; the CLI enables introspection after argument parsing, so every
143
+ * internal gate reads {@link isLedgerEnabled}, which resolves the same
144
+ * environment on each call.
145
+ *
146
+ * @type {boolean}
147
+ */
148
+ export declare const LEDGER_ENABLED: boolean;
149
+ /**
150
+ * True when build-introspection recording is enabled for this run: the same
151
+ * environment as {@link LEDGER_ENABLED}, read live. The CLI turns
152
+ * introspection on after argument parsing by setting `CDXGEN_INTROSPECT`, so
153
+ * a module-load snapshot would miss every event recorded after that point;
154
+ * the environment only ever flips in that one direction during a run.
155
+ *
156
+ * @returns {boolean} True when events should be recorded.
157
+ */
158
+ /**
159
+ * Whether build introspection is enabled for this run. The flag decides when
160
+ * it was given; otherwise the environment speaks, which is how a run that
161
+ * enabled introspection through a profile reaches the recorders.
162
+ *
163
+ * @param {Object} [options] CLI options.
164
+ * @returns {boolean} True when the run records and reports a verdict.
165
+ */
166
+ export declare function isIntrospectionEnabled(options?: Object): boolean;
167
+ export declare function isLedgerEnabled(): boolean;
168
+ /**
169
+ * Redact a free-text introspection value with the ledger's own redactor. Both
170
+ * report renderers run their free text through this function so a field can
171
+ * never be redacted differently in the ledger, the JSON report and the
172
+ * markdown report.
173
+ *
174
+ * @param {string|undefined} value Free text of untrusted origin.
175
+ * @returns {string|undefined} Redacted text.
176
+ */
177
+ export declare function redactIntrospectionText(value: string | undefined): string | undefined;
178
+ /**
179
+ * Combined stdout and stderr of a spawned command, as the raw material of an
180
+ * output excerpt. Producers that already hold a spawn result call this so the
181
+ * recorder, not the producer, owns truncation and redaction.
182
+ *
183
+ * @param {Object|undefined} spawnResult A spawnSync-style result.
184
+ * @returns {string|undefined} The combined output, or undefined when the command produced none.
185
+ */
186
+ export declare function commandOutputText(spawnResult: Object | undefined): string | undefined;
187
+ /**
188
+ * Record one build-adequacy event. Returns immediately after a single boolean
189
+ * test when introspection is disabled, so producers may pass plain values
190
+ * without gating the call themselves.
191
+ *
192
+ * Events with a kind outside LEDGER_EVENT_KINDS, or without a non-empty
193
+ * `ecosystem`, are dropped with a think-log note instead of throwing: the
194
+ * ledger is instrumentation, and a producer bug must never fail an SBOM run.
195
+ *
196
+ * @param {string} kind Event kind; one of LEDGER_EVENT_KINDS.
197
+ * @param {Partial<LedgerEvent>} [fields] Event fields; `command`, `path`, `detail`, `causeDetail` and `outputExcerpt` are redacted before storage, and `outputExcerpt` is additionally bounded to its tail.
198
+ * @returns {LedgerEvent|undefined} The stored event, or undefined when recording is disabled or the event was dropped.
199
+ */
200
+ export declare function recordLedgerEvent(kind: string, fields?: Partial<LedgerEvent>): LedgerEvent | undefined;
201
+ /**
202
+ * Resolve the event kind for a remediation id from the catalog.
203
+ *
204
+ * @param {string} remediationId Remediation id to look up.
205
+ * @returns {string|undefined} Default event kind, or undefined when the id is unknown or the catalog is unavailable.
206
+ */
207
+ export declare function remediationKindFor(remediationId: string): string | undefined;
208
+ /**
209
+ * The full remediation catalog, for consumers that need the extended entry
210
+ * fields (target tier, actions, verify clause) rather than a single resolved
211
+ * kind. Returns the cached parsed catalog; null when the data file is
212
+ * missing or unreadable.
213
+ *
214
+ * @returns {Record<string, Object>|null} Catalog keyed by remediation id, or null when unavailable.
215
+ */
216
+ export declare function getRemediationCatalog(): Record<string, Object> | null;
217
+ /**
218
+ * Record a degraded outcome together with the remediation that would restore
219
+ * the lost evidence. The kind and the remediationId come from the catalog
220
+ * entry for `remediationId`, so a site only supplies the facts it observed;
221
+ * `ecosystem` and `impact` are required from the caller because only the site
222
+ * knows which scanned ecosystem paid the cost and how much. A site whose
223
+ * degradation differs in kind from the catalog default (a command that threw
224
+ * rather than a fallback that engaged) may pass an explicit `kind` in fields.
225
+ *
226
+ * Events for unknown ids are dropped with a think-log note: an id outside the
227
+ * catalog is a producer bug and the catalog is the contract.
228
+ *
229
+ * @param {string} remediationId Key into data/remediations.json.
230
+ * @param {Partial<LedgerEvent> & {kind?: string}} fields Event fields; `ecosystem` and `impact` are required, `kind` overrides the catalog default.
231
+ * @returns {LedgerEvent|undefined} The stored event, or undefined when recording is disabled or the event was dropped.
232
+ */
233
+ export declare function recordDegradation(remediationId: string, fields?: Partial<LedgerEvent> & {
234
+ kind?: string;
235
+ }): LedgerEvent | undefined;
236
+ /**
237
+ * Snapshot of the events recorded by this thread. Each event and the array
238
+ * itself are frozen, so a consumer cannot mutate the recorder's state.
239
+ * In a multi-worker run this buffer is this thread's view only; the JSONL
240
+ * sidecar is the complete record.
241
+ *
242
+ * @returns {LedgerEvent[]} Frozen array of frozen events.
243
+ */
244
+ export declare function getLedgerEvents(): LedgerEvent[];
245
+ /**
246
+ * Clear the in-memory buffer and the truncation state. Intended for tests; a
247
+ * production run never resets its own ledger. The sidecar file is append-only
248
+ * and is not touched.
249
+ *
250
+ * @returns {void}
251
+ */
252
+ export declare function resetLedgerEvents(): void;
253
+ /**
254
+ * Parse a JSONL sidecar produced by `CDXGEN_INTROSPECT_LEDGER` back into
255
+ * events. Blank lines and lines that fail to parse — a torn final line from an
256
+ * interrupted run is expected — are skipped. Prefer this over the in-memory
257
+ * buffer whenever the sidecar exists: worker threads append to the same file,
258
+ * so it is the only complete record of a multi-worker run.
259
+ *
260
+ * @param {string} ledgerPath Path to the JSONL sidecar.
261
+ * @returns {LedgerEvent[]} Frozen array of frozen events, empty when the file is missing or unreadable.
262
+ */
263
+ export declare function loadLedgerFile(ledgerPath: string): LedgerEvent[];
264
+ /**
265
+ * Close the sidecar descriptor held by this thread. Idempotent; further
266
+ * events stay in memory only. The descriptor is also released when the
267
+ * process exits through `closeLogStreams`.
268
+ *
269
+ * @returns {void}
270
+ */
271
+ export declare function closeLedger(): void;
272
+ //# sourceMappingURL=buildLedger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildLedger.d.ts","sourceRoot":"","sources":["../../../lib/core/buildLedger.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AA0BA,YAAkB,WAAW,GAC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,wBAAgB,uBAAuB,CAAC,KAAK,EAHlC,MAAM,GAAC,SAG2B,GAFhC,MAAM,GAAC,SAAS,CAO5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAHlC,MAAM,GAAC,SAG2B,GAFhC,MAAM,GAAC,SAAS,CAU5B;AA0JD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAJ3B,MAI2B,EAAE,MAAM,AAH3C,CACA,EADQ,OAAO,CAAC,WAAW,CAGqB,GAFtC,WAAW,GAAC,SAAS,CAmBjC;AAsCD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAHrC,MAGqC,GAFnC,MAAM,GAAC,SAAS,CAI5B;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAFxB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAC,IAAI,CAIvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAJpC,MAIoC,EAAE,MAAM,GAH5C,OAAO,CAAC,WAAW,CAAC,GAAG;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAGY,GAF/C,WAAW,GAAC,SAAS,CAkBjC;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAFlB,WAAW,EAAE,CAMzB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAFpB,IAAI,CAKhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAH9B,MAG8B,GAF5B,WAAW,EAAE,CAwBzB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,IAFd,IAAI,CAYhB"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Deferred `fail-on-error` exits for introspected runs.
3
+ *
4
+ * `--fail-on-error` promises an operator that a failing dependency extractor
5
+ * never produces a plausible-but-incomplete BOM, so the extractors exit the
6
+ * process the moment a build tool fails. Under `--introspect` that exit
7
+ * destroys the very evidence the run exists to produce: the ledger events
8
+ * recorded a statement earlier die with the process, `postProcess` never
9
+ * runs, and neither the BOM nor the fidelity report is written.
10
+ *
11
+ * On an introspected run the extractor instead records the failure here and
12
+ * throws {@link DeferredFailOnError}, which the extractor catches at its
13
+ * completion point so it still returns everything it collected before the
14
+ * failure — the incomplete-result fallbacks stay skipped, exactly as
15
+ * `fail-on-error` demands. The CLI then writes the BOM and both reports and
16
+ * exits with the dedicated {@link INTROSPECTION_FAILURE_EXIT_CODE} status, so
17
+ * the exit code still claims "an extractor failed", distinct from the
18
+ * fidelity gate's 4.
19
+ *
20
+ * Without introspection this module is a pass-through to `process.exit(1)`;
21
+ * the default contract of the flag is unchanged.
22
+ */
23
+ /**
24
+ * Exit status used when an introspected run completes its outputs despite a
25
+ * `--fail-on-error` extractor failure. Distinct from 1 (generic failure),
26
+ * 3 (TEA publish failure) and 4 (the introspection fidelity gate).
27
+ *
28
+ * @type {number}
29
+ */
30
+ export declare const INTROSPECTION_FAILURE_EXIT_CODE: number;
31
+ /**
32
+ * Control-flow signal thrown by {@link deferFailOnError} on an introspected
33
+ * run. The extractor that called it must let it unwind to its completion
34
+ * point, keep everything it collected until then, and rethrow anything else.
35
+ */
36
+ export declare class DeferredFailOnError extends Error {
37
+ /**
38
+ * @param {string} message Human-readable failure summary.
39
+ */
40
+ constructor(message: string);
41
+ }
42
+ /**
43
+ * Test whether an error is the fail-on-error deferral signal.
44
+ *
45
+ * @param {unknown} err The caught error.
46
+ * @returns {boolean} True when the error unwinds a deferred fail-on-error abort.
47
+ */
48
+ export declare function isDeferredFailOnError(err: unknown): boolean;
49
+ /**
50
+ * Snapshot of the deferred failures recorded by this run.
51
+ *
52
+ * @returns {Array<Object>} Frozen copies of the recorded failures.
53
+ */
54
+ export declare function getDeferredFailures(): Array<Object>;
55
+ /**
56
+ * Handle a failing extractor on behalf of a `options.failOnError &&
57
+ * process.exit(1)` site. Without `fail-on-error` the run continues exactly
58
+ * as it would have. With the flag and no introspection the process exits 1,
59
+ * unchanged. On an introspected run the failure is recorded — including one
60
+ * ledger observation on the ecosystem row the failure cost evidence — and
61
+ * the deferral signal is thrown so the extractor stops where it is without
62
+ * taking any incomplete-result fallback.
63
+ *
64
+ * @param {Object} options CLI options.
65
+ * @param {Object} failure What failed, for the operator message and the report.
66
+ * @param {string} failure.tool The build tool that failed.
67
+ * @param {string} [failure.ecosystem] The ecosystem the tool serves, so the
68
+ * observation lands on the row whose evidence the failure cost.
69
+ * @param {string} failure.detail One sentence, present tense.
70
+ * @param {number} [failure.exitCode] The tool's exit status, when known.
71
+ * @param {string} [failure.command] The redacted command that was attempted.
72
+ * @param {string} [failure.outputExcerpt] The failed command's combined output,
73
+ * when the caller already holds it; the recorder bounds and redacts it.
74
+ * @returns {void} Never returns on an introspected run; it throws.
75
+ */
76
+ export declare function deferFailOnError(options: Object, failure: {
77
+ tool: string;
78
+ ecosystem?: string;
79
+ detail: string;
80
+ exitCode?: number;
81
+ command?: string;
82
+ outputExcerpt?: string;
83
+ }): void;
84
+ //# sourceMappingURL=deferredExit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferredExit.d.ts","sourceRoot":"","sources":["../../../lib/core/deferredExit.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AASH;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAFlC,MAEsC,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C;;OAEG;IACH,YAAY,OAAO,EAFR,MAEQ,EAGlB;CACF;AAWD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAH9B,OAG8B,GAF5B,OAAO,CAInB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAFtB,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAZ7B,MAY6B,EAAE,OAAO,EAV9C;IAAwB,IAAI,EAApB,MAAM,CACd;IAAyB,SAAS,AAAlC,CAEA,EAFQ,MAAM,CAEd;IAAwB,MAAM,EAAtB,MAAM,CACd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,OAAO,AAAhC,CACA,EADQ,MAAM,CACd;IAAyB,aAAa,AAAtC,CAEA,EAFQ,MAAM,CAEd;CAE8C,GAFpC,IAAI,CAuChB"}