@cdxgen/cdxgen 13.4.0 → 13.5.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 (208) hide show
  1. package/README.md +7 -7
  2. package/bin/cdxgen-secure.js +15 -0
  3. package/bin/cdxgen.js +25 -5
  4. package/bin/evinse.js +5 -0
  5. package/bin/hbom.js +15 -7
  6. package/bin/repl.js +29 -0
  7. package/data/cbomosdb-queries.json +13 -1
  8. package/data/component-tags.json +8 -0
  9. package/data/queries-darwin.json +25 -1
  10. package/data/queries-win.json +19 -1
  11. package/data/queries.json +41 -0
  12. package/data/remediations.json +283 -1
  13. package/data/rules/cbom-security.yaml +235 -4
  14. package/data/rules/go-binaries.yaml +46 -0
  15. package/data/rules/golem-go.yaml +80 -0
  16. package/data/rules/hbom-compliance.yaml +40 -22
  17. package/data/rules/hbom-performance.yaml +7 -1
  18. package/data/rules/host-topology.yaml +1 -1
  19. package/data/rules/obom-runtime.yaml +31 -2
  20. package/data/rules/php-runtime.yaml +143 -0
  21. package/lib/audit/index.js +14 -0
  22. package/lib/cli/bomAssembly.js +28 -3
  23. package/lib/cli/cliOptions.js +110 -3
  24. package/lib/cli/index.js +73 -4
  25. package/lib/cli/jvmBom.js +126 -20
  26. package/lib/cli/managedBom.js +711 -71
  27. package/lib/cli/nativeBom.js +225 -28
  28. package/lib/core/env.js +30 -8
  29. package/lib/core/fs.js +28 -19
  30. package/lib/core/httpClient.js +74 -45
  31. package/lib/core/projectConfig.js +1 -0
  32. package/lib/core/projectTooling.js +97 -0
  33. package/lib/core/propertySanitizer.js +72 -0
  34. package/lib/ecosystems/golem.js +550 -6
  35. package/lib/ecosystems/gradleutils.js +30 -20
  36. package/lib/ecosystems/parsers-dotnet.js +117 -18
  37. package/lib/ecosystems/parsers-go.js +1090 -367
  38. package/lib/ecosystems/parsers-jvm.js +259 -17
  39. package/lib/ecosystems/parsers-misc.js +229 -44
  40. package/lib/ecosystems/parsers-python.js +11 -10
  41. package/lib/ecosystems/rubyutils.js +6 -3
  42. package/lib/ecosystems/rusi.js +10 -0
  43. package/lib/ecosystems/scalacliutils.js +2 -1
  44. package/lib/ecosystems/scalasem.js +3 -1
  45. package/lib/evinser/evinser.js +126 -18
  46. package/lib/evinser/swiftsem.js +68 -5
  47. package/lib/inventory/agentSkillSpec.js +17 -0
  48. package/lib/inventory/apkInstalledDb.js +243 -0
  49. package/lib/inventory/atomUtils.js +33 -0
  50. package/lib/inventory/auditCategories.js +3 -3
  51. package/lib/inventory/cacheDir.js +52 -9
  52. package/lib/inventory/certificates.js +2371 -0
  53. package/lib/inventory/communityAiConfigParser.js +4 -9
  54. package/lib/inventory/deps.js +6 -4
  55. package/lib/inventory/display.js +200 -3
  56. package/lib/inventory/dosai.js +500 -58
  57. package/lib/inventory/dynamic.js +45 -3
  58. package/lib/inventory/envcontext.js +168 -5
  59. package/lib/inventory/evidenceUtils.js +436 -23
  60. package/lib/inventory/formulationParsers.js +3 -2
  61. package/lib/inventory/goBuildInfo.js +140 -0
  62. package/lib/inventory/hbom.js +67 -7
  63. package/lib/inventory/hbomAnalysis.js +16 -0
  64. package/lib/inventory/hostTopology.js +21 -0
  65. package/lib/inventory/osPackagePurl.js +244 -0
  66. package/lib/inventory/osPackageResolver.js +89 -87
  67. package/lib/inventory/osinfo.js +79 -31
  68. package/lib/inventory/osqueryTransform.js +114 -5
  69. package/lib/inventory/phpBuildInfo.js +487 -0
  70. package/lib/inventory/phpHostProbe.js +641 -0
  71. package/lib/inventory/rootfsCerts.js +426 -0
  72. package/lib/inventory/source.js +207 -3
  73. package/lib/inventory/spdx.js +144 -0
  74. package/lib/inventory/traceRunner.js +5 -1
  75. package/lib/inventory/tracedCrypto.js +129 -0
  76. package/lib/managers/binary.js +529 -183
  77. package/lib/managers/docker.js +166 -12
  78. package/lib/parsers/email.js +277 -0
  79. package/lib/parsers/largeJson.js +34 -2
  80. package/lib/server/server.js +186 -1
  81. package/lib/stages/postgen/annotator.js +17 -1
  82. package/lib/stages/postgen/introspection/reflect.js +4 -1
  83. package/lib/stages/postgen/postgen.js +5 -5
  84. package/lib/stages/postgen/ruleEngine.js +58 -1
  85. package/lib/stages/postgen/specVersionCompat.js +30 -0
  86. package/lib/stages/pregen/pregen.js +117 -5
  87. package/lib/validator/bomValidator.js +26 -5
  88. package/lib/validator/generated/runtime.mjs +13 -0
  89. package/lib/validator/generated/validate-1.6.mjs +26 -7
  90. package/lib/validator/generated/validate-1.7.mjs +31 -12
  91. package/lib/validator/generated/validate-2.0.mjs +30 -11
  92. package/package.json +17 -17
  93. package/types/bin/cdxgen-secure.d.ts +3 -0
  94. package/types/bin/cdxgen-secure.d.ts.map +1 -0
  95. package/types/bin/repl.d.ts.map +1 -1
  96. package/types/lib/audit/index.d.ts.map +1 -1
  97. package/types/lib/cli/bomAssembly.d.ts +9 -2
  98. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  99. package/types/lib/cli/cliOptions.d.ts +43 -0
  100. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  101. package/types/lib/cli/index.d.ts.map +1 -1
  102. package/types/lib/cli/jvmBom.d.ts +20 -0
  103. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  104. package/types/lib/cli/managedBom.d.ts.map +1 -1
  105. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  106. package/types/lib/core/env.d.ts +18 -2
  107. package/types/lib/core/env.d.ts.map +1 -1
  108. package/types/lib/core/fs.d.ts.map +1 -1
  109. package/types/lib/core/httpClient.d.ts.map +1 -1
  110. package/types/lib/core/projectConfig.d.ts.map +1 -1
  111. package/types/lib/core/projectTooling.d.ts +41 -0
  112. package/types/lib/core/projectTooling.d.ts.map +1 -0
  113. package/types/lib/core/propertySanitizer.d.ts +26 -0
  114. package/types/lib/core/propertySanitizer.d.ts.map +1 -1
  115. package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
  116. package/types/lib/ecosystems/golem.d.ts +81 -1
  117. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  118. package/types/lib/ecosystems/gradleutils.d.ts +10 -8
  119. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  120. package/types/lib/ecosystems/parsers-dotnet.d.ts +40 -4
  121. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  122. package/types/lib/ecosystems/parsers-go.d.ts +85 -13
  123. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  124. package/types/lib/ecosystems/parsers-jvm.d.ts +28 -2
  125. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  126. package/types/lib/ecosystems/parsers-misc.d.ts +18 -58
  127. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  128. package/types/lib/ecosystems/parsers-python.d.ts +4 -3
  129. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  130. package/types/lib/ecosystems/pythonutils.d.ts +1 -1
  131. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  132. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  133. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -1
  134. package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
  135. package/types/lib/evinser/evinser.d.ts +25 -0
  136. package/types/lib/evinser/evinser.d.ts.map +1 -1
  137. package/types/lib/evinser/swiftsem.d.ts +10 -0
  138. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  139. package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
  140. package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
  141. package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
  142. package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
  143. package/types/lib/inventory/atomUtils.d.ts +14 -0
  144. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  145. package/types/lib/inventory/cacheDir.d.ts +12 -4
  146. package/types/lib/inventory/cacheDir.d.ts.map +1 -1
  147. package/types/lib/inventory/certificates.d.ts +205 -0
  148. package/types/lib/inventory/certificates.d.ts.map +1 -0
  149. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  150. package/types/lib/inventory/deps.d.ts +2 -1
  151. package/types/lib/inventory/deps.d.ts.map +1 -1
  152. package/types/lib/inventory/display.d.ts +18 -0
  153. package/types/lib/inventory/display.d.ts.map +1 -1
  154. package/types/lib/inventory/dosai.d.ts +145 -6
  155. package/types/lib/inventory/dosai.d.ts.map +1 -1
  156. package/types/lib/inventory/dynamic.d.ts +6 -1
  157. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  158. package/types/lib/inventory/envcontext.d.ts +40 -2
  159. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  160. package/types/lib/inventory/evidenceUtils.d.ts +29 -10
  161. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  162. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  163. package/types/lib/inventory/goBuildInfo.d.ts +10 -0
  164. package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
  165. package/types/lib/inventory/hbom.d.ts.map +1 -1
  166. package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
  167. package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
  168. package/types/lib/inventory/hostTopology.d.ts.map +1 -1
  169. package/types/lib/inventory/osPackagePurl.d.ts +99 -0
  170. package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
  171. package/types/lib/inventory/osPackageResolver.d.ts +6 -2
  172. package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
  173. package/types/lib/inventory/osinfo.d.ts +31 -6
  174. package/types/lib/inventory/osinfo.d.ts.map +1 -1
  175. package/types/lib/inventory/osqueryTransform.d.ts +51 -0
  176. package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
  177. package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
  178. package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
  179. package/types/lib/inventory/phpHostProbe.d.ts +35 -0
  180. package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
  181. package/types/lib/inventory/rootfsCerts.d.ts +27 -0
  182. package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
  183. package/types/lib/inventory/source.d.ts +28 -0
  184. package/types/lib/inventory/source.d.ts.map +1 -1
  185. package/types/lib/inventory/spdx.d.ts +15 -0
  186. package/types/lib/inventory/spdx.d.ts.map +1 -1
  187. package/types/lib/inventory/traceRunner.d.ts +4 -1
  188. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  189. package/types/lib/inventory/tracedCrypto.d.ts +22 -0
  190. package/types/lib/inventory/tracedCrypto.d.ts.map +1 -1
  191. package/types/lib/managers/binary.d.ts +10 -0
  192. package/types/lib/managers/binary.d.ts.map +1 -1
  193. package/types/lib/managers/docker.d.ts +12 -0
  194. package/types/lib/managers/docker.d.ts.map +1 -1
  195. package/types/lib/parsers/email.d.ts +19 -0
  196. package/types/lib/parsers/email.d.ts.map +1 -0
  197. package/types/lib/parsers/largeJson.d.ts +13 -0
  198. package/types/lib/parsers/largeJson.d.ts.map +1 -1
  199. package/types/lib/server/server.d.ts +8 -0
  200. package/types/lib/server/server.d.ts.map +1 -1
  201. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  202. package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
  203. package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
  204. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  205. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  206. package/types/lib/stages/pregen/pregen.d.ts +14 -1
  207. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  208. package/types/lib/validator/bomValidator.d.ts.map +1 -1
@@ -16,6 +16,7 @@ import {
16
16
  } from "../inventory/bomUtils.js";
17
17
  import { isPartialTree } from "../inventory/depsUtils.js";
18
18
  import { isValidPurl, parsePurlLoose } from "../inventory/purl.js";
19
+ import { isValidIdnEmail } from "../parsers/email.js";
19
20
 
20
21
  const dirName = dirNameStr;
21
22
  // The v13 floor is spec 1.6. 1.4 and 1.5 were dropped here so that the JS and
@@ -53,7 +54,7 @@ const compileSchemaValidator = (specVersion) => {
53
54
  if (isCycloneDxSpecVersionAtLeast(specVersion, "2.0")) {
54
55
  const ajv = new Ajv2020(AJV_OPTIONS);
55
56
  useLinearUniqueItems(ajv);
56
- addFormats(ajv);
57
+ addCycloneDxFormats(ajv);
57
58
  addDraft2020BundledSchema(
58
59
  ajv,
59
60
  readJsonSchema("cryptography-defs.schema.json"),
@@ -84,7 +85,7 @@ const compileSchemaValidator = (specVersion) => {
84
85
  schemas,
85
86
  });
86
87
  useLinearUniqueItems(ajv);
87
- addFormats(ajv);
88
+ addCycloneDxFormats(ajv);
88
89
  validate = ajv.getSchema(
89
90
  `http://cyclonedx.org/schema/bom-${specVersion}.schema.json`,
90
91
  );
@@ -204,6 +205,21 @@ const useLinearUniqueItems = (ajv) => {
204
205
  });
205
206
  };
206
207
 
208
+ /**
209
+ * Register the formats the CycloneDX schemas assert: ajv-formats' set, plus
210
+ * `idn-email`, which ajv-formats lacks and `strict: false` would otherwise
211
+ * accept for any string. `cdxrs validate` checks it, so without it a
212
+ * malformed contact address passed here and failed there.
213
+ * `contrib/gen-validators.mjs` registers the same set for the pre-compiled
214
+ * validators.
215
+ *
216
+ * @param {object} ajv Ajv instance whose validators are about to be compiled
217
+ */
218
+ const addCycloneDxFormats = (ajv) => {
219
+ addFormats(ajv);
220
+ ajv.addFormat("idn-email", isValidIdnEmail);
221
+ };
222
+
207
223
  const readJsonSchema = (fileName) =>
208
224
  JSON.parse(readFileSync(join(dirName, "data", fileName), "utf-8"));
209
225
 
@@ -780,10 +796,15 @@ export const validateRefs = (bomJson) => {
780
796
  );
781
797
  }
782
798
  for (const dep of bomJson.dependencies) {
799
+ // A ref made from a purl is its decoded form. The ref of a cryptographic
800
+ // asset encodes the path or name it is keyed by on purpose, such as a
801
+ // keystore's `crypto/related-crypto-material/keystore/%2Fetc%2F...`, and
802
+ // is a dependency when it holds certificates.
783
803
  if (
784
- dep.ref.includes("%40") ||
785
- dep.ref.includes("%3A") ||
786
- dep.ref.includes("%2F")
804
+ !dep.ref.startsWith("crypto/") &&
805
+ (dep.ref.includes("%40") ||
806
+ dep.ref.includes("%3A") ||
807
+ dep.ref.includes("%2F"))
787
808
  ) {
788
809
  errorList.push(`Invalid encoded ref in dependencies ${dep.ref}`);
789
810
  }
@@ -3,6 +3,19 @@
3
3
  // The linear-time uniqueItems keyword calls this instead of ajv's pairwise
4
4
  // deep-equal, so the generated validators retain O(n) uniqueness checking.
5
5
 
6
+ import { createRequire } from "node:module";
7
+
8
+ import { isValidIdnEmail } from "../../parsers/email.js";
9
+
10
+ const require = createRequire(import.meta.url);
11
+
12
+ // Every format the generated validators check: ajv-formats' full set plus
13
+ // idn-email, which ajv-formats lacks (see contrib/gen-validators.mjs).
14
+ export const cdxgenFormats = {
15
+ ...require("ajv-formats/dist/formats").fullFormats,
16
+ "idn-email": isValidIdnEmail,
17
+ };
18
+
6
19
  export function canonicalize(value) {
7
20
  if (value === null || typeof value !== "object") {
8
21
  return typeof value === "string"
@@ -2,7 +2,7 @@
2
2
  // CycloneDX 1.6 schema validator (pre-compiled with ajv/standalone).
3
3
  import { createRequire } from "node:module";
4
4
  const require = createRequire(import.meta.url);
5
- import { canonicalize } from "./runtime.mjs";
5
+ import { canonicalize, cdxgenFormats } from "./runtime.mjs";
6
6
  "use strict";
7
7
  export const validate = validate10;
8
8
  export default validate10;
@@ -16,7 +16,7 @@ const func13 = canonicalize;
16
16
  const func5 = require("ajv/dist/runtime/ucs2length").default;
17
17
  const pattern0 = new RegExp("^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "u");
18
18
  const schema12 = {"type":"object","title":"BOM Metadata","additionalProperties":false,"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"The date and time (timestamp) when the BOM was created."},"lifecycles":{"type":"array","title":"Lifecycles","description":"Lifecycles communicate the stage(s) in which data in the BOM was captured. Different types of data may be available at various phases of a lifecycle, such as the Software Development Lifecycle (SDLC), IT Asset Management (ITAM), and Software Asset Management (SAM). Thus, a BOM may include data specific to or only obtainable in a given lifecycle.","items":{"type":"object","title":"Lifecycle","description":"The product lifecycle(s) that this BOM represents.","oneOf":[{"title":"Pre-Defined Phase","required":["phase"],"additionalProperties":false,"properties":{"phase":{"type":"string","title":"Phase","description":"A pre-defined phase in the product lifecycle.","enum":["design","pre-build","build","post-build","operations","discovery","decommission"],"meta:enum":{"design":"BOM produced early in the development lifecycle containing an inventory of components and services that are proposed or planned to be used. The inventory may need to be procured, retrieved, or resourced prior to use.","pre-build":"BOM consisting of information obtained prior to a build process and may contain source files and development artifacts and manifests. The inventory may need to be resolved and retrieved prior to use.","build":"BOM consisting of information obtained during a build process where component inventory is available for use. The precise versions of resolved components are usually available at this time as well as the provenance of where the components were retrieved from.","post-build":"BOM consisting of information obtained after a build process has completed and the resulting components(s) are available for further analysis. Built components may exist as the result of a CI/CD process, may have been installed or deployed to a system or device, and may need to be retrieved or extracted from the system or device.","operations":"BOM produced that represents inventory that is running and operational. This may include staging or production environments and will generally encompass multiple SBOMs describing the applications and operating system, along with HBOMs describing the hardware that makes up the system. Operations Bill of Materials (OBOM) can provide full-stack inventory of runtime environments, configurations, and additional dependencies.","discovery":"BOM consisting of information observed through network discovery providing point-in-time enumeration of embedded, on-premise, and cloud-native services such as server applications, connected devices, microservices, and serverless functions.","decommission":"BOM containing inventory that will be, or has been retired from operations."}}}},{"title":"Custom Phase","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","title":"Name","description":"The name of the lifecycle phase"},"description":{"type":"string","title":"Description","description":"The description of the lifecycle phase"}}}]}},"tools":{"title":"Tools","description":"The tool(s) used in the creation, enrichment, and validation of the BOM.","oneOf":[{"type":"object","title":"Tools","description":"The tool(s) used in the creation, enrichment, and validation of the BOM.","additionalProperties":false,"properties":{"components":{"type":"array","items":{"$ref":"#/definitions/component"},"uniqueItems":true,"title":"Components","description":"A list of software and hardware components used as tools."},"services":{"type":"array","items":{"$ref":"#/definitions/service"},"uniqueItems":true,"title":"Services","description":"A list of services used as tools. This may include microservices, function-as-a-service, and other types of network or intra-process services."}}},{"type":"array","title":"Tools (legacy)","description":"[Deprecated] The tool(s) used in the creation, enrichment, and validation of the BOM.","items":{"$ref":"#/definitions/tool"}}]},"manufacturer":{"title":"BOM Manufacturer","description":"The organization that created the BOM.\nManufacturer is common in BOMs created through automated processes. BOMs created through manual means may have `@.authors` instead.","$ref":"#/definitions/organizationalEntity"},"authors":{"type":"array","title":"BOM Authors","description":"The person(s) who created the BOM.\nAuthors are common in BOMs created through manual processes. BOMs created through automated means may have `@.manufacturer` instead.","items":{"$ref":"#/definitions/organizationalContact"}},"component":{"title":"Component","description":"The component that the BOM describes.","$ref":"#/definitions/component"},"manufacture":{"deprecated":true,"title":"Component Manufacture (legacy)","description":"[Deprecated] This will be removed in a future version. Use the `@.component.manufacturer` instead.\nThe organization that manufactured the component that the BOM describes.","$ref":"#/definitions/organizationalEntity"},"supplier":{"title":"Supplier","description":" The organization that supplied the component that the BOM describes. The supplier may often be the manufacturer, but may also be a distributor or repackager.","$ref":"#/definitions/organizationalEntity"},"licenses":{"title":"BOM License(s)","description":"The license information for the BOM document.\nThis may be different from the license(s) of the component(s) that the BOM describes.","$ref":"#/definitions/licenseChoice"},"properties":{"type":"array","title":"Properties","description":"Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.","items":{"$ref":"#/definitions/property"}}}};
19
- const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];
19
+ const formats0 = cdxgenFormats["date-time"];
20
20
  const schema13 = {"type":"object","title":"Component","required":["type","name"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["application","framework","library","container","platform","operating-system","device","device-driver","firmware","file","machine-learning-model","data","cryptographic-asset"],"meta:enum":{"application":"A software application. Refer to [https://en.wikipedia.org/wiki/Application_software](https://en.wikipedia.org/wiki/Application_software) for information about applications.","framework":"A software framework. Refer to [https://en.wikipedia.org/wiki/Software_framework](https://en.wikipedia.org/wiki/Software_framework) for information on how frameworks vary slightly from libraries.","library":"A software library. Refer to [https://en.wikipedia.org/wiki/Library_(computing)](https://en.wikipedia.org/wiki/Library_(computing)) for information about libraries. All third-party and open source reusable components will likely be a library. If the library also has key features of a framework, then it should be classified as a framework. If not, or is unknown, then specifying library is recommended.","container":"A packaging and/or runtime format, not specific to any particular technology, which isolates software inside the container from software outside of a container through virtualization technology. Refer to [https://en.wikipedia.org/wiki/OS-level_virtualization](https://en.wikipedia.org/wiki/OS-level_virtualization).","platform":"A runtime environment which interprets or executes software. This may include runtimes such as those that execute bytecode or low-code/no-code application platforms.","operating-system":"A software operating system without regard to deployment model (i.e. installed on physical hardware, virtual machine, image, etc) Refer to [https://en.wikipedia.org/wiki/Operating_system](https://en.wikipedia.org/wiki/Operating_system).","device":"A hardware device such as a processor or chip-set. A hardware device containing firmware SHOULD include a component for the physical hardware itself and another component of type 'firmware' or 'operating-system' (whichever is relevant), describing information about the software running on the device. See also the list of [known device properties](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/device.md).","device-driver":"A special type of software that operates or controls a particular type of device. Refer to [https://en.wikipedia.org/wiki/Device_driver](https://en.wikipedia.org/wiki/Device_driver).","firmware":"A special type of software that provides low-level control over a device's hardware. Refer to [https://en.wikipedia.org/wiki/Firmware](https://en.wikipedia.org/wiki/Firmware).","file":"A computer file. Refer to [https://en.wikipedia.org/wiki/Computer_file](https://en.wikipedia.org/wiki/Computer_file) for information about files.","machine-learning-model":"A model based on training data that can make predictions or decisions without being explicitly programmed to do so.","data":"A collection of discrete values that convey information.","cryptographic-asset":"A cryptographic asset including algorithms, protocols, certificates, keys, tokens, and secrets."},"title":"Component Type","description":"Specifies the type of component. For software components, classify as application if no more specific appropriate classification is available or cannot be determined for the component.","examples":["library"]},"mime-type":{"type":"string","title":"Mime-Type","description":"The optional mime-type of the component. When used on file components, the mime-type can provide additional context about the kind of file being represented, such as an image, font, or executable. Some library or framework components may also have an associated mime-type.","examples":["image/jpeg"],"pattern":"^[-+a-z0-9.]+/[-+a-z0-9.]+$"},"bom-ref":{"$ref":"#/definitions/refType","title":"BOM Reference","description":"An optional identifier which can be used to reference the component elsewhere in the BOM. Every bom-ref must be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links."},"supplier":{"title":"Component Supplier","description":" The organization that supplied the component. The supplier may often be the manufacturer, but may also be a distributor or repackager.","$ref":"#/definitions/organizationalEntity"},"manufacturer":{"title":"Component Manufacturer","description":"The organization that created the component.\nManufacturer is common in components created through automated processes. Components created through manual means may have `@.authors` instead.","$ref":"#/definitions/organizationalEntity"},"authors":{"type":"array","title":"Component Authors","description":"The person(s) who created the component.\nAuthors are common in components created through manual processes. Components created through automated means may have `@.manufacturer` instead.","items":{"$ref":"#/definitions/organizationalContact"}},"author":{"deprecated":true,"type":"string","title":"Component Author (legacy)","description":"[Deprecated] This will be removed in a future version. Use `@.authors` or `@.manufacturer` instead.\nThe person(s) or organization(s) that authored the component","examples":["Acme Inc"]},"publisher":{"type":"string","title":"Component Publisher","description":"The person(s) or organization(s) that published the component","examples":["Acme Inc"]},"group":{"type":"string","title":"Component Group","description":"The grouping name or identifier. This will often be a shortened, single name of the company or project that produced the component, or the source package or domain name. Whitespace and special characters should be avoided. Examples include: apache, org.apache.commons, and apache.org.","examples":["com.acme"]},"name":{"type":"string","title":"Component Name","description":"The name of the component. This will often be a shortened, single name of the component. Examples: commons-lang3 and jquery","examples":["tomcat-catalina"]},"version":{"$ref":"#/definitions/version","title":"Component Version","description":"The component version. The version should ideally comply with semantic versioning but is not enforced."},"description":{"type":"string","title":"Component Description","description":"Specifies a description for the component"},"scope":{"type":"string","enum":["required","optional","excluded"],"meta:enum":{"required":"The component is required for runtime","optional":"The component is optional at runtime. Optional components are components that are not capable of being called due to them not being installed or otherwise accessible by any means. Components that are installed but due to configuration or other restrictions are prohibited from being called must be scoped as 'required'.","excluded":"Components that are excluded provide the ability to document component usage for test and other non-runtime purposes. Excluded components are not reachable within a call graph at runtime."},"title":"Component Scope","description":"Specifies the scope of the component. If scope is not specified, 'required' scope SHOULD be assumed by the consumer of the BOM.","default":"required"},"hashes":{"type":"array","title":"Component Hashes","description":"The hashes of the component.","items":{"$ref":"#/definitions/hash"}},"licenses":{"$ref":"#/definitions/licenseChoice","title":"Component License(s)"},"copyright":{"type":"string","title":"Component Copyright","description":"A copyright notice informing users of the underlying claims to copyright ownership in a published work.","examples":["Acme Inc"]},"cpe":{"type":"string","title":"Common Platform Enumeration (CPE)","description":"Asserts the identity of the component using CPE. The CPE must conform to the CPE 2.2 or 2.3 specification. See [https://nvd.nist.gov/products/cpe](https://nvd.nist.gov/products/cpe). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","examples":["cpe:2.3:a:acme:component_framework:-:*:*:*:*:*:*:*"]},"purl":{"type":"string","title":"Package URL (purl)","description":"Asserts the identity of the component using package-url (purl). The purl, if specified, must be valid and conform to the specification defined at: [https://github.com/package-url/purl-spec](https://github.com/package-url/purl-spec). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","examples":["pkg:maven/com.acme/tomcat-catalina@9.0.14?packaging=jar"]},"omniborId":{"type":"array","title":"OmniBOR Artifact Identifier (gitoid)","description":"Asserts the identity of the component using the OmniBOR Artifact ID. The OmniBOR, if specified, must be valid and conform to the specification defined at: [https://www.iana.org/assignments/uri-schemes/prov/gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","items":{"type":"string"},"examples":["gitoid:blob:sha1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3","gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"]},"swhid":{"type":"array","title":"Software Heritage Identifier","description":"Asserts the identity of the component using the Software Heritage persistent identifier (SWHID). The SWHID, if specified, must be valid and conform to the specification defined at: [https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html](https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","items":{"type":"string"},"examples":["swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2"]},"swid":{"$ref":"#/definitions/swid","title":"SWID Tag","description":"Asserts the identity of the component using [ISO-IEC 19770-2 Software Identification (SWID) Tags](https://www.iso.org/standard/65666.html). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity."},"modified":{"type":"boolean","title":"Component Modified From Original","description":"[Deprecated] This will be removed in a future version. Use the pedigree element instead to supply information on exactly how the component was modified. A boolean value indicating if the component has been modified from the original. A value of true indicates the component is a derivative of the original. A value of false indicates the component has not been modified from the original."},"pedigree":{"type":"object","title":"Component Pedigree","description":"Component pedigree is a way to document complex supply chain scenarios where components are created, distributed, modified, redistributed, combined with other components, etc. Pedigree supports viewing this complex chain from the beginning, the end, or anywhere in the middle. It also provides a way to document variants where the exact relation may not be known.","additionalProperties":false,"properties":{"ancestors":{"type":"array","title":"Ancestors","description":"Describes zero or more components in which a component is derived from. This is commonly used to describe forks from existing projects where the forked version contains a ancestor node containing the original component it was forked from. For example, Component A is the original component. Component B is the component being used and documented in the BOM. However, Component B contains a pedigree node with a single ancestor documenting Component A - the original component from which Component B is derived from.","items":{"$ref":"#/definitions/component"}},"descendants":{"type":"array","title":"Descendants","description":"Descendants are the exact opposite of ancestors. This provides a way to document all forks (and their forks) of an original or root component.","items":{"$ref":"#/definitions/component"}},"variants":{"type":"array","title":"Variants","description":"Variants describe relations where the relationship between the components is not known. For example, if Component A contains nearly identical code to Component B. They are both related, but it is unclear if one is derived from the other, or if they share a common ancestor.","items":{"$ref":"#/definitions/component"}},"commits":{"type":"array","title":"Commits","description":"A list of zero or more commits which provide a trail describing how the component deviates from an ancestor, descendant, or variant.","items":{"$ref":"#/definitions/commit"}},"patches":{"type":"array","title":"Patches","description":">A list of zero or more patches describing how the component deviates from an ancestor, descendant, or variant. Patches may be complementary to commits or may be used in place of commits.","items":{"$ref":"#/definitions/patch"}},"notes":{"type":"string","title":"Notes","description":"Notes, observations, and other non-structured commentary describing the components pedigree."}}},"externalReferences":{"type":"array","items":{"$ref":"#/definitions/externalReference"},"title":"External References","description":"External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM."},"components":{"type":"array","items":{"$ref":"#/definitions/component"},"uniqueItems":true,"title":"Components","description":"A list of software and hardware components included in the parent component. This is not a dependency tree. It provides a way to specify a hierarchical representation of component assemblies, similar to system → subsystem → parts assembly in physical supply chains."},"evidence":{"$ref":"#/definitions/componentEvidence","title":"Evidence","description":"Provides the ability to document evidence collected through various forms of extraction or analysis."},"releaseNotes":{"$ref":"#/definitions/releaseNotes","title":"Release notes","description":"Specifies optional release notes."},"modelCard":{"$ref":"#/definitions/modelCard","title":"AI/ML Model Card"},"data":{"type":"array","items":{"$ref":"#/definitions/componentData"},"title":"Data","description":"This object SHOULD be specified for any component of type `data` and must not be specified for other component types."},"cryptoProperties":{"$ref":"#/definitions/cryptoProperties","title":"Cryptographic Properties"},"properties":{"type":"array","title":"Properties","description":"Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.","items":{"$ref":"#/definitions/property"}},"tags":{"$ref":"#/definitions/tags","title":"Tags"},"signature":{"$ref":"#/definitions/signature","title":"Signature","description":"Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html)."}}};
21
21
  const schema21 = {"description":"A single disjunctive version identifier, for a component or service.","type":"string","maxLength":1024,"examples":["9.0.14","v1.33.7","7.0.0-M1","2.0pre1","1.0.0-beta1","0.8.15"]};
22
22
  const schema55 = {"type":"array","items":{"type":"string"},"title":"Tags","description":"Textual strings that aid in discovery, search, and retrieval of the associated object. Tags often serve as a way to group or categorize similar or related objects by various attributes.","examples":["json-parser","object-persistence","text-to-image","translation","object-detection"]};
@@ -155,6 +155,7 @@ return errors === 0;
155
155
  }
156
156
 
157
157
  const schema19 = {"type":"object","title":"Organizational Contact","additionalProperties":false,"properties":{"bom-ref":{"$ref":"#/definitions/refType","title":"BOM Reference","description":"An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref must be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links."},"name":{"type":"string","title":"Name","description":"The name of a contact","examples":["Contact name"]},"email":{"type":"string","format":"idn-email","title":"Email Address","description":"The email address of the contact.","examples":["firstname.lastname@example.com"]},"phone":{"type":"string","title":"Phone","description":"The phone number of the contact.","examples":["800-555-1212"]}}};
158
+ const formats2 = cdxgenFormats["idn-email"];
158
159
 
159
160
  function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
160
161
  let vErrors = null;
@@ -210,7 +211,13 @@ let data2 = data.email;
210
211
  const _errs8 = errors;
211
212
  if(errors === _errs8){
212
213
  if(errors === _errs8){
213
- if(!(typeof data2 === "string")){
214
+ if(typeof data2 === "string"){
215
+ if(!(formats2(data2))){
216
+ validate16.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema19.properties.email,data:data2}];
217
+ return false;
218
+ }
219
+ }
220
+ else {
214
221
  validate16.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema19.properties.email.type,parentSchema:schema19.properties.email,data:data2}];
215
222
  return false;
216
223
  }
@@ -1959,7 +1966,13 @@ let data5 = data2.email;
1959
1966
  const _errs14 = errors;
1960
1967
  if(errors === _errs14){
1961
1968
  if(errors === _errs14){
1962
- if(!(typeof data5 === "string")){
1969
+ if(typeof data5 === "string"){
1970
+ if(!(formats2(data5))){
1971
+ validate35.errors = [{instancePath:instancePath+"/author/email",schemaPath:"#/definitions/identifiableAction/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema37.properties.email,data:data5}];
1972
+ return false;
1973
+ }
1974
+ }
1975
+ else {
1963
1976
  validate35.errors = [{instancePath:instancePath+"/author/email",schemaPath:"#/definitions/identifiableAction/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema37.properties.email.type,parentSchema:schema37.properties.email,data:data5}];
1964
1977
  return false;
1965
1978
  }
@@ -2041,7 +2054,13 @@ let data9 = data6.email;
2041
2054
  const _errs24 = errors;
2042
2055
  if(errors === _errs24){
2043
2056
  if(errors === _errs24){
2044
- if(!(typeof data9 === "string")){
2057
+ if(typeof data9 === "string"){
2058
+ if(!(formats2(data9))){
2059
+ validate35.errors = [{instancePath:instancePath+"/committer/email",schemaPath:"#/definitions/identifiableAction/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema37.properties.email,data:data9}];
2060
+ return false;
2061
+ }
2062
+ }
2063
+ else {
2045
2064
  validate35.errors = [{instancePath:instancePath+"/committer/email",schemaPath:"#/definitions/identifiableAction/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema37.properties.email.type,parentSchema:schema37.properties.email,data:data9}];
2046
2065
  return false;
2047
2066
  }
@@ -8015,7 +8034,7 @@ return errors === 0;
8015
8034
 
8016
8035
  const schema104 = {"type":"object","title":"Signature","oneOf":[{"additionalProperties":false,"properties":{"signers":{"type":"array","title":"Signature","description":"Unique top level property for Multiple Signatures. (multisignature)","items":{"$ref":"#/definitions/signer"}}}},{"additionalProperties":false,"properties":{"chain":{"type":"array","title":"Signature","description":"Unique top level property for Signature Chains. (signaturechain)","items":{"$ref":"#/definitions/signer"}}}},{"title":"Signature","description":"Unique top level property for simple signatures. (signaturecore)","$ref":"#/definitions/signer"}]};
8017
8036
  const schema105 = {"type":"object","title":"Signature","required":["algorithm","value"],"additionalProperties":false,"properties":{"algorithm":{"oneOf":[{"type":"string","title":"Algorithm","description":"Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of \"EdDSA\".","enum":["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","Ed25519","Ed448","HS256","HS384","HS512"]},{"type":"string","title":"Algorithm","description":"Signature algorithm. Note: If proprietary signature algorithms are added, they must be expressed as URIs.","format":"uri"}]},"keyId":{"type":"string","title":"Key ID","description":"Optional. Application specific string identifying the signature key."},"publicKey":{"title":"Public key","description":"Optional. Public key object.","$ref":"#/definitions/publicKey"},"certificatePath":{"type":"array","title":"Certificate path","description":"Optional. Sorted array of X.509 [RFC5280] certificates, where the first element must contain the signature certificate. The certificate path must be contiguous but is not required to be complete.","items":{"type":"string"}},"excludes":{"type":"array","title":"Excludes","description":"Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the \"excludes\" property itself, must also be excluded from the signature process. Since both the \"excludes\" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.","items":{"type":"string"}},"value":{"type":"string","title":"Signature","description":"The signature data. Note that the binary representation must follow the JWA [RFC7518] specifications."}}};
8018
- const formats24 = require("ajv-formats/dist/formats").fullFormats.uri;
8037
+ const formats30 = cdxgenFormats.uri;
8019
8038
  const schema106 = {"title":"Public key","description":"Optional. Public key object.","type":"object","required":["kty"],"additionalProperties":true,"properties":{"kty":{"$ref":"#/definitions/keyType"}},"allOf":[{"if":{"properties":{"kty":{"const":"EC"}}},"then":{"required":["kty","crv","x","y"],"additionalProperties":false,"properties":{"kty":{"$ref":"#/definitions/keyType"},"crv":{"type":"string","title":"Curve name","description":"EC curve name.","enum":["P-256","P-384","P-521"]},"x":{"type":"string","title":"Coordinate","description":"EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-521\", the decoded argument must be 66 bytes."},"y":{"type":"string","title":"Coordinate","description":"EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-256\", the decoded argument must be 32 bytes."}}}},{"if":{"properties":{"kty":{"const":"OKP"}}},"then":{"required":["kty","crv","x"],"additionalProperties":false,"properties":{"kty":{"$ref":"#/definitions/keyType"},"crv":{"type":"string","title":"Curve name","description":"EdDSA curve name.","enum":["Ed25519","Ed448"]},"x":{"type":"string","title":"Coordinate","description":"EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"Ed25519\", the decoded argument must be 32 bytes."}}}},{"if":{"properties":{"kty":{"const":"RSA"}}},"then":{"required":["kty","n","e"],"additionalProperties":false,"properties":{"kty":{"$ref":"#/definitions/keyType"},"n":{"type":"string","title":"Modulus","description":"RSA modulus."},"e":{"type":"string","title":"Exponent","description":"RSA exponent."}}}}]};
8020
8039
  const schema107 = {"type":"string","title":"Key type","description":"Key type indicator.","enum":["EC","OKP","RSA"]};
8021
8040
 
@@ -8462,7 +8481,7 @@ const _errs6 = errors;
8462
8481
  if(errors === _errs6){
8463
8482
  if(errors === _errs6){
8464
8483
  if(typeof data0 === "string"){
8465
- if(!(formats24(data0))){
8484
+ if(!(formats30(data0))){
8466
8485
  const err2 = {instancePath:instancePath+"/algorithm",schemaPath:"#/properties/algorithm/oneOf/1/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema105.properties.algorithm.oneOf[1],data:data0};
8467
8486
  if(vErrors === null){
8468
8487
  vErrors = [err2];
@@ -2,7 +2,7 @@
2
2
  // CycloneDX 1.7 schema validator (pre-compiled with ajv/standalone).
3
3
  import { createRequire } from "node:module";
4
4
  const require = createRequire(import.meta.url);
5
- import { canonicalize } from "./runtime.mjs";
5
+ import { canonicalize, cdxgenFormats } from "./runtime.mjs";
6
6
  "use strict";
7
7
  export const validate = validate10;
8
8
  export default validate10;
@@ -17,7 +17,7 @@ const func5 = require("ajv/dist/runtime/ucs2length").default;
17
17
  const pattern0 = new RegExp("^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "u");
18
18
  const schema12 = {"type":"object","title":"BOM Metadata","additionalProperties":false,"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"The date and time (timestamp) when the BOM was created."},"lifecycles":{"type":"array","title":"Lifecycles","description":"Lifecycles communicate the stage(s) in which data in the BOM was captured. Different types of data may be available at various phases of a lifecycle, such as the Software Development Lifecycle (SDLC), IT Asset Management (ITAM), and Software Asset Management (SAM). Thus, a BOM may include data specific to or only obtainable in a given lifecycle.","items":{"type":"object","title":"Lifecycle","description":"The product lifecycle(s) that this BOM represents.","oneOf":[{"title":"Pre-Defined Phase","required":["phase"],"additionalProperties":false,"properties":{"phase":{"type":"string","title":"Phase","description":"A pre-defined phase in the product lifecycle.","enum":["design","pre-build","build","post-build","operations","discovery","decommission"],"meta:enum":{"design":"BOM produced early in the development lifecycle containing an inventory of components and services that are proposed or planned to be used. The inventory may need to be procured, retrieved, or resourced prior to use.","pre-build":"BOM consisting of information obtained prior to a build process and may contain source files and development artifacts and manifests. The inventory may need to be resolved and retrieved prior to use.","build":"BOM consisting of information obtained during a build process where component inventory is available for use. The precise versions of resolved components are usually available at this time as well as the provenance of where the components were retrieved from.","post-build":"BOM consisting of information obtained after a build process has completed and the resulting components(s) are available for further analysis. Built components may exist as the result of a CI/CD process, may have been installed or deployed to a system or device, and may need to be retrieved or extracted from the system or device.","operations":"BOM produced that represents inventory that is running and operational. This may include staging or production environments and will generally encompass multiple SBOMs describing the applications and operating system, along with HBOMs describing the hardware that makes up the system. Operations Bill of Materials (OBOM) can provide full-stack inventory of runtime environments, configurations, and additional dependencies.","discovery":"BOM consisting of information observed through network discovery providing point-in-time enumeration of embedded, on-premise, and cloud-native services such as server applications, connected devices, microservices, and serverless functions.","decommission":"BOM containing inventory that will be, or has been retired from operations."}}}},{"title":"Custom Phase","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","title":"Name","description":"The name of the lifecycle phase"},"description":{"type":"string","title":"Description","description":"The description of the lifecycle phase"}}}]}},"tools":{"title":"Tools","description":"The tool(s) used in the creation, enrichment, and validation of the BOM.","oneOf":[{"type":"object","title":"Tools","description":"The tool(s) used in the creation, enrichment, and validation of the BOM.","additionalProperties":false,"properties":{"components":{"type":"array","items":{"$ref":"#/definitions/component"},"uniqueItems":true,"title":"Components","description":"A list of software and hardware components used as tools."},"services":{"type":"array","items":{"$ref":"#/definitions/service"},"uniqueItems":true,"title":"Services","description":"A list of services used as tools. This may include microservices, function-as-a-service, and other types of network or intra-process services."}}},{"type":"array","title":"Tools (legacy)","description":"[Deprecated]\nThe tool(s) used in the creation, enrichment, and validation of the BOM.","deprecated":true,"items":{"$ref":"#/definitions/tool"}}]},"manufacturer":{"title":"BOM Manufacturer","description":"The organization that created the BOM.\nManufacturer is common in BOMs created through automated processes. BOMs created through manual means may have `@.authors` instead.","$ref":"#/definitions/organizationalEntity"},"authors":{"type":"array","title":"BOM Authors","description":"The person(s) who created the BOM.\nAuthors are common in BOMs created through manual processes. BOMs created through automated means may have `@.manufacturer` instead.","items":{"$ref":"#/definitions/organizationalContact"}},"component":{"title":"Component","description":"The component that the BOM describes.","$ref":"#/definitions/component"},"manufacture":{"deprecated":true,"title":"Component Manufacture (legacy)","description":"[Deprecated] This will be removed in a future version. Use the `@.component.manufacturer` instead.\nThe organization that manufactured the component that the BOM describes.","$ref":"#/definitions/organizationalEntity"},"supplier":{"title":"Supplier","description":" The organization that supplied the component that the BOM describes. The supplier may often be the manufacturer, but may also be a distributor or repackager.","$ref":"#/definitions/organizationalEntity"},"licenses":{"title":"BOM License(s)","description":"The license information for the BOM document.\nThis may be different from the license(s) of the component(s) that the BOM describes.","$ref":"#/definitions/licenseChoice"},"properties":{"type":"array","title":"Properties","description":"Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.","items":{"$ref":"#/definitions/property"}},"distributionConstraints":{"title":"Distribution Constraints","description":"Conditions and constraints governing the sharing and distribution of the data or components described by this BOM.","type":"object","properties":{"tlp":{"$ref":"#/definitions/tlpClassification","description":"The Traffic Light Protocol (TLP) classification that controls the sharing and distribution of the data that the BOM describes."}},"additionalProperties":false}}};
19
19
  const schema150 = {"title":"Traffic Light Protocol (TLP) Classification","description":"Traffic Light Protocol (TLP) is a classification system for identifying the potential risk associated with artefact, including whether it is subject to certain types of legal, financial, or technical threats. Refer to [https://www.first.org/tlp/](https://www.first.org/tlp/) for further information.\nThe default classification is \"CLEAR\"","type":"string","default":"CLEAR","enum":["CLEAR","GREEN","AMBER","AMBER_AND_STRICT","RED"],"meta:enum":{"CLEAR":"The information is not subject to any restrictions as regards the sharing.","GREEN":"The information is subject to limited disclosure, and recipients can share it within their community but not via publicly accessible channels.","AMBER":"The information is subject to limited disclosure, and recipients can only share it on a need-to-know basis within their organization and with clients.","AMBER_AND_STRICT":"The information is subject to limited disclosure, and recipients can only share it on a need-to-know basis within their organization.","RED":"The information is subject to restricted distribution to individual recipients only and must not be shared."}};
20
- const formats0 = require("ajv-formats/dist/formats").fullFormats["date-time"];
20
+ const formats0 = cdxgenFormats["date-time"];
21
21
  const schema13 = {"type":"object","title":"Component","required":["type","name"],"additionalProperties":false,"properties":{"type":{"type":"string","enum":["application","framework","library","container","platform","operating-system","device","device-driver","firmware","file","machine-learning-model","data","cryptographic-asset"],"meta:enum":{"application":"A software application. Refer to [https://en.wikipedia.org/wiki/Application_software](https://en.wikipedia.org/wiki/Application_software) for information about applications.","framework":"A software framework. Refer to [https://en.wikipedia.org/wiki/Software_framework](https://en.wikipedia.org/wiki/Software_framework) for information on how frameworks vary slightly from libraries.","library":"A software library. Refer to [https://en.wikipedia.org/wiki/Library_(computing)](https://en.wikipedia.org/wiki/Library_(computing)) for information about libraries. All third-party and open source reusable components will likely be a library. If the library also has key features of a framework, then it should be classified as a framework. If not, or is unknown, then specifying library is recommended.","container":"A packaging and/or runtime format, not specific to any particular technology, which isolates software inside the container from software outside of a container through virtualization technology. Refer to [https://en.wikipedia.org/wiki/OS-level_virtualization](https://en.wikipedia.org/wiki/OS-level_virtualization).","platform":"A runtime environment that interprets or executes software. This may include runtimes such as those that execute bytecode, just-in-time compilers, interpreters, or low-code/no-code application platforms.","operating-system":"A software operating system without regard to deployment model (i.e. installed on physical hardware, virtual machine, image, etc) Refer to [https://en.wikipedia.org/wiki/Operating_system](https://en.wikipedia.org/wiki/Operating_system).","device":"A hardware device such as a processor or chip-set. A hardware device containing firmware SHOULD include a component for the physical hardware itself and another component of type 'firmware' or 'operating-system' (whichever is relevant), describing information about the software running on the device. See also the list of [known device properties](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/device.md).","device-driver":"A special type of software that operates or controls a particular type of device. Refer to [https://en.wikipedia.org/wiki/Device_driver](https://en.wikipedia.org/wiki/Device_driver).","firmware":"A special type of software that provides low-level control over a device's hardware. Refer to [https://en.wikipedia.org/wiki/Firmware](https://en.wikipedia.org/wiki/Firmware).","file":"A computer file. Refer to [https://en.wikipedia.org/wiki/Computer_file](https://en.wikipedia.org/wiki/Computer_file) for information about files.","machine-learning-model":"A model based on training data that can make predictions or decisions without being explicitly programmed to do so.","data":"A collection of discrete values that convey information.","cryptographic-asset":"A cryptographic asset including algorithms, protocols, certificates, keys, tokens, and secrets."},"title":"Component Type","description":"Specifies the type of component. For software components, classify as application if no more specific appropriate classification is available or cannot be determined for the component.","examples":["library"]},"mime-type":{"type":"string","title":"Mime-Type","description":"The mime-type of the component. When used on file components, the mime-type can provide additional context about the kind of file being represented, such as an image, font, or executable. Some library or framework components may also have an associated mime-type.","examples":["image/jpeg"],"pattern":"^[-+a-z0-9.]+/[-+a-z0-9.]+$"},"bom-ref":{"$ref":"#/definitions/refType","title":"BOM Reference","description":"An identifier which can be used to reference the component elsewhere in the BOM. Every `bom-ref` must be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links."},"supplier":{"title":"Component Supplier","description":" The organization that supplied the component. The supplier may often be the manufacturer, but may also be a distributor or repackager.","$ref":"#/definitions/organizationalEntity"},"manufacturer":{"title":"Component Manufacturer","description":"The organization that created the component.\nManufacturer is common in components created through automated processes. Components created through manual means may have `@.authors` instead.","$ref":"#/definitions/organizationalEntity"},"authors":{"type":"array","title":"Component Authors","description":"The person(s) who created the component.\nAuthors are common in components created through manual processes. Components created through automated means may have `@.manufacturer` instead.","items":{"$ref":"#/definitions/organizationalContact"}},"author":{"deprecated":true,"type":"string","title":"Component Author (legacy)","description":"[Deprecated] This will be removed in a future version. Use `@.authors` or `@.manufacturer` instead.\nThe person(s) or organization(s) that authored the component","examples":["Acme Inc"]},"publisher":{"type":"string","title":"Component Publisher","description":"The person(s) or organization(s) that published the component","examples":["Acme Inc"]},"group":{"type":"string","title":"Component Group","description":"The grouping name or identifier. This will often be a shortened, single name of the company or project that produced the component, or the source package or domain name. Whitespace and special characters should be avoided. Examples include: apache, org.apache.commons, and apache.org.","examples":["com.acme"]},"name":{"type":"string","title":"Component Name","description":"The name of the component. This will often be a shortened, single name of the component. Examples: commons-lang3 and jquery","examples":["tomcat-catalina"]},"version":{"$ref":"#/definitions/version","title":"Component Version","description":"The component version. The version should ideally comply with semantic versioning but is not enforced.\nMust be used exclusively, either 'version' or 'versionRange', but not both."},"versionRange":{"$ref":"#/definitions/versionRange","title":"Component Version Range","description":"For an external component, this specifies the accepted version range.\nThe value must adhere to the Package URL Version Range syntax (vers), as defined at <https://github.com/package-url/vers-spec\nMay only be used if `.isExternal` is set to `true`.\nMust be used exclusively, either 'version' or 'versionRange', but not both."},"isExternal":{"type":"boolean","title":"Component Is External","description":"Determine whether this component is external.\nAn external component is one that is not part of an assembly, but is expected to be provided by the environment, regardless of the component's `.scope`. This setting can be useful for distinguishing which components are bundled with the product and which can be relied upon to be present in the deployment environment.\nThis may be set to `true` for runtime components only. For `$.metadata.component`, it must be set to `false`.","default":false},"description":{"type":"string","title":"Component Description","description":"Specifies a description for the component"},"scope":{"type":"string","enum":["required","optional","excluded"],"meta:enum":{"required":"The component is required for runtime","optional":"The component is optional at runtime. Optional components are components that are not capable of being called due to them not being installed or otherwise accessible by any means. Components that are installed but due to configuration or other restrictions are prohibited from being called must be scoped as 'required'.","excluded":"Components that are excluded provide the ability to document component usage for test and other non-runtime purposes. Excluded components are not reachable within a call graph at runtime."},"title":"Component Scope","description":"Specifies the scope of the component. If scope is not specified, 'required' scope SHOULD be assumed by the consumer of the BOM.","default":"required"},"hashes":{"type":"array","title":"Component Hashes","description":"The hashes of the component.","items":{"$ref":"#/definitions/hash"}},"licenses":{"$ref":"#/definitions/licenseChoice","title":"Component License(s)"},"copyright":{"type":"string","title":"Component Copyright","description":"A copyright notice informing users of the underlying claims to copyright ownership in a published work.","examples":["Acme Inc"]},"patentAssertions":{"$ref":"#/definitions/patentAssertions","title":"Component Patent(s)"},"cpe":{"type":"string","title":"Common Platform Enumeration (CPE)","description":"Asserts the identity of the component using CPE. The CPE must conform to the CPE 2.2 or 2.3 specification. See [https://nvd.nist.gov/products/cpe](https://nvd.nist.gov/products/cpe). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","examples":["cpe:2.3:a:acme:component_framework:-:*:*:*:*:*:*:*"]},"purl":{"type":"string","title":"Package URL (purl)","description":"Asserts the identity of the component using package-url (purl). The purl, if specified, must be valid and conform to the specification defined at: [https://github.com/package-url/purl-spec](https://github.com/package-url/purl-spec). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","examples":["pkg:maven/com.acme/tomcat-catalina@9.0.14?packaging=jar"]},"omniborId":{"type":"array","title":"OmniBOR Artifact Identifier (gitoid)","description":"Asserts the identity of the component using the OmniBOR Artifact ID. The OmniBOR, if specified, must be valid and conform to the specification defined at: [https://www.iana.org/assignments/uri-schemes/prov/gitoid](https://www.iana.org/assignments/uri-schemes/prov/gitoid). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","items":{"type":"string"},"examples":["gitoid:blob:sha1:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3","gitoid:blob:sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"]},"swhid":{"type":"array","title":"Software Heritage Identifier","description":"Asserts the identity of the component using the Software Heritage persistent identifier (SWHID). The SWHID, if specified, must be valid and conform to the specification defined at: [https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html](https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity.","items":{"type":"string"},"examples":["swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2"]},"swid":{"$ref":"#/definitions/swid","title":"SWID Tag","description":"Asserts the identity of the component using [ISO-IEC 19770-2 Software Identification (SWID) Tags](https://www.iso.org/standard/65666.html). Refer to `@.evidence.identity` to optionally provide evidence that substantiates the assertion of the component's identity."},"modified":{"type":"boolean","title":"Component Modified From Original","description":"[Deprecated] This will be removed in a future version. Use the pedigree element instead to supply information on exactly how the component was modified.\nA boolean value indicating if the component has been modified from the original. A value of true indicates the component is a derivative of the original. A value of false indicates the component has not been modified from the original.","deprecated":true},"pedigree":{"type":"object","title":"Component Pedigree","description":"Component pedigree is a way to document complex supply chain scenarios where components are created, distributed, modified, redistributed, combined with other components, etc. Pedigree supports viewing this complex chain from the beginning, the end, or anywhere in the middle. It also provides a way to document variants where the exact relation may not be known.","additionalProperties":false,"properties":{"ancestors":{"type":"array","title":"Ancestors","description":"Describes zero or more components in which a component is derived from. This is commonly used to describe forks from existing projects where the forked version contains a ancestor node containing the original component it was forked from. For example, Component A is the original component. Component B is the component being used and documented in the BOM. However, Component B contains a pedigree node with a single ancestor documenting Component A - the original component from which Component B is derived from.","items":{"$ref":"#/definitions/component"}},"descendants":{"type":"array","title":"Descendants","description":"Descendants are the exact opposite of ancestors. This provides a way to document all forks (and their forks) of an original or root component.","items":{"$ref":"#/definitions/component"}},"variants":{"type":"array","title":"Variants","description":"Variants describe relations where the relationship between the components is not known. For example, if Component A contains nearly identical code to Component B. They are both related, but it is unclear if one is derived from the other, or if they share a common ancestor.","items":{"$ref":"#/definitions/component"}},"commits":{"type":"array","title":"Commits","description":"A list of zero or more commits which provide a trail describing how the component deviates from an ancestor, descendant, or variant.","items":{"$ref":"#/definitions/commit"}},"patches":{"type":"array","title":"Patches","description":">A list of zero or more patches describing how the component deviates from an ancestor, descendant, or variant. Patches may be complementary to commits or may be used in place of commits.","items":{"$ref":"#/definitions/patch"}},"notes":{"type":"string","title":"Notes","description":"Notes, observations, and other non-structured commentary describing the components pedigree."}}},"externalReferences":{"type":"array","items":{"$ref":"#/definitions/externalReference"},"title":"External References","description":"External references provide a way to document systems, sites, and information that may be relevant but are not included with the BOM. They may also establish specific relationships within or external to the BOM."},"components":{"type":"array","items":{"$ref":"#/definitions/component"},"uniqueItems":true,"title":"Components","description":"A list of software and hardware components included in the parent component. This is not a dependency tree. It provides a way to specify a hierarchical representation of component assemblies, similar to system &#8594; subsystem &#8594; parts assembly in physical supply chains."},"evidence":{"$ref":"#/definitions/componentEvidence","title":"Evidence","description":"Provides the ability to document evidence collected through various forms of extraction or analysis."},"releaseNotes":{"$ref":"#/definitions/releaseNotes","title":"Release notes","description":"Specifies release notes."},"modelCard":{"$ref":"#/definitions/modelCard","title":"AI/ML Model Card"},"data":{"type":"array","items":{"$ref":"#/definitions/componentData"},"title":"Data","description":"This object SHOULD be specified for any component of type `data` and must not be specified for other component types."},"cryptoProperties":{"$ref":"#/definitions/cryptoProperties","title":"Cryptographic Properties"},"properties":{"type":"array","title":"Properties","description":"Provides the ability to document properties in a name-value store. This provides flexibility to include data not officially supported in the standard without having to use additional namespaces or create extensions. Unlike key-value stores, properties support duplicate names, each potentially having different values. Property names of interest to the general public are encouraged to be registered in the [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy). Formal registration is optional.","items":{"$ref":"#/definitions/property"}},"tags":{"$ref":"#/definitions/tags","title":"Tags"},"signature":{"$ref":"#/definitions/signature","title":"Signature","description":"Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html)."}},"allOf":[{"description":"Requirement: ensure that `version` and `versionRange` are not present simultaneously.","not":{"required":["version","versionRange"]}},{"description":"Requirement: 'versionRange' must not be present when 'isExternal' is `false`.","if":{"properties":{"isExternal":{"const":false}}},"then":{"not":{"required":["versionRange"]}},"else":true}]};
22
22
  const schema21 = {"description":"A single disjunctive version identifier, for a component or service.","type":"string","maxLength":1024,"examples":["9.0.14","v1.33.7","7.0.0-M1","2.0pre1","1.0.0-beta1","0.8.15"]};
23
23
  const schema22 = {"description":"A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec","type":"string","minLength":1,"maxLength":4096,"examples":["vers:cargo/9.0.14","vers:npm/1.2.3|>=2.0.0|<5.0.0","vers:pypi/0.0.0|0.0.1|0.0.2|0.0.3|1.0|2.0pre1","vers:tomee/>=1.0.0-beta1|<=1.7.5|>=7.0.0-M1|<=7.0.7|>=7.1.0|<=7.1.2|>=8.0.0-M1|<=8.0.1","vers:gem/>=2.2.0|!= 2.2.1|<2.3.0"]};
@@ -157,6 +157,7 @@ return errors === 0;
157
157
  }
158
158
 
159
159
  const schema19 = {"type":"object","additionalProperties":false,"title":"Organizational Person","properties":{"bom-ref":{"$ref":"#/definitions/refType","title":"BOM Reference","description":"An identifier which can be used to reference the object elsewhere in the BOM. Every `bom-ref` must be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links."},"name":{"type":"string","title":"Name","description":"The name of a contact","examples":["Contact name"]},"email":{"type":"string","format":"idn-email","title":"Email Address","description":"The email address of the contact.","examples":["firstname.lastname@example.com"]},"phone":{"type":"string","title":"Phone","description":"The phone number of the contact.","examples":["800-555-1212"]}}};
160
+ const formats2 = cdxgenFormats["idn-email"];
160
161
 
161
162
  function validate16(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
162
163
  let vErrors = null;
@@ -212,7 +213,13 @@ let data2 = data.email;
212
213
  const _errs8 = errors;
213
214
  if(errors === _errs8){
214
215
  if(errors === _errs8){
215
- if(!(typeof data2 === "string")){
216
+ if(typeof data2 === "string"){
217
+ if(!(formats2(data2))){
218
+ validate16.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema19.properties.email,data:data2}];
219
+ return false;
220
+ }
221
+ }
222
+ else {
216
223
  validate16.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema19.properties.email.type,parentSchema:schema19.properties.email,data:data2}];
217
224
  return false;
218
225
  }
@@ -2557,7 +2564,13 @@ let data5 = data2.email;
2557
2564
  const _errs14 = errors;
2558
2565
  if(errors === _errs14){
2559
2566
  if(errors === _errs14){
2560
- if(!(typeof data5 === "string")){
2567
+ if(typeof data5 === "string"){
2568
+ if(!(formats2(data5))){
2569
+ validate42.errors = [{instancePath:instancePath+"/author/email",schemaPath:"#/definitions/identifiableAction/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema46.properties.email,data:data5}];
2570
+ return false;
2571
+ }
2572
+ }
2573
+ else {
2561
2574
  validate42.errors = [{instancePath:instancePath+"/author/email",schemaPath:"#/definitions/identifiableAction/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema46.properties.email.type,parentSchema:schema46.properties.email,data:data5}];
2562
2575
  return false;
2563
2576
  }
@@ -2639,7 +2652,13 @@ let data9 = data6.email;
2639
2652
  const _errs24 = errors;
2640
2653
  if(errors === _errs24){
2641
2654
  if(errors === _errs24){
2642
- if(!(typeof data9 === "string")){
2655
+ if(typeof data9 === "string"){
2656
+ if(!(formats2(data9))){
2657
+ validate42.errors = [{instancePath:instancePath+"/committer/email",schemaPath:"#/definitions/identifiableAction/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema46.properties.email,data:data9}];
2658
+ return false;
2659
+ }
2660
+ }
2661
+ else {
2643
2662
  validate42.errors = [{instancePath:instancePath+"/committer/email",schemaPath:"#/definitions/identifiableAction/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema46.properties.email.type,parentSchema:schema46.properties.email,data:data9}];
2644
2663
  return false;
2645
2664
  }
@@ -10215,7 +10234,7 @@ return errors === 0;
10215
10234
 
10216
10235
  const schema130 = {"type":"object","title":"Signature","oneOf":[{"additionalProperties":false,"properties":{"signers":{"type":"array","title":"Signature","description":"Unique top level property for Multiple Signatures. (multisignature)","items":{"$ref":"#/definitions/signer"}}}},{"additionalProperties":false,"properties":{"chain":{"type":"array","title":"Signature","description":"Unique top level property for Signature Chains. (signaturechain)","items":{"$ref":"#/definitions/signer"}}}},{"title":"Signature","description":"Unique top level property for simple signatures. (signaturecore)","$ref":"#/definitions/signer"}]};
10217
10236
  const schema131 = {"type":"object","title":"Signature","required":["algorithm","value"],"additionalProperties":false,"properties":{"algorithm":{"oneOf":[{"type":"string","title":"Algorithm","description":"Signature algorithm. The currently recognized JWA [RFC7518] and RFC8037 [RFC8037] asymmetric key algorithms. Note: Unlike RFC8037 [RFC8037] JSF requires explicit Ed* algorithm names instead of \"EdDSA\".","enum":["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","Ed25519","Ed448","HS256","HS384","HS512"]},{"type":"string","title":"Algorithm","description":"Signature algorithm. Note: If proprietary signature algorithms are added, they must be expressed as URIs.","format":"uri"}]},"keyId":{"type":"string","title":"Key ID","description":"Optional. Application specific string identifying the signature key."},"publicKey":{"title":"Public key","description":"Optional. Public key object.","$ref":"#/definitions/publicKey"},"certificatePath":{"type":"array","title":"Certificate path","description":"Optional. Sorted array of X.509 [RFC5280] certificates, where the first element must contain the signature certificate. The certificate path must be contiguous but is not required to be complete.","items":{"type":"string"}},"excludes":{"type":"array","title":"Excludes","description":"Optional. Array holding the names of one or more application level properties that must be excluded from the signature process. Note that the \"excludes\" property itself, must also be excluded from the signature process. Since both the \"excludes\" property and the associated data it points to are unsigned, a conforming JSF implementation must provide options for specifying which properties to accept.","items":{"type":"string"}},"value":{"type":"string","title":"Signature","description":"The signature data. Note that the binary representation must follow the JWA [RFC7518] specifications."}}};
10218
- const formats36 = require("ajv-formats/dist/formats").fullFormats.uri;
10237
+ const formats42 = cdxgenFormats.uri;
10219
10238
  const schema132 = {"title":"Public key","description":"Optional. Public key object.","type":"object","required":["kty"],"additionalProperties":true,"properties":{"kty":{"$ref":"#/definitions/keyType"}},"allOf":[{"if":{"properties":{"kty":{"const":"EC"}}},"then":{"required":["kty","crv","x","y"],"additionalProperties":false,"properties":{"kty":{"$ref":"#/definitions/keyType"},"crv":{"type":"string","title":"Curve name","description":"EC curve name.","enum":["P-256","P-384","P-521"]},"x":{"type":"string","title":"Coordinate","description":"EC curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-521\", the decoded argument must be 66 bytes."},"y":{"type":"string","title":"Coordinate","description":"EC curve point Y. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"P-256\", the decoded argument must be 32 bytes."}}}},{"if":{"properties":{"kty":{"const":"OKP"}}},"then":{"required":["kty","crv","x"],"additionalProperties":false,"properties":{"kty":{"$ref":"#/definitions/keyType"},"crv":{"type":"string","title":"Curve name","description":"EdDSA curve name.","enum":["Ed25519","Ed448"]},"x":{"type":"string","title":"Coordinate","description":"EdDSA curve point X. The length of this field must be the full size of a coordinate for the curve specified in the \"crv\" parameter. For example, if the value of \"crv\" is \"Ed25519\", the decoded argument must be 32 bytes."}}}},{"if":{"properties":{"kty":{"const":"RSA"}}},"then":{"required":["kty","n","e"],"additionalProperties":false,"properties":{"kty":{"$ref":"#/definitions/keyType"},"n":{"type":"string","title":"Modulus","description":"RSA modulus."},"e":{"type":"string","title":"Exponent","description":"RSA exponent."}}}}]};
10220
10239
  const schema133 = {"type":"string","title":"Key type","description":"Key type indicator.","enum":["EC","OKP","RSA"]};
10221
10240
 
@@ -10662,7 +10681,7 @@ const _errs6 = errors;
10662
10681
  if(errors === _errs6){
10663
10682
  if(errors === _errs6){
10664
10683
  if(typeof data0 === "string"){
10665
- if(!(formats36(data0))){
10684
+ if(!(formats42(data0))){
10666
10685
  const err2 = {instancePath:instancePath+"/algorithm",schemaPath:"#/properties/algorithm/oneOf/1/format",keyword:"format",params:{format: "uri"},message:"must match format \""+"uri"+"\"",schema:"uri",parentSchema:schema131.properties.algorithm.oneOf[1],data:data0};
10667
10686
  if(vErrors === null){
10668
10687
  vErrors = [err2];
@@ -21434,7 +21453,7 @@ const pattern15 = new RegExp("^[A-Za-z0-9][A-Za-z0-9\\-/.()\\s]{0,28}[A-Za-z0-9]
21434
21453
  const pattern17 = new RegExp("^[A-Z]{2}$", "u");
21435
21454
  const schema248 = {"type":"object","title":"Priority Application","description":"The priorityApplication contains the essential data necessary to identify and reference an earlier patent filing for priority rights. In line with WIPO ST.96 guidelines, it includes the jurisdiction (office code), application number, and filing date-the three key elements that uniquely specify the priority application in a global patent context.","required":["applicationNumber","jurisdiction","filingDate"],"additionalProperties":false,"properties":{"applicationNumber":{"$ref":"#/definitions/patentApplicationNumber"},"jurisdiction":{"$ref":"#/definitions/patentJurisdiction"},"filingDate":{"$ref":"#/definitions/patentFilingDate"}}};
21436
21455
  const schema251 = {"type":"string","format":"date","title":"Filing Date","description":"The date the priority application was filed, aligned with `FilingDate` in ST.96. Refer to [FilingDate in ST.96](https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/FilingDate.xsd)."};
21437
- const formats68 = require("ajv-formats/dist/formats").fullFormats.date;
21456
+ const formats74 = cdxgenFormats.date;
21438
21457
 
21439
21458
  function validate249(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
21440
21459
  let vErrors = null;
@@ -21507,7 +21526,7 @@ const _errs9 = errors;
21507
21526
  if(errors === _errs9){
21508
21527
  if(errors === _errs9){
21509
21528
  if(typeof data2 === "string"){
21510
- if(!(formats68.validate(data2))){
21529
+ if(!(formats74.validate(data2))){
21511
21530
  validate249.errors = [{instancePath:instancePath+"/filingDate",schemaPath:"#/definitions/patentFilingDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema251,data:data2}];
21512
21531
  return false;
21513
21532
  }
@@ -21710,7 +21729,7 @@ const _errs21 = errors;
21710
21729
  if(errors === _errs21){
21711
21730
  if(errors === _errs21){
21712
21731
  if(typeof data8 === "string"){
21713
- if(!(formats68.validate(data8))){
21732
+ if(!(formats74.validate(data8))){
21714
21733
  validate248.errors = [{instancePath:instancePath+"/filingDate",schemaPath:"#/properties/filingDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema244.properties.filingDate,data:data8}];
21715
21734
  return false;
21716
21735
  }
@@ -21733,7 +21752,7 @@ const _errs23 = errors;
21733
21752
  if(errors === _errs23){
21734
21753
  if(errors === _errs23){
21735
21754
  if(typeof data9 === "string"){
21736
- if(!(formats68.validate(data9))){
21755
+ if(!(formats74.validate(data9))){
21737
21756
  validate248.errors = [{instancePath:instancePath+"/grantDate",schemaPath:"#/properties/grantDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema244.properties.grantDate,data:data9}];
21738
21757
  return false;
21739
21758
  }
@@ -21756,7 +21775,7 @@ const _errs25 = errors;
21756
21775
  if(errors === _errs25){
21757
21776
  if(errors === _errs25){
21758
21777
  if(typeof data10 === "string"){
21759
- if(!(formats68.validate(data10))){
21778
+ if(!(formats74.validate(data10))){
21760
21779
  validate248.errors = [{instancePath:instancePath+"/patentExpirationDate",schemaPath:"#/properties/patentExpirationDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema244.properties.patentExpirationDate,data:data10}];
21761
21780
  return false;
21762
21781
  }
@@ -2,7 +2,7 @@
2
2
  // CycloneDX 2.0 schema validator (pre-compiled with ajv/standalone).
3
3
  import { createRequire } from "node:module";
4
4
  const require = createRequire(import.meta.url);
5
- import { canonicalize } from "./runtime.mjs";
5
+ import { canonicalize, cdxgenFormats } from "./runtime.mjs";
6
6
  "use strict";
7
7
  export const validate = validate20;
8
8
  export default validate20;
@@ -10,10 +10,10 @@ const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id"
10
10
  const schema32 = {"type":"object","title":"Extensible Properties","patternProperties":{"^ext:[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}:.+$":{"description":"CycloneDX supports a structured and namespace-aware mechanism for extensibility through the use of extensible properties. This mechanism enables organizations, ecosystems, and tool vendors to safely introduce custom properties without conflicting with the core schema or other extensions.\n\nExtensible properties are defined as a JSON object whose keys must conform to a strict pattern that resembles a reverse domain name structure, prefixed with ext:. This pattern provides a namespacing convention that aligns with well-established practices in other structured formats (e.g., XML namespaces).","examples":["ext:<domain>:<name>","ext:example.org:myExtension"],"if":{"type":["object","array"]},"then":{"type":"object","required":["$schema"],"properties":{"$schema":{"type":"string","format":"uri"}}},"else":{"type":["string","number","boolean","null"]}}}};
11
11
  const pattern4 = new RegExp("^ext:[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}:.+$", "u");
12
12
  const pattern5 = new RegExp("^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "u");
13
- const formats0 = require("ajv-formats/dist/formats").fullFormats.uri;
13
+ const formats0 = cdxgenFormats.uri;
14
14
  const func4 = Object.prototype.hasOwnProperty;
15
15
  const schema33 = {"type":"object","title":"BOM Metadata","description":"Provides additional information about a BOM.","additionalProperties":false,"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp","description":"The date and time (timestamp) when the BOM was created."},"lifecycles":{"$ref":"#/$defs/cyclonedx-common-2.0/$defs/lifecycles"},"tools":{"type":"object","title":"Tools","description":"The tool(s) used in the creation, enrichment, and validation of the BOM.","additionalProperties":false,"properties":{"components":{"$ref":"#/$defs/cyclonedx-component-2.0/$defs/components","description":"A list of software and hardware components used as tools."},"services":{"$ref":"#/$defs/cyclonedx-service-2.0/$defs/services","description":"A list of services used as tools. This may include microservices, function-as-a-service, and other types of network or intra-process services."}}},"manufacturer":{"title":"BOM Manufacturer","description":"The organization that created the BOM.\nManufacturer is common in BOMs created through automated processes. BOMs created through manual means may have `@.authors` instead.","$ref":"#/$defs/cyclonedx-common-2.0/$defs/organizationalEntity"},"authors":{"type":"array","title":"BOM Authors","description":"The person(s) who created the BOM.\nAuthors are common in BOMs created through manual processes. BOMs created through automated means may have `@.manufacturer` instead.","items":{"$ref":"#/$defs/cyclonedx-common-2.0/$defs/organizationalContact"}},"component":{"description":"The component that the BOM describes.","$ref":"#/$defs/cyclonedx-component-2.0/$defs/component"},"supplier":{"title":"Supplier","description":" The organization that supplied the component that the BOM describes. The supplier may often be the manufacturer, but may also be a distributor or repackager.","$ref":"#/$defs/cyclonedx-common-2.0/$defs/organizationalEntity"},"licenses":{"title":"BOM License(s)","description":"The license information for the BOM document.\nThis may be different from the license(s) of the component(s) that the BOM describes.","$ref":"#/$defs/cyclonedx-license-2.0/$defs/licenseChoice"},"distributionConstraints":{"$ref":"#/$defs/cyclonedx-metadata-2.0/$defs/distributionConstraints"},"properties":{"$ref":"#/$defs/cyclonedx-common-2.0/$defs/properties"}}};
16
- const formats2 = require("ajv-formats/dist/formats").fullFormats["date-time"];
16
+ const formats2 = cdxgenFormats["date-time"];
17
17
  const schema34 = {"type":"array","title":"Lifecycles","description":"Lifecycles communicate the stage(s) in which data in the BOM was captured. Different types of data may be available at various phases of a lifecycle, such as the Software Development Lifecycle (SDLC), IT Asset Management (ITAM), and Software Asset Management (SAM). Thus, a BOM may include data specific to or only obtainable in a given lifecycle.","items":{"$ref":"#/$defs/cyclonedx-common-2.0/$defs/lifecycle"}};
18
18
  const schema35 = {"type":"object","title":"Lifecycle","description":"The product lifecycle(s) that this BOM represents.","oneOf":[{"$ref":"#/$defs/cyclonedx-common-2.0/$defs/preDefinedLifecyclePhase"},{"title":"Custom Lifecycle Phase","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","title":"Name","description":"The name of the lifecycle phase"},"description":{"type":"string","title":"Description","description":"The description of the lifecycle phase"}}}]};
19
19
  const schema36 = {"title":"Pre-Defined Phase","required":["phase"],"additionalProperties":false,"properties":{"phase":{"type":"string","title":"Phase","description":"A pre-defined phase in the product lifecycle.","enum":["design","pre-build","build","post-build","operations","discovery","decommission"],"meta:enum":{"design":"BOM produced early in the development lifecycle containing an inventory of components and services that are proposed or planned to be used. The inventory may need to be procured, retrieved, or resourced prior to use.","pre-build":"BOM consisting of information obtained prior to a build process and may contain source files and development artifacts and manifests. The inventory may need to be resolved and retrieved prior to use.","build":"BOM consisting of information obtained during a build process where component inventory is available for use. The precise versions of resolved components are usually available at this time as well as the provenance of where the components were retrieved from.","post-build":"BOM consisting of information obtained after a build process has completed and the resulting components(s) are available for further analysis. Built components may exist as the result of a CI/CD process, may have been installed or deployed to a system or device, and may need to be retrieved or extracted from the system or device.","operations":"BOM produced that represents inventory that is running and operational. This may include staging or production environments and will generally encompass multiple SBOMs describing the applications and operating system, along with HBOMs describing the hardware that makes up the system. Operations Bill of Materials (OBOM) can provide full-stack inventory of runtime environments, configurations, and additional dependencies.","discovery":"BOM consisting of information observed through network discovery providing point-in-time enumeration of embedded, on-premise, and cloud-native services such as server applications, connected devices, microservices, and serverless functions.","decommission":"BOM containing inventory that will be, or has been retired from operations."}}}};
@@ -398,6 +398,7 @@ return errors === 0;
398
398
  validate29.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
399
399
 
400
400
  const schema44 = {"type":"object","title":"Organizational Contact","additionalProperties":false,"properties":{"bom-ref":{"$ref":"#/$defs/cyclonedx-common-2.0/$defs/refType","title":"BOM Reference","description":"An optional identifier which can be used to reference the object elsewhere in the BOM. Every bom-ref must be unique within the BOM.\nValue SHOULD not start with the BOM-Link intro 'urn:cdx:' to avoid conflicts with BOM-Links."},"name":{"type":"string","title":"Name","description":"The name of a contact","examples":["Contact name"]},"email":{"type":"string","format":"idn-email","title":"Email Address","description":"The email address of the contact.","examples":["firstname.lastname@example.com"]},"phone":{"type":"string","title":"Phone","description":"The phone number of the contact.","examples":["800-555-1212"]}}};
401
+ const formats4 = cdxgenFormats["idn-email"];
401
402
 
402
403
  function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
403
404
  let vErrors = null;
@@ -460,7 +461,13 @@ let data2 = data.email;
460
461
  const _errs8 = errors;
461
462
  if(errors === _errs8){
462
463
  if(errors === _errs8){
463
- if(!(typeof data2 === "string")){
464
+ if(typeof data2 === "string"){
465
+ if(!(formats4(data2))){
466
+ validate31.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema44.properties.email,data:data2}];
467
+ return false;
468
+ }
469
+ }
470
+ else {
464
471
  validate31.errors = [{instancePath:instancePath+"/email",schemaPath:"#/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema44.properties.email.type,parentSchema:schema44.properties.email,data:data2}];
465
472
  return false;
466
473
  }
@@ -2648,7 +2655,13 @@ let data5 = data2.email;
2648
2655
  const _errs14 = errors;
2649
2656
  if(errors === _errs14){
2650
2657
  if(errors === _errs14){
2651
- if(!(typeof data5 === "string")){
2658
+ if(typeof data5 === "string"){
2659
+ if(!(formats4(data5))){
2660
+ validate64.errors = [{instancePath:instancePath+"/author/email",schemaPath:"#/$defs/cyclonedx-common-2.0/$defs/identifiableAction/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema71.properties.email,data:data5}];
2661
+ return false;
2662
+ }
2663
+ }
2664
+ else {
2652
2665
  validate64.errors = [{instancePath:instancePath+"/author/email",schemaPath:"#/$defs/cyclonedx-common-2.0/$defs/identifiableAction/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema71.properties.email.type,parentSchema:schema71.properties.email,data:data5}];
2653
2666
  return false;
2654
2667
  }
@@ -2730,7 +2743,13 @@ let data9 = data6.email;
2730
2743
  const _errs24 = errors;
2731
2744
  if(errors === _errs24){
2732
2745
  if(errors === _errs24){
2733
- if(!(typeof data9 === "string")){
2746
+ if(typeof data9 === "string"){
2747
+ if(!(formats4(data9))){
2748
+ validate64.errors = [{instancePath:instancePath+"/committer/email",schemaPath:"#/$defs/cyclonedx-common-2.0/$defs/identifiableAction/properties/email/format",keyword:"format",params:{format: "idn-email"},message:"must match format \""+"idn-email"+"\"",schema:"idn-email",parentSchema:schema71.properties.email,data:data9}];
2749
+ return false;
2750
+ }
2751
+ }
2752
+ else {
2734
2753
  validate64.errors = [{instancePath:instancePath+"/committer/email",schemaPath:"#/$defs/cyclonedx-common-2.0/$defs/identifiableAction/properties/email/type",keyword:"type",params:{type: "string"},message:"must be string",schema:schema71.properties.email.type,parentSchema:schema71.properties.email,data:data9}];
2735
2754
  return false;
2736
2755
  }
@@ -21322,7 +21341,7 @@ const pattern21 = new RegExp("^[A-Za-z0-9][A-Za-z0-9\\-/.()\\s]{0,28}[A-Za-z0-9]
21322
21341
  const pattern23 = new RegExp("^[A-Z]{2}$", "u");
21323
21342
  const schema257 = {"type":"object","title":"Priority Application","description":"The priorityApplication contains the essential data necessary to identify and reference an earlier patent filing for priority rights. In line with WIPO ST.96 guidelines, it includes the jurisdiction (office code), application number, and filing date-the three key elements that uniquely specify the priority application in a global patent context.","required":["applicationNumber","jurisdiction","filingDate"],"additionalProperties":false,"properties":{"applicationNumber":{"$ref":"#/$defs/cyclonedx-patent-2.0/$defs/patentApplicationNumber"},"jurisdiction":{"$ref":"#/$defs/cyclonedx-patent-2.0/$defs/patentJurisdiction"},"filingDate":{"$ref":"#/$defs/cyclonedx-patent-2.0/$defs/patentFilingDate"}}};
21324
21343
  const schema260 = {"type":"string","format":"date","title":"Filing Date","description":"The date the priority application was filed, aligned with `FilingDate` in ST.96. Refer to [FilingDate in ST.96](https://www.wipo.int/standards/XMLSchema/ST96/V8_0/Patent/FilingDate.xsd)."};
21325
- const formats74 = require("ajv-formats/dist/formats").fullFormats.date;
21344
+ const formats80 = cdxgenFormats.date;
21326
21345
 
21327
21346
  function validate317(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){
21328
21347
  let vErrors = null;
@@ -21402,7 +21421,7 @@ const _errs9 = errors;
21402
21421
  if(errors === _errs9){
21403
21422
  if(errors === _errs9){
21404
21423
  if(typeof data2 === "string"){
21405
- if(!(formats74.validate(data2))){
21424
+ if(!(formats80.validate(data2))){
21406
21425
  validate317.errors = [{instancePath:instancePath+"/filingDate",schemaPath:"#/$defs/cyclonedx-patent-2.0/$defs/patentFilingDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema260,data:data2}];
21407
21426
  return false;
21408
21427
  }
@@ -21613,7 +21632,7 @@ const _errs21 = errors;
21613
21632
  if(errors === _errs21){
21614
21633
  if(errors === _errs21){
21615
21634
  if(typeof data8 === "string"){
21616
- if(!(formats74.validate(data8))){
21635
+ if(!(formats80.validate(data8))){
21617
21636
  validate316.errors = [{instancePath:instancePath+"/filingDate",schemaPath:"#/properties/filingDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema253.properties.filingDate,data:data8}];
21618
21637
  return false;
21619
21638
  }
@@ -21636,7 +21655,7 @@ const _errs23 = errors;
21636
21655
  if(errors === _errs23){
21637
21656
  if(errors === _errs23){
21638
21657
  if(typeof data9 === "string"){
21639
- if(!(formats74.validate(data9))){
21658
+ if(!(formats80.validate(data9))){
21640
21659
  validate316.errors = [{instancePath:instancePath+"/grantDate",schemaPath:"#/properties/grantDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema253.properties.grantDate,data:data9}];
21641
21660
  return false;
21642
21661
  }
@@ -21659,7 +21678,7 @@ const _errs25 = errors;
21659
21678
  if(errors === _errs25){
21660
21679
  if(errors === _errs25){
21661
21680
  if(typeof data10 === "string"){
21662
- if(!(formats74.validate(data10))){
21681
+ if(!(formats80.validate(data10))){
21663
21682
  validate316.errors = [{instancePath:instancePath+"/patentExpirationDate",schemaPath:"#/properties/patentExpirationDate/format",keyword:"format",params:{format: "date"},message:"must match format \""+"date"+"\"",schema:"date",parentSchema:schema253.properties.patentExpirationDate,data:data10}];
21664
21683
  return false;
21665
21684
  }