@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
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Post-quantum migration risk for cryptographic assets (cdxgen/cdxgen#4592).
3
+ *
4
+ * The facts come from data/pqc-migration.json: the classes of NIST IR 8547
5
+ * (final, October 2026) Tables 2, 4 and 8 and section 4.1.3, plus FIPS 186-5
6
+ * for DSA, each with its members (algorithm families, OIDs and normalised
7
+ * names), the transition the source states and the rationale text. This
8
+ * module classifies a component and builds the risk entry; it adds no fact of
9
+ * its own.
10
+ *
11
+ * Classification of an algorithm asset (cryptoProperties.assetType
12
+ * `algorithm`), first match wins. A hybrid combiner (primitive `combiner`) is
13
+ * not classified: IR 8547 section 3.2.1 approves a composite scheme with one
14
+ * approved input, so the OID of one input does not decide it.
15
+ *
16
+ * 1. `algorithmProperties.algorithmFamily`. A quantum-safe family (SHA-2,
17
+ * SHA-3, AES, ML-KEM, …) is safe, except its 112-bit members (SHA-224,
18
+ * SHA-512/224, SHA3-224), which are recognised by OID or name.
19
+ * 2. `cryptoProperties.oid` (rsaEncryption, id-ecPublicKey, the RSA, ECDSA,
20
+ * EdDSA and DSA signature OIDs, X25519/X448, DH, …).
21
+ * 3. The component name, lower case with only letters and digits kept
22
+ * ("SHA-512/224" is `sha512224`), then resolveAlgorithmFamily(name). A
23
+ * name that resolves to a hash family but names a DSA, RSA or ECDSA
24
+ * signature ("SHA256withDSA", "dsa-with-sha256", "RSA-SHA-512") is that
25
+ * signature algorithm, not its digest.
26
+ *
27
+ * A class whose members have a key family (rsa, ff, ec) is checked against
28
+ * the minimum key size of IR 8547 Tables 2 and 4 (112 bits of classical
29
+ * strength: RSA and finite-field 2048, elliptic curve 224). An algorithm with
30
+ * a known smaller key, and a public or private key asset
31
+ * (`related-crypto-material`) whose size is smaller, is classed
32
+ * `below-minimum-strength` instead. The key size of an algorithm comes from
33
+ * the first of these that gives a plausible key size (at least 512 for rsa
34
+ * and ff, 160 to 571 for ec): a trailing number in its name ("RSA-1024")
35
+ * unless it follows a hash token ("RSASSA-PSS-SHA-512",
36
+ * "sha512WithRSAEncryption-512"), an RFC 7919 group name ("ffdhe2048"), its
37
+ * `parameterSetIdentifier` (a digest size such as "256" on an RSA signature
38
+ * is not a key size) or the bit size in its curve name. A key asset is
39
+ * checked with its own size against the base class of its algorithm, so a
40
+ * 4096-bit key of an algorithm named "RSA-1024" is not reported again.
41
+ *
42
+ * The likelihood and impact levels are the fixed per-class rating the data
43
+ * file records. No confidence is emitted (the rating is not a measurement)
44
+ * and no organisational fact is invented: no owner, status or responses.
45
+ */
46
+ /** Prefix of every risk refId this module derives. */
47
+ export declare const PQC_RISK_REF_ID_PREFIX = "risk-pqc-";
48
+ /**
49
+ * A name in lower case with only ASCII letters and digits kept, the form the
50
+ * `names` tables of data/pqc-migration.json use.
51
+ *
52
+ * @param {string} name Algorithm or key name
53
+ * @returns {string} The compact name, empty for no name
54
+ */
55
+ export declare function compactAlgorithmName(name: string): string;
56
+ /**
57
+ * Classify one cryptographic-asset component. Algorithm assets get their
58
+ * IR 8547 class; key assets are classified only when their size is below the
59
+ * IR 8547 minimum (the algorithm asset carries the quantum risk).
60
+ *
61
+ * @param {object} component A component with cryptoProperties
62
+ * @param {Map<string, object>} [algorithmsByRef] Components by bom-ref, to
63
+ * resolve a key's `algorithmRef`
64
+ * @returns {{className: string, keyFamily?: string, keySize?: number, minimumKeySize?: number}|undefined}
65
+ * The class, or undefined when the asset is quantum-safe or unclassified
66
+ */
67
+ export declare function classifyPqcCryptoAsset(component: object, algorithmsByRef?: Map<string, object>): {
68
+ className: string;
69
+ keyFamily?: string;
70
+ keySize?: number;
71
+ minimumKeySize?: number;
72
+ } | undefined;
73
+ /**
74
+ * Build the risks.risks[] entries for the quantum-vulnerable and weak
75
+ * cryptographic assets of a 1.x-shaped internal BOM: one per asset with a
76
+ * bom-ref (an asset without one could not be referenced from `affects`), in
77
+ * component order, unique by refId.
78
+ *
79
+ * @param {object} internalBom The internal model
80
+ * @returns {object[]} Risk entries shaped for the draft's
81
+ * #/$defs/cyclonedx-risk-2.0/$defs/risk; empty when nothing is at risk
82
+ */
83
+ export declare function collectPqcRisks(internalBom: object): object[];
84
+ //# sourceMappingURL=pqcMigration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pqcMigration.d.ts","sourceRoot":"","sources":["../../../lib/inventory/pqcMigration.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAQH,sDAAsD;AACtD,eAAO,MAAM,sBAAsB,cAAc,CAAC;AA0ClD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAH9B,MAG8B,GAF5B,MAAM,CAUlB;AAuMD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EANrC,MAMqC,EAAE,eAAe,AAL9D,CAEA,EAFQ,GAAG,CAAC,MAAM,EAAE,MAAM,CAKgD,GAHhE;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAYxG;AAYD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAJhC,MAIgC,GAH9B,MAAM,EAAE,CA0BpB"}
@@ -5,12 +5,17 @@
5
5
  * formulation components carrying build-tool, build-script capability, native
6
6
  * build dependency, and maturin metadata properties.
7
7
  *
8
- * @type {{id: string, patterns: string[], parse(files: string[]): {components: Object[]}}}
8
+ * Components record the manifest path relative to context.rootDir, the
9
+ * scanned project root.
10
+ *
11
+ * @type {{id: string, patterns: string[], parse(files: string[], options?: Object, context?: {rootDir?: string}): {components: Object[]}}}
9
12
  */
10
13
  export declare const rustFormulationParser: {
11
14
  id: string;
12
15
  patterns: string[];
13
- parse(files: string[]): {
16
+ parse(files: string[], options?: Object, context?: {
17
+ rootDir?: string;
18
+ }): {
14
19
  components: Object[];
15
20
  };
16
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rustFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rustFormulationParser.js"],"names":[],"mappings":"AAkTA;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,EAFxB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAwBxF,CAAC"}
1
+ {"version":3,"file":"rustFormulationParser.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rustFormulationParser.js"],"names":[],"mappings":"AA0TA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,EAFxB;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAC,CAAA;CAwBxI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"scalaCoords.d.ts","sourceRoot":"","sources":["../../../lib/inventory/scalaCoords.js"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAR5B,MAQ4B,GAP1B;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,GAAC,IAAI,CAAC;IACjF,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CA+B9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAc,EACd,KAAU,EACV,YAAiB,EACjB,cAAmB,EACnB,OAAY,GACb,GAbE;IAAuB,IAAI,AAA3B,CACA,EADQ,MAAM,CACd;IAAuB,KAAK,AAA5B,CACA,EADQ,MAAM,CACd;IAAsB,YAAY,EAA1B,MAAM,CACd;IAAuB,cAAc,AAArC,CACA,EADQ,MAAM,CACd;IAAuB,OA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;GAOG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAJrC,MAIqC,GAHnC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,GAAC,IAAI,CAAA;CAAE,GAAC,SAAS,CA2BjE;AASD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAH5B,MAG4B,GAF1B,MAAM,CAWlB"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Collapse the components that stand for one Scala library.
3
+ *
4
+ * A build tool such as sbt reports a library as `group:name@version` with the
5
+ * Scala binary suffix moved into `cdx:scala:compilerVersion`. The jars a scan
6
+ * finds on disk name the same library again, and not in the same way: with the
7
+ * suffix (`cats-core_3`), without a repository, or, for a jar without a Maven
8
+ * descriptor, only as the staged file name `<group>.<artifact>-<version>.jar`,
9
+ * which a filename-based guess splits at the wrong dot
10
+ * (`pkg:maven/cpg2-protos/io.appthreat.cpg2-protos_3`). Each of those is merged
11
+ * into the component the build tool reported. A staged jar of another version
12
+ * of a reported library, such as a stale build, keeps its own component but is
13
+ * renamed to the coordinates the reported library has.
14
+ *
15
+ * Spellings of the same coordinates merge only when they were built for the
16
+ * same Scala binary version, so the `_2.12` and `_2.13` artifacts of one
17
+ * library stay two components. Components that no reported library accounts
18
+ * for are left as they are.
19
+ *
20
+ * @param {Object[]} components BOM components
21
+ * @param {Object[]} dependencies BOM dependencies
22
+ * @returns {{components: Object[], dependencies: Object[], purlMap: Map<string, string>}}
23
+ * The collapsed components, the dependencies with references to merged
24
+ * components pointed at the component that remains, and the purl each
25
+ * merged or renamed component now has, keyed by the purl it had
26
+ */
27
+ export declare function mergeScalaDuplicateComponents(components: Object[], dependencies: Object[]): {
28
+ components: Object[];
29
+ dependencies: Object[];
30
+ purlMap: Map<string, string>;
31
+ };
32
+ /**
33
+ * Key the jar namespace map by the purls the components have after
34
+ * {@link mergeScalaDuplicateComponents}, so a merged or renamed jar still
35
+ * finds its namespaces. A purl that already has an entry keeps it, with the
36
+ * namespaces of the merged entry added.
37
+ *
38
+ * @param {Object} mapping Jar namespace map keyed by purl
39
+ * @param {Map<string, string>} purlMap New purl keyed by old purl
40
+ * @returns {Object} The re-keyed map
41
+ */
42
+ export declare function rekeyNamespaceMapping(mapping: Object, purlMap: Map<string, string>): Object;
43
+ //# sourceMappingURL=scalaDedupe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scalaDedupe.d.ts","sourceRoot":"","sources":["../../../lib/inventory/scalaDedupe.js"],"names":[],"mappings":"AAkMA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAP7C,MAAM,EAOuC,EAAE,YAAY,EAN3D,MAAM,EAMqD,GALzD;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAC,CAoIxF;AAuDD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAJlC,MAIkC,EAAE,OAAO,EAH3C,GAAG,CAAC,MAAM,EAAE,MAAM,CAGyB,GAFzC,MAAM,CA6BlB"}
@@ -9,9 +9,24 @@ export declare const SUPPORTED_PURL_SOURCE_TYPES: string[];
9
9
  * @returns {boolean} true if safe
10
10
  */
11
11
  export declare function isSafeGitRefName(refName: string | undefined): boolean;
12
+ /**
13
+ * Determine whether git must refuse HTTP redirects. A git host allowlist is
14
+ * checked against the URL cdxgen is given, and git would otherwise follow
15
+ * the server's redirect on its first request to a host the allowlist never
16
+ * saw. Secure mode refuses redirects in the HTTP client too.
17
+ *
18
+ * @returns {boolean} true when a git host allowlist or secure mode applies
19
+ */
20
+ export declare function gitRedirectsRefused(): boolean;
12
21
  /**
13
22
  * Execute git with hardened defaults.
14
23
  *
24
+ * Every call runs with command-scope settings that keep the repository from
25
+ * running fsmonitor hooks or being opened as a bare repository. While a git
26
+ * host allowlist or secure mode applies, git also refuses HTTP redirects, so
27
+ * an allowed host cannot send a clone or ls-remote to a host the allowlist
28
+ * does not name.
29
+ *
15
30
  * @param {string[]} args git arguments
16
31
  * @param {Object} options command options
17
32
  * @param {string|undefined} options.cwd working directory
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/inventory/source.js"],"names":[],"mappings":"AAsCA,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B,wIAC8F,CAAC;AAExI,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B,UAWvC,CAAC;AAuBF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAH7B,MAAM,GAAC,SAGsB,GAF3B,OAAO,CAUnB;AAiBD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAR5B,MAAM,EAQsB,EAAE,OAAO,GAN7C;IAAkC,GAAG,EAA7B,MAAM,GAAC,SAAS,CACxB;IAAmC,YAAY,EAAvC,OAAO,GAAC,SAAS,CAGzB;CAEkD,GAFxC,MAAM,CA6ClB;AA+ED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAJtC,MAAM,GAAC,SAI+B,EAAE,OAAO,GAH/C,MAGoD,GAFlD,MAAM,GAAC,SAAS,CAiJ5B;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAFtB,MAAM,CASlB;AAkBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAH3B,MAG2B,GAFzB,OAAO,CAWnB;AAkBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAHvB,MAGuB,GAFrB,OAAO,CA+BnB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAHpB,MAGoB,GAFlB,OAAO,CAyBnB;AA2BD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAHxB,MAGwB,GAFtB,OAAO,CAkBnB;AAED;;;;;GAK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;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAJrC,MAIqC,EAAE,cAAc,EAHrD,MAAM,GAAC,SAG8C,GAFnD,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAJtC,MAIsC,EAAE,cAAc,EAHtD,MAAM,GAAC,SAG+C,GAFpD,MAAM,GAAC,SAAS,CAiF5B;AAkJD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAHlC,MAGkC,GAFhC;IAAC,MAAM,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAA;CAAC,GAAC,IAAI,CA4D5D;AA6GD;;GAEG;AACH,wBAAgB,yBAAyB,SAExC;AAID;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAJ5C,KAAK,CAAC,MAAM,CAIgC,GAF1C,OAAO,CAAC,IAAI,CAAC,CA6BzB;AAiDD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAAC,CA6MlI;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAF5B,MAE4B,QAkCtC"}
@@ -42,13 +42,17 @@ export declare function repoIdFromFixtureDirectory(filePath: string): string | u
42
42
  *
43
43
  * @param {string} modelRef model, dataset, or space reference
44
44
  * @param {{ includeDatasetPurl?: boolean }} [options={}] pedigree reference options
45
- * @returns {{ "bom-ref": string, group: string, name: string, purl?: string, type: string }|undefined} component reference
45
+ * @returns {{ "bom-ref": string, group: string, name: string, purl?: string, supplier?: { name: string, url?: string[] }, type: string }|undefined} component reference
46
46
  */
47
47
  export declare function createHuggingFaceComponentReference(modelRef: string, _options?: {}): {
48
48
  "bom-ref": string;
49
49
  group: string;
50
50
  name: string;
51
51
  purl?: string;
52
+ supplier?: {
53
+ name: string;
54
+ url?: string[];
55
+ };
52
56
  type: string;
53
57
  } | undefined;
54
58
  /**
@@ -75,6 +79,7 @@ export declare function createHuggingFaceComponentReference(modelRef: string, _o
75
79
  * properties?: Array<object>,
76
80
  * purl?: string,
77
81
  * scope?: string,
82
+ * supplier?: { name: string, url?: string[] },
78
83
  * tags?: string[],
79
84
  * type: "data",
80
85
  * },
@@ -110,6 +115,10 @@ export declare function createHuggingFaceDatasetReference(dataset: object | stri
110
115
  properties?: Array<object>;
111
116
  purl?: string;
112
117
  scope?: string;
118
+ supplier?: {
119
+ name: string;
120
+ url?: string[];
121
+ };
113
122
  tags?: string[];
114
123
  type: "data";
115
124
  };
@@ -1 +1 @@
1
- {"version":3,"file":"huggingfaceManifest.d.ts","sourceRoot":"","sources":["../../../lib/parsers/huggingfaceManifest.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAFnC,MAAM,EAE6D,CAAC;AAC9E;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAF/B,MAAM,EAE6D,CAAC;AAC9E;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAFhC,MAAM,EAKf,CAAC;AA0LF;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,EAH1C,MAG0C,GAFxC,MAAM,GAAC,SAAS,CAc5B;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAHvC,MAAM,GAAC,SAGgC,GAFrC,OAAO,CAOnB;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAHxC,MAGwC,GAFtC,MAAM,GAAC,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M,EAAE,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;CACtB,GAAC,SAAS,CAqDb;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,AAPP,CACA,EADQ,MAOI,EACb,MAAM,AAPL,CACA,EADQ,MAOE,EACX,mBAAmB,AAPlB,CACA,EADQ,CAAC,OAAO,EAAE,MAAM,GAAC,MAAM,KAAK,MAAM,GAAC,SAOb,EAC/B,OAAO,AAPN,CACA,EADQ;IAAE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAC,SAAS,KAAK,MAAM,GAAC,SAAS,CAAA;CAOzD,GAND,MAAM,GAAC,SAAS,CAsF5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,AATP,CACA,EADQ,MASD,EACR,aAAa,AATZ,CACA,EADQ,MASI,EACb,YAAY,EATH,MAAM,GAAC,SASJ,EACZ,OAAO,AATN,CAGA,EAHQ;IACN,4BAA4B,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAC,SAAS,CAAC;CAQ7D,GAND,MAAM,GAAC,SAAS,CAiD5B"}
1
+ {"version":3,"file":"huggingfaceManifest.d.ts","sourceRoot":"","sources":["../../../lib/parsers/huggingfaceManifest.js"],"names":[],"mappings":"AAoBA;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAFnC,MAAM,EAE6D,CAAC;AAC9E;;;;GAIG;AACH,eAAO,M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E,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAC,SAAS,KAAK,MAAM,GAAC,SAAS,CAAA;CAOzD,GAND,MAAM,GAAC,SAAS,CAsF5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,AATP,CACA,EADQ,MASD,EACR,aAAa,AATZ,CACA,EADQ,MASI,EACb,YAAY,EATH,MAAM,GAAC,SASJ,EACZ,OAAO,AATN,CAGA,EAHQ;IACN,4BAA4B,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAC,SAAS,CAAC;CAQ7D,GAND,MAAM,GAAC,SAAS,CAiD5B"}
@@ -71,6 +71,18 @@ export declare function toHuggingFaceAssetPath(assetType: string, repoId: string
71
71
  * @returns {string|undefined} canonical URL under huggingface.co
72
72
  */
73
73
  export declare function toHuggingFaceAssetUrl(assetType: string, repoId: string): string | undefined;
74
+ /**
75
+ * Build the supplier entity for a Hugging Face namespace: the namespace as
76
+ * the name and its organisation or user page as the url. The url is left
77
+ * out when the namespace has characters a Hub account name cannot have.
78
+ *
79
+ * @param {string} namespace Hugging Face organisation or user name
80
+ * @returns {{ name: string, url?: string[] }|undefined} supplier entity
81
+ */
82
+ export declare function toHuggingFaceSupplier(namespace: string): {
83
+ name: string;
84
+ url?: string[];
85
+ } | undefined;
74
86
  /**
75
87
  * Convert a Hugging Face repo reference to a package URL.
76
88
  *
@@ -1 +1 @@
1
- {"version":3,"file":"huggingfaceUtils.d.ts","sourceRoot":"","sources":["../../../lib/parsers/huggingfaceUtils.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAFd,MAEyC,CAAC;AACpD;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,EAFlC,GAAG,CAAC,MAAM,CAYlB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,EAFtC,MAEkE,CAAC;AAC7E;;;;GAIG;AACH,eAAO,MAAM,iCAAi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AC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBlE;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,kBAAkB,EAHnD,MAAM,GAAC,MAG4C,GAFjD,MAAM,GAAC,SAAS,CAoB5B"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Summarize Kiro CLI V3 permission documents into policy-safe posture facts.
3
+ *
4
+ * Kiro V3 describes what an agent may do with `capability`/`effect` rules that
5
+ * live in an agent definition's `permissions` object, in the user-scope
6
+ * `~/.kiro/settings/permissions.yaml`, and in the per-workspace
7
+ * `~/.kiro/workspace-roots/<hash>/permissions.yaml`. The rules carry `match`
8
+ * pattern lists, free-text reasons, and paths, none of which belong in a BOM.
9
+ * This module reduces a document to counts, allowlisted effect counts,
10
+ * validated capability names, and booleans, and never returns the patterns or
11
+ * any other free text.
12
+ */
13
+ /**
14
+ * Summarize a Kiro V3 permission document.
15
+ *
16
+ * Accepts the parsed `permissions` object of an agent definition or a parsed
17
+ * `permissions.yaml` document. A bare rules array is accepted as well. The
18
+ * result carries only counts, booleans, and validated token lists; `match`
19
+ * patterns, `exclude` lists, reasons, and paths are never returned.
20
+ *
21
+ * @param {Object|Array|undefined} rulesOrDoc Parsed permissions object, YAML
22
+ * document, or rules array
23
+ * @returns {{
24
+ * ruleCount: number,
25
+ * allowRuleCount: number,
26
+ * denyRuleCount: number,
27
+ * askRuleCount: number,
28
+ * evaluateRuleCount: number,
29
+ * capabilities: string[],
30
+ * allowsAllCapabilities: boolean,
31
+ * unrestrictedAllowCapabilities: string[],
32
+ * workspaceTrusted: boolean|undefined,
33
+ * policyPresets: string[],
34
+ * unknownPolicyPresetCount: number,
35
+ * }} Permission posture summary
36
+ */
37
+ export declare function summarizeKiroPermissions(rulesOrDoc: Object | any[] | undefined): {
38
+ ruleCount: number;
39
+ allowRuleCount: number;
40
+ denyRuleCount: number;
41
+ askRuleCount: number;
42
+ evaluateRuleCount: number;
43
+ capabilities: string[];
44
+ allowsAllCapabilities: boolean;
45
+ unrestrictedAllowCapabilities: string[];
46
+ workspaceTrusted: boolean | undefined;
47
+ policyPresets: string[];
48
+ unknownPolicyPresetCount: number;
49
+ };
50
+ /**
51
+ * Flatten a permission summary into property suffix/value pairs.
52
+ *
53
+ * Both scans that consume Kiro permission documents emit the same suffixes;
54
+ * the host scan prefixes them with `cdx:agentic:` and the project scan with
55
+ * `cdx:agent:`. Values are numbers, booleans, or comma-separated validated
56
+ * tokens, so no free text reaches a BOM through this mapping.
57
+ *
58
+ * @param {ReturnType<summarizeKiroPermissions>} summary Permission posture summary
59
+ * @returns {Record<string, number|boolean|string>} Property suffix mapped to its value
60
+ */
61
+ export declare function kiroPermissionSummaryEntries(summary: ReturnType<summarizeKiroPermissions>): Record<string, number | boolean | string>;
62
+ //# sourceMappingURL=kiroPermissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kiroPermissions.d.ts","sourceRoot":"","sources":["../../../lib/parsers/kiroPermissions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA+BH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAhBxC,MAAM,WAAO,SAgB2B,GAdtC;IACR,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,gBAAgB,EAAE,OAAO,GAAC,SAAS,CAAC;IACpC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAyDH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAHzC,UAAU,CAAC,wBAAwB,CAGM,GAFvC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAC,OAAO,GAAC,MAAM,CAAC,CAiCjD"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Target platforms a VS Code-family marketplace publishes an extension for.
3
+ * `universal` and `web` builds are the same artefact on every platform and are
4
+ * not part of the extension's identity.
5
+ */
6
+ export declare const VSCODE_TARGET_PLATFORMS: Set<string>;
7
+ /**
8
+ * Normalize a target platform value from a manifest, an `extensions.json`
9
+ * record, or a folder name. Values that do not name a specific platform, such
10
+ * as `universal`, `web`, `undefined`, or an empty string, return an empty
11
+ * string.
12
+ *
13
+ * @param {string} value Raw target platform
14
+ * @returns {string} A value from VSCODE_TARGET_PLATFORMS, or an empty string
15
+ */
16
+ export declare function normalizeVscodeTargetPlatform(value: string): string;
17
+ /**
18
+ * Split an installed extension folder name into its publisher, name, version
19
+ * and target platform.
20
+ *
21
+ * @param {string} dirName Folder name, such as `ms-python.python-2025.4.0` or
22
+ * `anthropic.claude-code-2.1.313-darwin-arm64`
23
+ * @returns {{publisher: string, name: string, version: string, platform: string}|undefined}
24
+ * The parts, or undefined when the name does not follow the pattern
25
+ */
26
+ export declare function parseVscodeExtensionDirName(dirName: string): {
27
+ publisher: string;
28
+ name: string;
29
+ version: string;
30
+ platform: string;
31
+ } | undefined;
32
+ /**
33
+ * Check a string is a semantic version: three numeric parts, then an optional
34
+ * `-prerelease` and `+build`.
35
+ *
36
+ * @param {string} text Candidate version
37
+ * @returns {boolean} true for a semver
38
+ */
39
+ export declare function isSemver(text: string): boolean;
40
+ /**
41
+ * Read the target platform from the path of an installed extension folder.
42
+ *
43
+ * @param {string} extensionPath Path to the extension folder, with either
44
+ * separator
45
+ * @returns {string} The target platform, or an empty string
46
+ */
47
+ export declare function vscodeExtensionPlatformFromPath(extensionPath: string): string;
48
+ //# sourceMappingURL=vscodeExtensionId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vscodeExtensionId.d.ts","sourceRoot":"","sources":["../../../lib/parsers/vscodeExtensionId.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,aAWlC,CAAC;AAKH;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAHxC,MAGwC,GAFtC,MAAM,CAKlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EALxC,MAKwC,GAHtC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAyD1F;AA+BD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAHlB,MAGkB,GAFhB,OAAO,CAuBnB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,aAAa,EAJlD,MAIkD,GAFhD,MAAM,CAQlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../lib/server/server.js"],"names":[],"mappings":"AAWA,OAAO,EACL,iBAAiB,EAGlB,MAAM,qBAAqB,CAAC;AA+E7B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAc7B;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAJnB,MAAM,GAAC,MAAM,GAAC,KAAK,CAAC,MAAM,GAAC,MAAM,CAId,GAHjB,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,KAAK,CAAC,MAAM,GAAC,MAAM,GAAC,OAAO,CAAC,CAwC9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EALvB,MAKuB,EAAE,IAAI,AAJrC,CACA,EADQ,MAIkC,EAAE,OAAO,AAHnD,CACA,EADQ,MAGgD,GAF9C,MAAM,CAwBlB;AA+DD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAJtC,MAIsC,E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G;AACH,QAAA,MAAM,KAAK,YAHA,MAAM,KACJ,IAwYZ,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC"}
@@ -1,6 +1,13 @@
1
1
  /**
2
2
  * Filter and enhance BOM post generation.
3
3
  *
4
+ * At CycloneDX 2.0 the returned `bomNSData` carries two documents:
5
+ * `bomJson` is the rendered 2.0 document (what library users, the server and
6
+ * the writer see), and `internalBomJson` is the 1.x-shaped model the audit,
7
+ * evinse, display and SPDX-export readers use. `internalBomJson` is never
8
+ * serialized; `refreshRenderedBom` re-renders `bomJson` from it after any
9
+ * later mutation. At 1.x `internalBomJson` is unset.
10
+ *
4
11
  * @param {Object} bomNSData BOM with namespaces object
5
12
  * @param {Object} options CLI options
6
13
  * @param {string} [filePath] Source path used for formulation and metadata context
@@ -1 +1 @@
1
- {"version":3,"file":"postgen.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/postgen.js"],"names":[],"mappings":"AAiiBA;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,SAAS,EANhC,MAMgC,EAAE,OAAO,EALzC,MAKyC,EAAE,QAAQ,AAJ3D,CAEA,EAFQ,MAImD,GAFjD,OAAO,CAAC,MAAM,CAAC,CAsE3B;AAgHD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAL1B,MAK0B,EAAE,OAAO,EAJnC,MAImC,GAFjC,MAAM,CA2JlB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAL3B,MAK2B,EAAE,OAAO,EAJpC,MAIoC,GAFlC,MAAM,CAqClB;AAqHD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EALvC,MAKuC,EAAE,OAAO,EAJhD,MAIgD,GAF9C,MAAM,EAAE,CAmBpB;AAgBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EALrC,MAKqC,EAAE,OAAO,EAJ9C,MAI8C,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G;AACH,wBAAgB,UAAU,CAAC,QAAQ,KAAA,QAUlC;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,IAFhB,IAAI,CAYhB;AAMD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EALrB,MAKqB,EAAE,OAAO,EAJ9B,MAI8B,GAF5B,MAAM,CA2HlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ruleEngine.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/ruleEngine.js"],"names":[],"mappings":"AAkiBA;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAJpC,GAIoC,GAHlC,MAAM,GAAC,SAAS,CA0B5B;AAED,wBAAsB,SAAS,CAAC,QAAQ,KAAA,kBAqFvC;AAiCD;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAJ5B,MAI4B,EAAE,OAAO,EAHrC,MAGqC,EAAE,OAAO,KAAK,GAFjD,OAAO,OAAO,CAuF1B;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,KAAK,kBAY/D"}
1
+ {"version":3,"file":"ruleEngine.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/ruleEngine.js"],"names":[],"mappings":"AAkiBA;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAJpC,GAIoC,GAHlC,MAAM,GAAC,SAAS,CA0B5B;AAED,wBAAsB,SAAS,CAAC,QAAQ,KAAA,kBAqFvC;AAyCD;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAJ5B,MAI4B,EAAE,OAAO,EAHrC,MAGqC,EAAE,OAAO,KAAK,GAFjD,OAAO,OAAO,CAuF1B;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA,EAAE,OAAO,KAAK,kBAY/D"}
@@ -68,4 +68,29 @@ export declare function collectFieldPaths(subject: Object, prefix?: string, path
68
68
  * @returns {string[]} Sorted field paths that no longer appear
69
69
  */
70
70
  export declare function diffRemovedFieldPaths(sourceBomJson: Object, normalizedBomJson: Object): string[];
71
+ /**
72
+ * Count the leaf values of a JSON document as `path=value` strings, using
73
+ * the dotted, index-free paths of collectFieldPaths. Array order is ignored,
74
+ * so two documents that differ only in member order give the same counts,
75
+ * but a repeated entry counts once per occurrence. Empty arrays and objects
76
+ * count as leaves.
77
+ *
78
+ * @param {*} subject JSON value
79
+ * @param {string} [prefix] Path so far
80
+ * @param {Map<string, number>} [leaves] Accumulator
81
+ * @returns {Map<string, number>} Occurrences of each `path=value` string
82
+ */
83
+ export declare function collectLeafValues(subject: any, prefix?: string, leaves?: Map<string, number>): Map<string, number>;
84
+ /**
85
+ * Report the leaf values of `sourceBomJson` that `convertedBomJson` lacks,
86
+ * ignoring member order (see collectLeafValues). A value the source holds
87
+ * more often than the output is reported once for every missing occurrence,
88
+ * so dropping one of two identical entries counts.
89
+ *
90
+ * @param {Object} sourceBomJson BOM before conversion
91
+ * @param {Object} convertedBomJson BOM after conversion
92
+ * @returns {string[]} Sorted `path=value` strings missing from the output,
93
+ * repeated per missing occurrence
94
+ */
95
+ export declare function diffMissingLeafValues(sourceBomJson: Object, convertedBomJson: Object): string[];
71
96
  //# sourceMappingURL=specVersionCompat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"specVersionCompat.d.ts","sourceRoot":"","sources":["../../../../lib/stages/postgen/specVersionCompat.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAqTH;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAJrC,MAIqC,EAAE,OAAO,EAH9C,MAG8C,GAF5C,MAAM,CAclB;AAsUD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAJ1C,MAI0C,EAAE,OAAO,EAHnD,MAGmD,GAFjD,MAAM,CA6BlB;AAED;;;;;;;;;;;;;;GAcG;AACH,w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;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EALxC,MAKwC,EAAE,gBAAgB,EAJ1D,MAI0D,GAHxD,MAAM,EAAE,CAYpB"}
@@ -2,10 +2,14 @@
2
2
  * Validate the generated bom using jsonschema
3
3
  *
4
4
  * @param {object} bomJson content
5
+ * @param {object} [options] Validation options
6
+ * @param {boolean} [options.deep] Run the deep validators after the schema check. Defaults to true.
5
7
  *
6
8
  * @returns {Promise<Boolean>} true if the BOM is valid. false otherwise.
7
9
  */
8
- export declare const validateBom: (bomJson: object) => Promise<boolean>;
10
+ export declare const validateBom: (bomJson: object, options?: {
11
+ deep?: boolean;
12
+ }) => Promise<boolean>;
9
13
  /**
10
14
  * Validate the generated SPDX export.
11
15
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bomValidator.d.ts","sourceRoot":"","sources":["../../../lib/validator/bomValidator.js"],"names":[],"mappings":"AAqQA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAJb,MAAM,KAEJ,OAAO,SAmCnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,aAHd,MAAM,GAAC,MAAM,KACX,OAyLZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAFlB,MAAM,YAmEhB,CAAC;AA4CF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAFf,MAAM,YA+HhB,CAAC;AA2CF;;;;GAIG;AACH,eAAO,MAAM,YAAY,YAFd,MAAM,YAmFhB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAF1B,MAE0B,WAkIpC"}
1
+ {"version":3,"file":"bomValidator.d.ts","sourceRoot":"","sources":["../../../lib/validator/bomValidator.js"],"names":[],"mappings":"AA4QA;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,YANb,MAAM,YAEd;IAA0B,IAAI,AAA9B,CAEA,EAFQ,OAAO,CAEf;CAAA,KAAU,OAAO,SAsCnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,aAHd,MAAM,GAAC,MAAM,KACX,OAyLZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAFlB,MAAM,YAmEhB,CAAC;AA4CF;;;;GAIG;AACH,eAAO,MAAM,aAAa,YAFf,MAAM,YA+HhB,CAAC;AA2CF;;;;GAIG;AACH,eAAO,MAAM,YAAY,YAFd,MAAM,YAmFhB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAF1B,MAE0B,WAkIpC"}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Orchestrates evaluation of internal compliance rule packs (SCVS + CRA) and
3
- * aggregates results into per-benchmark scorecards.
2
+ * Orchestrates evaluation of internal compliance rule packs (SCVS + CRA + CISA)
3
+ * and aggregates results into per-benchmark scorecards.
4
4
  *
5
5
  * This module is deliberately independent of the CycloneDX BOM audit engine
6
6
  * (lib/stages/postgen/auditBom.js). The two engines share similar *Finding*
7
7
  * output shape so reporters can consume either source uniformly.
8
8
  */
9
- import { getAllComplianceRules, getCraRules, getScvsRules } from "./complianceRules.js";
9
+ import { getAllComplianceRules, getCisaAiRules, getCisaRules, getCraRules, getScvsRules } from "./complianceRules.js";
10
10
  /**
11
11
  * Resolve a benchmark alias (case-insensitive). Returns null when unknown.
12
12
  *
@@ -68,5 +68,5 @@ export declare function scoreBenchmark(benchmark: object, findings: Array<object
68
68
  * @returns {Array<object>}
69
69
  */
70
70
  export declare function buildBenchmarkReports(findings: Array<object>, requestedAliases?: Array<string>): Array<object>;
71
- export { getAllComplianceRules, getCraRules, getScvsRules };
71
+ export { getAllComplianceRules, getCisaAiRules, getCisaRules, getCraRules, getScvsRules, };
72
72
  //# sourceMappingURL=complianceEngine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"complianceEngine.d.ts","sourceRoot":"","sources":["../../../lib/validator/complianceEngine.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,qBAAqB,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EAH3B,MAG2B,GAFzB,MAAM,GAAG,IAAI,CAKzB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAFjB,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAJtB,MAIsB,EAAE,OAAO,EAH/B,MAG+B,GAF7B,MAAM,CA6ClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,OAAO,EANxB,MAMwB,EAAE,IAAI,AALtC,CAGA,EAFA;IAA6B,UAAU,AAAvC,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;IAA6B,UAAU,AAAvC,CACA,EADQ,KAAK,CAAC,MAAM,CAAC,CACrB;CAE2C,GAFjC,KAAK,CAAC,MAAM,CAAC,CAqBzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAJ7B,MAI6B,EAAE,QAAQ,EAHvC,KAAK,CAAC,MAAM,CAG2B,GAFrC,MAAM,CAuClB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAJnC,KAAK,CAAC,MAAM,CAIuB,EAAE,gBAAgB,AAH7D,CACA,EADQ,KAAK,CAAC,MAAM,CAGyC,GAFnD,KAAK,CAAC,MAAM,CAAC,CAOzB;AAED,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,GACb,CAAC"}
@@ -12,7 +12,7 @@
12
12
  * id - Stable short identifier (e.g. "SCVS-1.1").
13
13
  * name - Human readable short name.
14
14
  * description - Long description (wording taken from the source standard).
15
- * standard - Source standard key: "SCVS" or "CRA".
15
+ * standard - Source standard key: "SCVS", "CRA" or "CISA".
16
16
  * standardRefs - Array of canonical control identifiers.
17
17
  * category - Grouping used by --categories.
18
18
  * severity - Severity emitted for a failing automatable rule.
@@ -34,7 +34,7 @@
34
34
  * }
35
35
  */
36
36
  /**
37
- * Returns the full catalog of compliance rules (SCVS + CRA).
37
+ * Returns the full catalog of compliance rules (SCVS + CRA + CISA).
38
38
  *
39
39
  * @returns {Array<object>}
40
40
  */
@@ -51,6 +51,18 @@ export declare function getScvsRules(): Array<object>;
51
51
  * @returns {Array<object>}
52
52
  */
53
53
  export declare function getCraRules(): Array<object>;
54
+ /**
55
+ * Returns only CISA 2026 minimum elements rules.
56
+ *
57
+ * @returns {Array<object>}
58
+ */
59
+ export declare function getCisaRules(): Array<object>;
60
+ /**
61
+ * Returns only the CISA and G7 AI SBOM element rules.
62
+ *
63
+ * @returns {Array<object>}
64
+ */
65
+ export declare function getCisaAiRules(): Array<object>;
54
66
  /**
55
67
  * Test-only export exposing internal helper functions for unit tests.
56
68
  * Double-underscore prefixed to discourage external use.
@@ -1 +1 @@
1
- {"version":3,"file":"complianceRules.d.ts","sourceRoot":"","sources":["../../../lib/validator/complianceRules.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAskDH;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAFf,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAFd,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAFT,MAQT,CAAC"}
1
+ {"version":3,"file":"complianceRules.d.ts","sourceRoot":"","sources":["../../../lib/validator/complianceRules.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAw7FH;;;;GAIG;AACH,wBAAgB,qBAAqB,IAFxB,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAFf,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAFd,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAFf,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAFjB,KAAK,CAAC,MAAM,CAAC,CAIzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAFT,MAQT,CAAC"}
@@ -38,6 +38,11 @@ export declare function validateGeneratedBom(bomJson: object): Promise<{
38
38
  /**
39
39
  * Run structural + compliance validation against a parsed BOM.
40
40
  *
41
+ * The JSON schema check and signature verification read the document as
42
+ * given. The deep checks and compliance rules read the 1.x-shaped model, so
43
+ * the same project gives the same rule results at 1.x and at 2.0; for a 2.0
44
+ * document `readLosses` lists what that model could not hold.
45
+ *
41
46
  * @param {object} bomJson Parsed CycloneDX JSON BOM.
42
47
  * @param {object} [options]
43
48
  * @param {boolean} [options.schema] Run JSON-Schema validation (default true).
@@ -55,6 +60,7 @@ export declare function validateGeneratedBom(bomJson: object): Promise<{
55
60
  * schemaValid: boolean,
56
61
  * deepValid: boolean,
57
62
  * validationErrors: Array<{ stage: string, message: string }>,
63
+ * readLosses: Array<{ pointer: string, reason: string }>,
58
64
  * signatureVerified: boolean | null,
59
65
  * signatureDetails: object | null,
60
66
  * signatureEntries: Array<{ index: number, algorithm: any, keyId: any, verified: boolean }> | null,
@@ -82,6 +88,10 @@ export declare function validateBomAdvanced(bomJson: object, options?: {
82
88
  stage: string;
83
89
  message: string;
84
90
  }>;
91
+ readLosses: Array<{
92
+ pointer: string;
93
+ reason: string;
94
+ }>;
85
95
  signatureVerified: boolean | null;
86
96
  signatureDetails: object | null;
87
97
  signatureEntries: Array<{