@cdxgen/cdxgen 13.6.0 → 13.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/README.md +15 -8
  2. package/bin/audit.js +7 -4
  3. package/bin/cdxgen.js +256 -37
  4. package/bin/convert.js +146 -22
  5. package/bin/evinse.js +25 -3
  6. package/bin/repl.js +47 -3
  7. package/bin/sign.js +211 -34
  8. package/bin/tracebom.js +18 -6
  9. package/bin/validate.js +18 -3
  10. package/bin/verify.js +113 -5
  11. package/data/behavior-taxonomy.schema.json +1491 -0
  12. package/data/cyclonedx-2.0-bundled.schema.json +18606 -5528
  13. package/data/cyclonedx-2.0-cryptography-defs.schema.json +857 -0
  14. package/data/pqc-migration.json +239 -0
  15. package/data/remediations.json +52 -0
  16. package/data/rules/cbom-security.yaml +4 -3
  17. package/data/rules/package-integrity.yaml +28 -0
  18. package/lib/audit/index.js +25 -3
  19. package/lib/cli/bomAssembly.js +80 -1
  20. package/lib/cli/cliOptions.js +121 -17
  21. package/lib/cli/index.js +609 -898
  22. package/lib/cli/jsBom.js +3 -0
  23. package/lib/cli/jvmBom.js +365 -40
  24. package/lib/cli/managedBom.js +19 -3
  25. package/lib/cli/nativeBom.js +10 -0
  26. package/lib/core/env.js +26 -0
  27. package/lib/core/fs.js +126 -3
  28. package/lib/core/globPatterns.js +218 -0
  29. package/lib/core/processTree.js +99 -12
  30. package/lib/core/projectConfig.js +332 -25
  31. package/lib/core/toolRegistry.js +15 -1
  32. package/lib/ecosystems/denoutils.js +2 -2
  33. package/lib/ecosystems/golem.js +3 -8
  34. package/lib/ecosystems/gradleutils.js +1082 -6
  35. package/lib/ecosystems/jsEvidence.js +90 -38
  36. package/lib/ecosystems/kosi.js +3 -5
  37. package/lib/ecosystems/npmVersionResolution.js +376 -0
  38. package/lib/ecosystems/parsers-python.js +89 -28
  39. package/lib/ecosystems/parsers-rust.js +117 -15
  40. package/lib/ecosystems/remote/huggingface.js +22 -0
  41. package/lib/ecosystems/rusi.js +2 -4
  42. package/lib/ecosystems/scalasem.js +2 -1
  43. package/lib/evinser/evinser.js +196 -34
  44. package/lib/evinser/scalasem.js +5 -1
  45. package/lib/helpers/agenticToolutils.js +112 -1
  46. package/lib/helpers/bomSigner.js +43 -9
  47. package/lib/helpers/jssSigner.js +1276 -0
  48. package/lib/inventory/agentBlueprint.js +193 -0
  49. package/lib/inventory/agentToolNames.js +145 -0
  50. package/lib/inventory/aiCollector.js +153 -7
  51. package/lib/inventory/aiInventory.js +44 -8
  52. package/lib/inventory/aiProviders.js +324 -0
  53. package/lib/inventory/bomUtils.js +8 -1
  54. package/lib/inventory/ciParsers/githubActionsLock.js +821 -0
  55. package/lib/inventory/citations.js +31 -2
  56. package/lib/inventory/communityAiConfigParser.js +978 -80
  57. package/lib/inventory/cyclonedx20.js +152 -0
  58. package/lib/inventory/cyclonedx20Common.js +286 -0
  59. package/lib/inventory/cyclonedx20Derived.js +159 -0
  60. package/lib/inventory/cyclonedx20Parties.js +552 -0
  61. package/lib/inventory/cyclonedx20Read.js +768 -0
  62. package/lib/inventory/cyclonedx20ReadCommon.js +374 -0
  63. package/lib/inventory/cyclonedx20ReadComponents.js +692 -0
  64. package/lib/inventory/cyclonedx20ReadContext.js +380 -0
  65. package/lib/inventory/cyclonedx20ReadEvidence.js +466 -0
  66. package/lib/inventory/cyclonedx20ReadSections.js +599 -0
  67. package/lib/inventory/cyclonedx20Render.js +766 -0
  68. package/lib/inventory/cyclonedx20RenderComponents.js +716 -0
  69. package/lib/inventory/cyclonedx20RenderDefinitions.js +405 -0
  70. package/lib/inventory/cyclonedx20RenderEvidence.js +726 -0
  71. package/lib/inventory/cyclonedx20RenderHardware.js +203 -0
  72. package/lib/inventory/cyclonedx20RenderPatents.js +174 -0
  73. package/lib/inventory/cyclonedx20RenderRefIds.js +314 -0
  74. package/lib/inventory/cyclonedx20RenderSections.js +499 -0
  75. package/lib/inventory/cyclonedx20Tables.js +594 -0
  76. package/lib/inventory/deps.js +106 -13
  77. package/lib/inventory/dosai.js +236 -1
  78. package/lib/inventory/dosaiParsers.js +3 -6
  79. package/lib/inventory/dotnetRuntime.js +164 -14
  80. package/lib/inventory/ecosystemFormulationParsers.js +979 -0
  81. package/lib/inventory/envcontext.js +132 -38
  82. package/lib/inventory/evidenceUtils.js +2 -1
  83. package/lib/inventory/formulationParsers.js +95 -13
  84. package/lib/inventory/hbom.js +45 -6
  85. package/lib/inventory/hbomLoader.js +166 -0
  86. package/lib/inventory/mcpConfigParser.js +5 -0
  87. package/lib/inventory/occurrenceKey.js +90 -0
  88. package/lib/inventory/pqcMigration.js +426 -0
  89. package/lib/inventory/rustFormulationParser.js +21 -10
  90. package/lib/inventory/source.js +65 -6
  91. package/lib/parsers/huggingfaceManifest.js +9 -1
  92. package/lib/parsers/huggingfaceUtils.js +18 -0
  93. package/lib/parsers/kiroPermissions.js +166 -0
  94. package/lib/server/server.js +36 -34
  95. package/lib/stages/postgen/postgen.js +41 -1
  96. package/lib/stages/postgen/specVersionCompat.js +76 -0
  97. package/lib/validator/bomValidator.js +8 -1
  98. package/lib/validator/complianceEngine.js +30 -3
  99. package/lib/validator/complianceRules.js +1416 -4
  100. package/lib/validator/generated/validate-2.0.mjs +57554 -13851
  101. package/lib/validator/index.js +48 -7
  102. package/lib/validator/reporters/json.js +6 -0
  103. package/package.json +9 -9
  104. package/types/bin/repl.d.ts.map +1 -1
  105. package/types/lib/audit/index.d.ts +6 -2
  106. package/types/lib/audit/index.d.ts.map +1 -1
  107. package/types/lib/cli/bomAssembly.d.ts +16 -0
  108. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  109. package/types/lib/cli/cliOptions.d.ts +6 -0
  110. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  111. package/types/lib/cli/index.d.ts.map +1 -1
  112. package/types/lib/cli/jsBom.d.ts +2 -1
  113. package/types/lib/cli/jsBom.d.ts.map +1 -1
  114. package/types/lib/cli/jvmBom.d.ts +15 -0
  115. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  116. package/types/lib/cli/managedBom.d.ts.map +1 -1
  117. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  118. package/types/lib/core/boundedFile.d.ts +30 -0
  119. package/types/lib/core/boundedFile.d.ts.map +1 -1
  120. package/types/lib/core/env.d.ts +10 -0
  121. package/types/lib/core/env.d.ts.map +1 -1
  122. package/types/lib/core/fs.d.ts +4 -0
  123. package/types/lib/core/fs.d.ts.map +1 -1
  124. package/types/lib/core/globPatterns.d.ts +70 -0
  125. package/types/lib/core/globPatterns.d.ts.map +1 -0
  126. package/types/lib/core/paths.d.ts +9 -0
  127. package/types/lib/core/paths.d.ts.map +1 -1
  128. package/types/lib/core/processTree.d.ts +16 -5
  129. package/types/lib/core/processTree.d.ts.map +1 -1
  130. package/types/lib/core/projectConfig.d.ts +47 -8
  131. package/types/lib/core/projectConfig.d.ts.map +1 -1
  132. package/types/lib/core/toolRegistry.d.ts.map +1 -1
  133. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  134. package/types/lib/ecosystems/gradleutils.d.ts +248 -8
  135. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  136. package/types/lib/ecosystems/jsEvidence.d.ts +14 -1
  137. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  138. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  139. package/types/lib/ecosystems/npmVersionResolution.d.ts +119 -0
  140. package/types/lib/ecosystems/npmVersionResolution.d.ts.map +1 -0
  141. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  142. package/types/lib/ecosystems/parsers-rust.d.ts.map +1 -1
  143. package/types/lib/ecosystems/pythonutils.d.ts +1 -1
  144. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  145. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  146. package/types/lib/ecosystems/scalasem.d.ts +58 -16
  147. package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
  148. package/types/lib/evinser/evinser.d.ts +61 -9
  149. package/types/lib/evinser/evinser.d.ts.map +1 -1
  150. package/types/lib/evinser/scalasem.d.ts.map +1 -1
  151. package/types/lib/helpers/agenticToolutils.d.ts +53 -19
  152. package/types/lib/helpers/agenticToolutils.d.ts.map +1 -1
  153. package/types/lib/helpers/bomSigner.d.ts +20 -3
  154. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  155. package/types/lib/helpers/jssSigner.d.ts +288 -0
  156. package/types/lib/helpers/jssSigner.d.ts.map +1 -0
  157. package/types/lib/helpers/vsixutils.d.ts +303 -19
  158. package/types/lib/helpers/vsixutils.d.ts.map +1 -1
  159. package/types/lib/inventory/agentBlueprint.d.ts +70 -0
  160. package/types/lib/inventory/agentBlueprint.d.ts.map +1 -0
  161. package/types/lib/inventory/agentToolNames.d.ts +51 -0
  162. package/types/lib/inventory/agentToolNames.d.ts.map +1 -0
  163. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  164. package/types/lib/inventory/aiInventory.d.ts.map +1 -1
  165. package/types/lib/inventory/aiProviders.d.ts +85 -0
  166. package/types/lib/inventory/aiProviders.d.ts.map +1 -0
  167. package/types/lib/inventory/bomUtils.d.ts.map +1 -1
  168. package/types/lib/inventory/ciParsers/githubActionsLock.d.ts +101 -0
  169. package/types/lib/inventory/ciParsers/githubActionsLock.d.ts.map +1 -0
  170. package/types/lib/inventory/citations.d.ts +5 -0
  171. package/types/lib/inventory/citations.d.ts.map +1 -1
  172. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  173. package/types/lib/inventory/cyclonedx20.d.ts +99 -0
  174. package/types/lib/inventory/cyclonedx20.d.ts.map +1 -0
  175. package/types/lib/inventory/cyclonedx20Common.d.ts +102 -0
  176. package/types/lib/inventory/cyclonedx20Common.d.ts.map +1 -0
  177. package/types/lib/inventory/cyclonedx20Derived.d.ts +74 -0
  178. package/types/lib/inventory/cyclonedx20Derived.d.ts.map +1 -0
  179. package/types/lib/inventory/cyclonedx20Parties.d.ts +91 -0
  180. package/types/lib/inventory/cyclonedx20Parties.d.ts.map +1 -0
  181. package/types/lib/inventory/cyclonedx20Read.d.ts +51 -0
  182. package/types/lib/inventory/cyclonedx20Read.d.ts.map +1 -0
  183. package/types/lib/inventory/cyclonedx20ReadCommon.d.ts +69 -0
  184. package/types/lib/inventory/cyclonedx20ReadCommon.d.ts.map +1 -0
  185. package/types/lib/inventory/cyclonedx20ReadComponents.d.ts +77 -0
  186. package/types/lib/inventory/cyclonedx20ReadComponents.d.ts.map +1 -0
  187. package/types/lib/inventory/cyclonedx20ReadContext.d.ts +118 -0
  188. package/types/lib/inventory/cyclonedx20ReadContext.d.ts.map +1 -0
  189. package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts +40 -0
  190. package/types/lib/inventory/cyclonedx20ReadEvidence.d.ts.map +1 -0
  191. package/types/lib/inventory/cyclonedx20ReadSections.d.ts +45 -0
  192. package/types/lib/inventory/cyclonedx20ReadSections.d.ts.map +1 -0
  193. package/types/lib/inventory/cyclonedx20Render.d.ts +53 -0
  194. package/types/lib/inventory/cyclonedx20Render.d.ts.map +1 -0
  195. package/types/lib/inventory/cyclonedx20RenderComponents.d.ts +73 -0
  196. package/types/lib/inventory/cyclonedx20RenderComponents.d.ts.map +1 -0
  197. package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts +29 -0
  198. package/types/lib/inventory/cyclonedx20RenderDefinitions.d.ts.map +1 -0
  199. package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts +110 -0
  200. package/types/lib/inventory/cyclonedx20RenderEvidence.d.ts.map +1 -0
  201. package/types/lib/inventory/cyclonedx20RenderHardware.d.ts +42 -0
  202. package/types/lib/inventory/cyclonedx20RenderHardware.d.ts.map +1 -0
  203. package/types/lib/inventory/cyclonedx20RenderPatents.d.ts +26 -0
  204. package/types/lib/inventory/cyclonedx20RenderPatents.d.ts.map +1 -0
  205. package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts +55 -0
  206. package/types/lib/inventory/cyclonedx20RenderRefIds.d.ts.map +1 -0
  207. package/types/lib/inventory/cyclonedx20RenderSections.d.ts +45 -0
  208. package/types/lib/inventory/cyclonedx20RenderSections.d.ts.map +1 -0
  209. package/types/lib/inventory/cyclonedx20Tables.d.ts +134 -0
  210. package/types/lib/inventory/cyclonedx20Tables.d.ts.map +1 -0
  211. package/types/lib/inventory/deps.d.ts +35 -2
  212. package/types/lib/inventory/deps.d.ts.map +1 -1
  213. package/types/lib/inventory/dosai.d.ts +19 -0
  214. package/types/lib/inventory/dosai.d.ts.map +1 -1
  215. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  216. package/types/lib/inventory/dotnetRuntime.d.ts +51 -4
  217. package/types/lib/inventory/dotnetRuntime.d.ts.map +1 -1
  218. package/types/lib/inventory/ecosystemFormulationParsers.d.ts +73 -0
  219. package/types/lib/inventory/ecosystemFormulationParsers.d.ts.map +1 -0
  220. package/types/lib/inventory/envcontext.d.ts +22 -6
  221. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  222. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  223. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  224. package/types/lib/inventory/hbom.d.ts +11 -0
  225. package/types/lib/inventory/hbom.d.ts.map +1 -1
  226. package/types/lib/inventory/hbomLoader.d.ts +54 -0
  227. package/types/lib/inventory/hbomLoader.d.ts.map +1 -1
  228. package/types/lib/inventory/jvmLocalRepos.d.ts +5 -1
  229. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -1
  230. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  231. package/types/lib/inventory/occurrenceKey.d.ts +52 -0
  232. package/types/lib/inventory/occurrenceKey.d.ts.map +1 -0
  233. package/types/lib/inventory/pqcMigration.d.ts +84 -0
  234. package/types/lib/inventory/pqcMigration.d.ts.map +1 -0
  235. package/types/lib/inventory/rustFormulationParser.d.ts +7 -2
  236. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  237. package/types/lib/inventory/scalaCoords.d.ts.map +1 -1
  238. package/types/lib/inventory/scalaDedupe.d.ts +43 -0
  239. package/types/lib/inventory/scalaDedupe.d.ts.map +1 -0
  240. package/types/lib/inventory/source.d.ts +15 -0
  241. package/types/lib/inventory/source.d.ts.map +1 -1
  242. package/types/lib/parsers/huggingfaceManifest.d.ts +10 -1
  243. package/types/lib/parsers/huggingfaceManifest.d.ts.map +1 -1
  244. package/types/lib/parsers/huggingfaceUtils.d.ts +12 -0
  245. package/types/lib/parsers/huggingfaceUtils.d.ts.map +1 -1
  246. package/types/lib/parsers/kiroPermissions.d.ts +62 -0
  247. package/types/lib/parsers/kiroPermissions.d.ts.map +1 -0
  248. package/types/lib/parsers/vscodeExtensionId.d.ts +48 -0
  249. package/types/lib/parsers/vscodeExtensionId.d.ts.map +1 -0
  250. package/types/lib/server/server.d.ts.map +1 -1
  251. package/types/lib/stages/postgen/postgen.d.ts +7 -0
  252. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  253. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  254. package/types/lib/stages/postgen/specVersionCompat.d.ts +25 -0
  255. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  256. package/types/lib/validator/bomValidator.d.ts +5 -1
  257. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  258. package/types/lib/validator/complianceEngine.d.ts +4 -4
  259. package/types/lib/validator/complianceEngine.d.ts.map +1 -1
  260. package/types/lib/validator/complianceRules.d.ts +14 -2
  261. package/types/lib/validator/complianceRules.d.ts.map +1 -1
  262. package/types/lib/validator/index.d.ts +10 -0
  263. package/types/lib/validator/index.d.ts.map +1 -1
  264. package/types/lib/validator/reporters/json.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"vsixutils.d.ts","sourceRoot":"","sources":["../../../lib/helpers/vsixutils.js"],"names":[],"mappings":"AAmBA;;GAEG;AACH,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAO7D;;;;;;;;GAQG;AAC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CAEA,EAFQ,OAAO,CAEf;IAAyB,IAAI,AAA7B,CACA,EADQ,MAAM,CACd;IAA0B,SAAS,AAAnC,CACA,EADQ,OAAO,CACf;CAEsD,GAF5C;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAqC1D;AA0JD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAHvC,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAGM,GAFrC,MAAM,EAAE,CAKpB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAHxC,MAAM,EAGkC,GAFtC,MAAM,EAAE,CAoBpB;AA6CD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EATpC,MAAM,EAS8B,EAAE,OAAO,AARrD,CAMA,EALA;IAA2B,KAAK,AAAhC,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,IAAI,AAA7B,CAEA,EAFQ,MAAM,CAEd;IAAgC,OAAO,AAAvC,CAEA,EAFQ,KAAK,CAAC,MAAM,CAAC,CAErB;CAE0D,GAFhD,MAAM,EAAE,CA2CpB"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Declared coding-agent behaviour at CycloneDX 2.0 (cdxgen/cdxgen#4593).
3
+ *
4
+ * The source is the AI inventory the 1.x parsers already produce
5
+ * (communityAiConfigParser: Kiro agents, Claude subagents and agent
6
+ * definitions). Only real agent definitions count: a component with a
7
+ * `cdx:agent:role`, or whose `cdx:file:kind` is `agent-definition` or
8
+ * `claude-subagent`. Instruction files, specs, steering documents, agent
9
+ * configs and plugins describe or configure agents but are not agents.
10
+ * At 2.0 this module derives:
11
+ *
12
+ * - one party per agent component with a bom-ref
13
+ * (#/$defs/cyclonedx-party-2.0/$defs/party, role `agent`) whose `system`
14
+ * (#/$defs/cyclonedx-party-2.0/$defs/system) has kind `agent`, `ref` the
15
+ * agent component's refId, `label` its name and `permissions` the tool
16
+ * names its config allows. The allow list is split on the commas outside
17
+ * parentheses, and each entry is reduced to the tool name before any "("
18
+ * (`Bash(git status:*)` is `Bash`), so arguments, paths and commands
19
+ * never reach the BOM. Names that are not safe tool names are dropped
20
+ * (see lib/inventory/agentToolNames.js). The list is unique and sorted.
21
+ *
22
+ * - one blueprint (#/$defs/cyclonedx-blueprint-2.0/$defs/blueprint,
23
+ * modelTypes `behavioral`) whose actors reference the agent parties and
24
+ * whose behaviors.instances carry `acknowledgment: ["declared"]` and a
25
+ * `behavior` from data/behavior-taxonomy.schema.json:
26
+ * `ai:agent:invokesTool` when the agent declares tools or MCP servers, and
27
+ * `ai:agent:requestsUserApproval` when its permission policy has ask rules.
28
+ * The inventory records only how many MCP servers an agent's own config
29
+ * names, not which, so instances carry no `targets`: naming the project's
30
+ * MCP services would claim a binding no config makes.
31
+ *
32
+ * No free text from instruction, skill or MCP files is emitted. Business
33
+ * objectives and use cases are free text, so they are out of scope, and so
34
+ * is observed behaviour.
35
+ */
36
+ /** refId of the derived blueprint. */
37
+ export declare const AGENT_BLUEPRINT_REF_ID = "blueprint-declared-agents";
38
+ /** Prefix of every derived agent party refId. */
39
+ export declare const AGENT_PARTY_REF_ID_PREFIX = "party-agent-";
40
+ /**
41
+ * Is this internal-model component a real coding-agent definition?
42
+ *
43
+ * @param {object} component Internal-model component
44
+ * @returns {boolean} True for a `cdx:agent:role` component or an
45
+ * agent-definition / claude-subagent file
46
+ */
47
+ export declare function isDeclaredAgentComponent(component: object): boolean;
48
+ /**
49
+ * The permissions of an agent: the tool names of `cdx:agent:tools` and the
50
+ * scopes of `cdx:agent:permissionCapabilities`, each reduced to the name
51
+ * before any "(", unique and sorted.
52
+ *
53
+ * @param {object} component Internal-model agent component
54
+ * @returns {string[]} Permission names
55
+ */
56
+ export declare function declaredAgentPermissions(component: object): string[];
57
+ /**
58
+ * Collect the 2.0 agent parties and the behavioral blueprint for the
59
+ * declared agents of an internal-model BOM. Agents without a bom-ref are
60
+ * skipped (their party could not point at them); parties are unique by
61
+ * refId.
62
+ *
63
+ * @param {object} internalBom The 1.x-shaped internal model
64
+ * @returns {{parties: object[], blueprint: object|undefined}}
65
+ */
66
+ export declare function collectAgentBehaviour(internalBom: object): {
67
+ parties: object[];
68
+ blueprint: object | undefined;
69
+ };
70
+ //# sourceMappingURL=agentBlueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentBlueprint.d.ts","sourceRoot":"","sources":["../../../lib/inventory/agentBlueprint.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAQH,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAClE,iDAAiD;AACjD,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAuBxD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAJvC,MAIuC,GAHrC,OAAO,CAcnB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,EAAE,CAYpB;AAyCD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAHtC,MAGsC,GAFpC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,CAsC5D"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Tool allow lists of coding-agent configurations, reduced to tool names.
3
+ *
4
+ * An allow list such as `Read, Bash(git status:*), Bash(curl -u user,secret)`
5
+ * carries commands, paths and sometimes credentials inside its parentheses.
6
+ * Only the tool name before any "(" is kept, so nothing an entry scopes its
7
+ * tool to reaches a BOM. The list is split on the commas outside parentheses,
8
+ * so the arguments of one entry never become entries of their own.
9
+ *
10
+ * A tool name is at most 64 characters of letters, digits and `_ - . : *`
11
+ * (`Read`, `mcp__github__*`, `fs_write`), optionally in the `@server/tool`
12
+ * form Kiro uses. A name that looks like a credential (a known token prefix
13
+ * such as `ghp_` or `AKIA`, or a long run of letters and digits with no
14
+ * separator) is dropped.
15
+ */
16
+ /**
17
+ * Split an allow list on the commas outside parentheses. An array is taken
18
+ * as already split.
19
+ *
20
+ * @param {string|string[]|undefined} value Allow list
21
+ * @returns {string[]} Trimmed, non-empty entries
22
+ */
23
+ export declare function splitAllowList(value: string | string[] | undefined): string[];
24
+ /**
25
+ * The tool name of one allow-list entry, or undefined when it is not a safe
26
+ * tool name.
27
+ *
28
+ * @param {string} entry Allow-list entry
29
+ * @returns {string|undefined} Tool name
30
+ */
31
+ export declare function agentToolName(entry: string): string | undefined;
32
+ /**
33
+ * The unique, sorted tool names of an allow list.
34
+ *
35
+ * @param {string|string[]|undefined} value Allow list
36
+ * @returns {string[]} Tool names
37
+ */
38
+ export declare function agentToolNames(value: string | string[] | undefined): string[];
39
+ /**
40
+ * An allow list as cdxgen records it in `cdx:agent:tools` and
41
+ * `cdx:agent:disallowedTools`: each entry reduced to its tool name, written
42
+ * `Name(...)` when the entry scoped the tool with arguments, so a scoped
43
+ * `Bash(git status:*)` stays distinguishable from an unrestricted `Bash`
44
+ * without copying the scope. Unique, in the order the config lists them,
45
+ * comma separated.
46
+ *
47
+ * @param {string|string[]|undefined} value Allow list
48
+ * @returns {string|undefined} Summary, or undefined when nothing is left
49
+ */
50
+ export declare function summarizeAgentToolList(value: string | string[] | undefined): string | undefined;
51
+ //# sourceMappingURL=agentToolNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentToolNames.d.ts","sourceRoot":"","sources":["../../../lib/inventory/agentToolNames.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAyBH;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAHzB,MAAM,GAAC,MAAM,EAAE,GAAC,SAGS,GAFvB,MAAM,EAAE,CAyBpB;AAmBD;;;;;;GAMG;AACH,wBAAgB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AAE,CAAA;CAST,GARjC;IACR,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CA+BH"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Organisations that create AI models, keyed by the short creator id cdxgen
3
+ * uses internally. The value is the full organisation name written to the
4
+ * `manufacturer` of a model component, since the minimum elements guidance
5
+ * asks for full names rather than acronyms or product names.
6
+ */
7
+ export declare const MODEL_CREATOR_NAMES: Map<string, string>;
8
+ /**
9
+ * Local runtimes and inference servers. They serve whatever tag or served
10
+ * model name the user chose, so a model they run names no creator.
11
+ */
12
+ export declare const LOCAL_MODEL_RUNTIMES: Set<string>;
13
+ /**
14
+ * Split a model reference written in source code into the route provider it
15
+ * names, if any, and the model name a creator lookup should read.
16
+ *
17
+ * `groq/llama3-8b-8192` names the groq route and the model `llama3-8b-8192`.
18
+ * `models/gemini-1.5-flash`, `tunedModels/x` and
19
+ * `projects/p/locations/l/publishers/google/models/gemini-1.5-pro` are Google
20
+ * API resource names, and the model is the part after the last `models`
21
+ * segment. Neither form is a Hugging Face repository id.
22
+ *
23
+ * @param {string} modelId Model reference as written in the source
24
+ * @returns {{ name: string, nonHub: boolean, route?: string, routeProvider?: string }}
25
+ * The model name, whether the reference is not a Hub repository id, and the
26
+ * route and its provider when one is named
27
+ */
28
+ export declare function splitModelReference(modelId: string): {
29
+ name: string;
30
+ nonHub: boolean;
31
+ route?: string;
32
+ routeProvider?: string;
33
+ };
34
+ /**
35
+ * Name the creator of a model from its name alone, when only one creator
36
+ * publishes under that name.
37
+ *
38
+ * @param {string} modelName Model name without route or namespace
39
+ * @returns {string|undefined} Creator id
40
+ */
41
+ export declare function modelCreatorFromName(modelName: string): string | undefined;
42
+ /**
43
+ * Resolve a creator spelling, such as a Hugging Face organisation or a
44
+ * GGUF general.organization value, to a known creator id.
45
+ *
46
+ * @param {string} name Organisation name or namespace
47
+ * @returns {string|undefined} Creator id, or undefined when unknown
48
+ */
49
+ export declare function modelCreatorFromOrganization(name: string): string | undefined;
50
+ /**
51
+ * Pick the creator of a model that source code calls by name.
52
+ *
53
+ * The provider of such a model is the SDK, AI host or route the code uses,
54
+ * which names the client rather than the model: the openai SDK is the usual
55
+ * client for self-hosted Llama or DeepSeek servers, and a file may use
56
+ * several SDKs. So the creator is the one the model name names, when the
57
+ * provider is that creator, is a hosting or routing service, or the file
58
+ * also uses the creator's own SDK or host. A different creator's SDK leaves
59
+ * it unset. A model name that names no creator is credited only to a
60
+ * provider whose own API serves nothing but its own models. A local runtime
61
+ * serves whatever tag the user created, so it names no creator, and neither
62
+ * does a file that only uses a local runtime.
63
+ *
64
+ * @param {string} modelId Model reference as written in the source
65
+ * @param {{ provider?: string, fileProviders?: Iterable<string>, runtimes?: Iterable<string> }} [context]
66
+ * The provider the code declares through an SDK import, AI host or dosai
67
+ * report (never a guess from the model name), every provider the file
68
+ * references, and the runtimes it uses
69
+ * @returns {string|undefined} Creator id
70
+ */
71
+ export declare function resolveModelCreator(modelId: string, context?: {
72
+ provider?: string;
73
+ fileProviders?: Iterable<string>;
74
+ runtimes?: Iterable<string>;
75
+ }): string | undefined;
76
+ /**
77
+ * Build the CycloneDX organisational entity for a creator id.
78
+ *
79
+ * @param {string} creator Creator id
80
+ * @returns {{ name: string }|undefined} Manufacturer entity
81
+ */
82
+ export declare function modelCreatorEntity(creator: string): {
83
+ name: string;
84
+ } | undefined;
85
+ //# sourceMappingURL=aiProviders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiProviders.d.ts","sourceRoot":"","sources":["../../../lib/inventory/aiProviders.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,qBAW9B,CAAC;AAmCH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,aAY/B,CAAC;AAqHH;;;;;;;;;;;;;;GAcG;A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,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YAHpB,MAAM,KACJ,MAAM,GAAC,SAGuB,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,YAHpB,MAAM,KACJ,OAGqC,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,YAHhB,MAAM,KACJ,OAIsD,CAAC;AAoCpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,YALpB,MAAM,eACN,MAAM,GAAC,MAAM,gCACb,MAAM,KACJ,MAkCZ,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,YAHjB,MAAM,KACJ,MAUZ,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,YAJ7B,MAAM,gBACN,MAAM,KACJ,MAWZ,CAAC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Maximum accepted lockfile size. `gh actions-lock` writes files that stay
3
+ * far below this; anything larger is treated as corrupt rather than parsed.
4
+ * @type {number}
5
+ */
6
+ export declare const MAX_ACTIONS_LOCKFILE_BYTES: number;
7
+ export type ActionsLockDependency = {
8
+ /**
9
+ * Owner name, lower case.
10
+ */
11
+ owner: string;
12
+ /**
13
+ * Repository name, lower case.
14
+ */
15
+ repo: string;
16
+ /**
17
+ * Ref the commit was resolved from, with its case
18
+ * preserved. For a v0.0.1 entry this is the tag, else the branch. It can
19
+ * differ from the ref in the pin key: the key keeps the ref the workflow
20
+ * wrote (for example `v4`) while this field records the resolved one (for
21
+ * example `v4.3.1`).
22
+ */
23
+ ref: string;
24
+ /**
25
+ * "sha1" or "sha256".
26
+ */
27
+ hashAlgo: string;
28
+ /**
29
+ * Hex digest without the algorithm prefix.
30
+ */
31
+ commit: string;
32
+ /**
33
+ * Numeric id of the action's owner.
34
+ */
35
+ ownerId: number;
36
+ /**
37
+ * Numeric id of the action's repository.
38
+ */
39
+ repoId: number;
40
+ /**
41
+ * Set only when the entry records one
42
+ * (v0.0.3); undefined means the home host.
43
+ */
44
+ hostname: string | undefined;
45
+ /**
46
+ * Normalised pin keys of the direct dependencies;
47
+ * empty for leaf actions.
48
+ */
49
+ uses: string[];
50
+ };
51
+ export type ActionsLockfile = {
52
+ /**
53
+ * Version as written in the file; null for an
54
+ * empty result.
55
+ */
56
+ version: string | null;
57
+ /**
58
+ * Set only when an older version
59
+ * was normalised.
60
+ */
61
+ sourceVersion: string | undefined;
62
+ /**
63
+ * Map of repository-relative
64
+ * workflow path (always with "/" separators) to its flat pin list.
65
+ */
66
+ workflows: Record<string, string[]>;
67
+ /**
68
+ * Map of
69
+ * normalised pin key to the resolved entry.
70
+ */
71
+ dependencies: Record<string, ActionsLockDependency>;
72
+ /**
73
+ * Human-readable problems found while reading.
74
+ */
75
+ warnings: string[];
76
+ };
77
+ /**
78
+ * Parse an actions lockfile from its text content.
79
+ *
80
+ * Every problem, including a file that cannot be parsed at all, is reported
81
+ * as a warning and collapses the result to the empty shape; the function
82
+ * never throws.
83
+ *
84
+ * @param {string} text Lockfile content
85
+ * @param {string} [filePath] Path the content came from, used in warnings
86
+ * @returns {ActionsLockfile} Parsed lockfile, or the empty shape
87
+ */
88
+ export declare function parseActionsLockfileString(text: string, filePath?: string): ActionsLockfile;
89
+ /**
90
+ * Read and parse an actions lockfile such as
91
+ * `.github/workflows/actions.lock`.
92
+ *
93
+ * The file is size-checked before it is read, and every problem is reported
94
+ * as a warning and collapses the result to the empty shape; the function
95
+ * never throws.
96
+ *
97
+ * @param {string} filePath Path to the lockfile
98
+ * @returns {ActionsLockfile} Parsed lockfile, or the empty shape
99
+ */
100
+ export declare function parseActionsLockfile(filePath: string): ActionsLockfile;
101
+ //# sourceMappingURL=githubActionsLock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"githubActionsLock.d.ts","sourceRoot":"","sources":["../../../../lib/inventory/ciParsers/githubActionsLock.js"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAF7B,MAE2C,CAAC;AAyCnD,YAAkB,qBAAqB,GACvC;;;;IAAmB,KAAK,EAAb,MAAM,CACjB;;;;IAAmB,IAAI,EAAZ,MAAM,CACjB;;;;;;;;IAAmB,GAAG,EAAX,MAAM,CAKjB;;;;IAAmB,QAAQ,EAAhB,MAAM,CACjB;;;;IAAmB,MAAM,EAAd,MAAM,CACjB;;;;IAAmB,OAAO,EAAf,MAAM,CACjB;;;;IAAmB,MAAM,EAAd,MAAM,CACjB;;;;;IAA6B,QAAQ,EAA1B,MAAM,GAAC,SAAS,CAE3B;;;;;IAAqB,IAAI,EAAd,MAAM,EAAE,CAErB;CAAA,CAAA;AAKE,YAAkB,eAAe,GACjC;;;;;IAAwB,OAAO,EAApB,MAAM,GAAC,IAAI,CAEtB;;;;;IAA6B,aAAa,EAA/B,MAAM,GAAC,SAAS,CAE3B;;;;;IAAqC,SAAS,2BAE9C;;;;;IAAkD,YAAY,wCAE9D;;;;IAAqB,QAAQ,EAAlB,MAAM,EAAE,CACrB;CAAA,CAAA;AAyjBD;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAJpC,MAIoC,EAAE,QAAQ,AAHtD,CACA,EADQ,MAG8C,GAF5C,eAAe,CA2F3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAHlC,MAGkC,GAFhC,eAAe,CAoC3B"}
@@ -49,6 +49,11 @@ export declare function collectToolBomRefs(bomJson: Object): string[];
49
49
  * Resolve the bom-ref of the cdxgen tool component, if present. This is the
50
50
  * canonical attribution target for inventory that cdxgen collected itself.
51
51
  *
52
+ * The tool component named "cdxgen" wins; a bare bom-ref (legacy array-style
53
+ * tools) counts when it is cdxgen's own npm purl. A helper whose bom-ref only
54
+ * mentions cdxgen, such as a cdxgen-plugins-bin tool like trustinspector, is
55
+ * never the cdxgen tool.
56
+ *
52
57
  * @param {Object} bomJson CycloneDX BOM
53
58
  * @returns {string|undefined} bom-ref of the cdxgen tool, or undefined
54
59
  */
@@ -1 +1 @@
1
- {"version":3,"file":"citations.d.ts","sourceRoot":"","sources":["../../../lib/inventory/citations.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,OAAO,EACP,MAAM,EACN,IAAI,EACJ,SAAS,GACV,GAlBE;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,WAAW,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;IAAuB,YAAY,AAAnC,CACA,EADQ,MAAM,CACd;IAAuB,OAAO,AAA9B,CACA,EADQ,MAAM,CACd;IAAuB,MAAM,AAA7B,CACA,EADQ,MAAM,CACd;IAAuB,IAAI,AAA3B,CACA,EADQ,MAAM,CACd;IAAuB,SAAS,AAAhC,CAEA,EAFQ,MAAM,CAEd;CAUG,GAVO,MAAM,GAAC,IAAI,CA0CvB;AAmBD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,QAAQ,GAJ5B,MAAM,EAI2B,EAAE,SAAS,GAH5C,MAAM,EAG2C,GAF/C,MAAM,EAAE,CAiBpB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAH/B,MAG+B,GAF7B,MAAM,EAAE,CAgBpB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAHjC,MAGiC,GAF/B,MAAM,GAAC,SAAS,CAK5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,CAIlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAL5B,MAK4B,EAAE,SAAS,EAJvC,MAAM,EAIiC,EAAE,OAAO,GAHhD,MAGqD,GAFnD,MAAM,CAuBlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EALn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OAAO,GAHhD,MAGqD,GAFnD,MAAM,CAuBlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EALnC,MAKmC,EAAE,OAAO,AAJpD,CAEA,EADA;IAAyB,IAAI,AAA7B,CACA,EADQ,MAAM,CACd;CAEyD,GAF/C,MAAM,GAAC,IAAI,CAcvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"communityAiConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/communityAiConfigParser.js"],"names":[],"mappings":"AAs1BA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,EAL1B,MAsGT,CAAC"}
1
+ {"version":3,"file":"communityAiConfigParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/communityAiConfigParser.js"],"names":[],"mappings":"AA0rDA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,EAL1B,MAoIT,CAAC"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * CycloneDX 2.0 rendering and reading.
3
+ *
4
+ * cdxgen assembles every BOM in the CycloneDX 1.x shape and converts to the
5
+ * requested spec version at the end of the pipeline (see
6
+ * lib/stages/postgen/specVersionCompat.js). The 2.0 draft is a structural
7
+ * rewrite rather than an additive change, so the conversion lives here, as two
8
+ * pure functions plus small helpers, instead of inside the compat walker:
9
+ *
10
+ * - `renderCycloneDx20(internalBom, context)` turns the 1.x-shaped internal
11
+ * model into a 2.0 document. It never mutates its input, and its output
12
+ * depends only on the model and the optional context (the cdx-hbom
13
+ * hardware mapper, see hbomLoader.js: hardwareRenderContext).
14
+ * `renderCycloneDx20WithReport(internalBom, context)` does the same and
15
+ * also returns the counts of everything the render could not carry.
16
+ * - `readCycloneDx20(bom20)` turns a 2.0 document into the internal 1.x-shaped
17
+ * model, reporting everything it could not carry in `losses`.
18
+ * - `loadBomForAnalysis(bomJson)` is the single entry point every BOM reader
19
+ * uses; it returns the document as is for 1.x and calls readCycloneDx20 for
20
+ * 2.0, so no reader learns the 2.0 shape.
21
+ * - `getInternalBom(bomNSData)` and `refreshRenderedBom(bomNSData, options)`
22
+ * are the generation-side half: postProcess keeps the 1.x model on
23
+ * `bomNSData.internalBomJson` at 2.0, and the writer re-renders once after
24
+ * the last mutation.
25
+ *
26
+ * Every field name below is quoted from the pinned draft schema
27
+ * (data/cyclonedx-2.0-bundled.schema.json, CycloneDX/specification 2.0-dev at
28
+ * ea8c3605829d1da13339a0790b6da73548e42a6b); citations give the `$defs` path.
29
+ */
30
+ export { readCycloneDx20 } from "./cyclonedx20Read.js";
31
+ export { renderCycloneDx20, renderCycloneDx20WithReport, } from "./cyclonedx20Render.js";
32
+ export { CDX20_INTERNAL_SECTIONS_KEY, CDXGEN_PARTY_REF_ID, DEPENDENCY_TRACK_CDX20_ERROR, } from "./cyclonedx20Tables.js";
33
+ /**
34
+ * Load any CycloneDX BOM for analysis: the document as is for 1.x, the
35
+ * internal 1.x-shaped model for 2.0.
36
+ *
37
+ * A document whose specVersion is 2.0 or later, or which has a specFormat, is
38
+ * read as 2.0, and the reader reports stray 1.x members such as
39
+ * `components` as losses. A model the 2.0 reader or the 2.0 compatibility
40
+ * pass produced carries the internal model mark (markInternalModel) and is
41
+ * returned as is; cdxgen hands that model to the evidence analysis in memory
42
+ * (evinse's `inputBomJson`), because the mark does not survive JSON. The
43
+ * internal sections key is never trusted on a 1.x document: the returned
44
+ * copy leaves it out, so it cannot reach a 2.0 render.
45
+ *
46
+ * @param {object} bomJson Parsed CycloneDX BOM
47
+ * @returns {{internalBom: object, specVersion: string, losses: Array<{pointer: string, reason: string}>}}
48
+ * @throws {Error} With a short message when the 2.0 reader fails on the
49
+ * document
50
+ */
51
+ export declare function loadBomForAnalysis(bomJson: object): {
52
+ internalBom: object;
53
+ specVersion: string;
54
+ losses: Array<{
55
+ pointer: string;
56
+ reason: string;
57
+ }>;
58
+ };
59
+ /**
60
+ * The one-line notice a reader prints when loading a 2.0 document lost
61
+ * data: the number of losses, with the details left to thoughtLog.
62
+ *
63
+ * @param {Array<{pointer: string, reason: string}>} losses Reader losses
64
+ * @returns {string} The notice
65
+ */
66
+ export declare function formatReadLossNotice(losses: Array<{
67
+ pointer: string;
68
+ reason: string;
69
+ }>): string;
70
+ /**
71
+ * Return the 1.x-shaped model of a generation run. At 1.x the rendered BOM is
72
+ * the internal model, so this always yields something readers can walk.
73
+ *
74
+ * @param {{bomJson?: object, internalBomJson?: object}} bomNSData
75
+ * @returns {object} The 1.x-shaped BOM
76
+ */
77
+ export declare function getInternalBom(bomNSData: {
78
+ bomJson?: object;
79
+ internalBomJson?: object;
80
+ }): object;
81
+ /**
82
+ * Re-render the 2.0 document after a post-postProcess mutation of the
83
+ * internal model, with the render context postProcess used
84
+ * (`bomNSData.renderContext`). A no-op at 1.x, which keeps those versions
85
+ * byte-identical.
86
+ *
87
+ * @param {{bomJson?: object, internalBomJson?: object, renderContext?: object}} bomNSData
88
+ * @param {object} options CLI options carrying `specVersion`
89
+ * @returns {{bomJson?: object, internalBomJson?: object}} The same bomNSData
90
+ */
91
+ export declare function refreshRenderedBom(bomNSData: {
92
+ bomJson?: object;
93
+ internalBomJson?: object;
94
+ renderContext?: object;
95
+ }, options: object): {
96
+ bomJson?: object;
97
+ internalBomJson?: object;
98
+ };
99
+ //# sourceMappingURL=cyclonedx20.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cyclonedx20.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cyclonedx20.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAUH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,iBAAiB,EACjB,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAL/B,MAK+B,GAJ7B;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC,CAAA;CAAC,CAuCxG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAHhC,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAGP,GAF9B,MAAM,CAKlB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAH7B;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAGd,GAF3B,MAAM,CAIlB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAJjC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAIlC,EAAE,OAAO,EAH1C,MAG0C,GAFxC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAC,CAgBxD"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Small shared helpers for the CycloneDX 2.0 renderer and reader: type
3
+ * guards, cloning, render counters and the environment-variable shape change.
4
+ */
5
+ /** True for a plain object (not null, not an array). */
6
+ export declare const isObjectRecord: (value: any) => boolean;
7
+ /** True for a string with at least one character. */
8
+ export declare const isNonEmptyString: (value: any) => boolean;
9
+ /** structuredClone that passes `undefined` through. */
10
+ export declare const clone: (value: any) => any;
11
+ export declare const isBomLink: (value: any) => boolean;
12
+ /**
13
+ * A fresh, empty set of render counters.
14
+ *
15
+ * @param {object} [shadows] 2.0 originals kept by readCycloneDx20 (see
16
+ * takeShadow)
17
+ * @param {{toolRefId?: string, timestamp?: string}} [claims] What identity
18
+ * claims are attributed with (see identityClaimContext)
19
+ * @returns {object} Render counters
20
+ */
21
+ export declare function createRenderStats(shadows?: object, claims?: {
22
+ toolRefId?: string;
23
+ timestamp?: string;
24
+ }): object;
25
+ /**
26
+ * The key a 1.x value is shadowed under: the SHA-256 of its JSON. The
27
+ * reader and the renderer serialize the same object the same way, so an
28
+ * unchanged value finds its 2.0 original again.
29
+ *
30
+ * @param {*} value 1.x value
31
+ * @returns {string} Hex digest
32
+ */
33
+ export declare function shadowKey(value: any): string;
34
+ /**
35
+ * The 2.0 original readCycloneDx20 kept for this unchanged 1.x value, as a
36
+ * fresh clone, or undefined. Identical 1.x values kept for several originals
37
+ * get them back in document order. Never mutates the stored shadows.
38
+ *
39
+ * @param {object} stats Render counters from createRenderStats
40
+ * @param {string} kind Shadow namespace (component, metadata, …)
41
+ * @param {*} value 1.x value about to be rendered
42
+ * @returns {*} The 2.0 original or undefined
43
+ */
44
+ export declare function takeShadow(stats: object, kind: string, value: any): any;
45
+ /**
46
+ * The single 2.0 original readCycloneDx20 kept for this unchanged 1.x value,
47
+ * as a fresh clone, or undefined. Unlike takeShadow nothing is consumed: the
48
+ * reader registers a key here only when every entry it read under that key
49
+ * had the same original, so the lookup does not depend on render order.
50
+ *
51
+ * @param {object} stats Render counters from createRenderStats
52
+ * @param {string} kind Shadow namespace (identity)
53
+ * @param {*} value 1.x value about to be rendered
54
+ * @returns {*} The 2.0 original or undefined
55
+ */
56
+ export declare function peekShadow(stats: object, kind: string, value: any): any;
57
+ /** Count one dropped or rewritten value under a stable label. */
58
+ export declare function countDrop(stats: any, label: any, count?: number): void;
59
+ /**
60
+ * Count one value the render rewrote without losing data (a duplicate refId
61
+ * turned into a reference, a retargeted annotation subject).
62
+ */
63
+ export declare function countRewrite(stats: any, label: any, count?: number): void;
64
+ /**
65
+ * Count a 1.x JSF `signature` the render leaves out: it signs the 1.x
66
+ * serialization, so it cannot verify over the re-rendered 2.0 document, and
67
+ * 2.0 `signatures` hold JSS signatures
68
+ * (#/$defs/cyclonedx-common-2.0/$defs/signatures).
69
+ */
70
+ export declare function countSignatureDrop(stats: any, path: any): void;
71
+ /** Count every defined key of `source` that `handled` does not list. */
72
+ export declare function countUnmapped(stats: any, prefix: any, source: any, handled: any): void;
73
+ /** Clone the listed fields of `source` that are defined onto `target`. */
74
+ export declare function copyDefined(target: any, source: any, fields: any): void;
75
+ /** Remove duplicate entries (by JSON value) for `uniqueItems` arrays. */
76
+ export declare function uniqueByValue(values: any): any[];
77
+ /** Split a 1.x `author` string the way specVersionCompat does. */
78
+ export declare function authorStringToNames(authorValue: any): string[];
79
+ /** A 1.x scalar-or-array identifier field as a list of strings. */
80
+ export declare function identifierValues(value: any): any[];
81
+ /** Assign `value` to `out[key]` unless it is undefined. */
82
+ export declare function setDefined(out: any, key: any, value: any): void;
83
+ /**
84
+ * Convert a 1.x `environmentVars` array of {name, value} entries into the 2.0
85
+ * map of names to values
86
+ * (#/$defs/cyclonedx-formulation-2.0/$defs/environmentVars). Reverse for read.
87
+ * Entries the map cannot hold are counted when `stats` is given.
88
+ */
89
+ export declare function convertEnvironmentVars(value: any, stats: any): any;
90
+ /** Turn a 2.0 environmentVars map back into the 1.x {name, value} array. */
91
+ export declare function reverseEnvironmentVars(value: any): any;
92
+ /** Every refId string declared anywhere under the given roots. */
93
+ export declare function collectDeclaredRefIds(roots: any): Set<any>;
94
+ /**
95
+ * True when any `party` member (a refId string or a partyReference) or any
96
+ * `ref` member below `node` names `refId`. Restored 2.0 originals reference
97
+ * a derived party (see derivedPartyDeclarations) without passing through the
98
+ * converters, so its declaration follows the rendered document rather than a
99
+ * render flag.
100
+ */
101
+ export declare function referencesParty(node: any, refId: any): any;
102
+ //# sourceMappingURL=cyclonedx20Common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cyclonedx20Common.d.ts","sourceRoot":"","sources":["../../../lib/inventory/cyclonedx20Common.js"],"names":[],"mappings":"AAAA;;;GAGG;AAIH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