@cyclonedx/cdxgen
Version:
Creates CycloneDX Software Bill of Materials (SBOM) from source or container image
987 lines • 164 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://cyclonedx.org/schema/bom-1.5.schema.json",
"type": "object",
"title": "CycloneDX Software Bill of Materials Standard",
"$comment": "CycloneDX JSON schema is published under the terms of the Apache License 2.0.",
"required": ["bomFormat", "specVersion"],
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"enum": ["http://cyclonedx.org/schema/bom-1.5.schema.json"]
},
"bomFormat": {
"type": "string",
"title": "BOM Format",
"description": "Specifies the format of the BOM. This helps to identify the file as CycloneDX since BOMs do not have a filename convention nor does JSON schema support namespaces. This value MUST be \"CycloneDX\".",
"enum": ["CycloneDX"]
},
"specVersion": {
"type": "string",
"title": "CycloneDX Specification Version",
"description": "The version of the CycloneDX specification a BOM conforms to (starting at version 1.2).",
"examples": ["1.5"]
},
"serialNumber": {
"type": "string",
"title": "BOM Serial Number",
"description": "Every BOM generated SHOULD have a unique serial number, even if the contents of the BOM have not changed over time. If specified, the serial number MUST conform to RFC-4122. Use of serial numbers are RECOMMENDED.",
"examples": ["urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"],
"pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
},
"version": {
"type": "integer",
"title": "BOM Version",
"description": "Whenever an existing BOM is modified, either manually or through automated processes, the version of the BOM SHOULD be incremented by 1. When a system is presented with multiple BOMs with identical serial numbers, the system SHOULD use the most recent version of the BOM. The default version is '1'.",
"minimum": 1,
"default": 1,
"examples": [1]
},
"metadata": {
"$ref": "#/definitions/metadata",
"title": "BOM Metadata",
"description": "Provides additional information about a BOM."
},
"components": {
"type": "array",
"items": { "$ref": "#/definitions/component" },
"uniqueItems": true,
"title": "Components",
"description": "A list of software and hardware components."
},
"services": {
"type": "array",
"items": { "$ref": "#/definitions/service" },
"uniqueItems": true,
"title": "Services",
"description": "A list of services. This may include microservices, function-as-a-service, and other types of network or intra-process services."
},
"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."
},
"dependencies": {
"type": "array",
"items": { "$ref": "#/definitions/dependency" },
"uniqueItems": true,
"title": "Dependencies",
"description": "Provides the ability to document dependency relationships."
},
"compositions": {
"type": "array",
"items": { "$ref": "#/definitions/compositions" },
"uniqueItems": true,
"title": "Compositions",
"description": "Compositions describe constituent parts (including components, services, and dependency relationships) and their completeness. The completeness of vulnerabilities expressed in a BOM may also be described."
},
"vulnerabilities": {
"type": "array",
"items": { "$ref": "#/definitions/vulnerability" },
"uniqueItems": true,
"title": "Vulnerabilities",
"description": "Vulnerabilities identified in components or services."
},
"annotations": {
"type": "array",
"items": { "$ref": "#/definitions/annotations" },
"uniqueItems": true,
"title": "Annotations",
"description": "Comments made by people, organizations, or tools about any object with a bom-ref, such as components, services, vulnerabilities, or the BOM itself. Unlike inventory information, annotations may contain opinion or commentary from various stakeholders. Annotations may be inline (with inventory) or externalized via BOM-Link, and may optionally be signed."
},
"formulation": {
"type": "array",
"items": { "$ref": "#/definitions/formula" },
"uniqueItems": true,
"title": "Formulation",
"description": "Describes how a component or service was manufactured or deployed. This is achieved through the use of formulas, workflows, tasks, and steps, which declare the precise steps to reproduce along with the observed formulas describing the steps which transpired in the manufacturing process."
},
"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"
}
},
"signature": {
"$ref": "#/definitions/signature",
"title": "Signature",
"description": "Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html)."
}
},
"definitions": {
"refType": {
"description": "Identifier for referable and therefore interlink-able elements.",
"type": "string",
"minLength": 1,
"$comment": "value SHOULD not start with the BOM-Link intro 'urn:cdx:'"
},
"refLinkType": {
"description": "Descriptor for an element identified by the attribute 'bom-ref' in the same BOM document.\nIn contrast to `bomLinkElementType`.",
"allOf": [{ "$ref": "#/definitions/refType" }]
},
"bomLinkDocumentType": {
"title": "BOM-Link Document",
"description": "Descriptor for another BOM document. See https://cyclonedx.org/capabilities/bomlink/",
"type": "string",
"format": "iri-reference",
"pattern": "^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*$",
"$comment": "part of the pattern is based on `bom.serialNumber`'s pattern"
},
"bomLinkElementType": {
"title": "BOM-Link Element",
"description": "Descriptor for an element in a BOM document. See https://cyclonedx.org/capabilities/bomlink/",
"type": "string",
"format": "iri-reference",
"pattern": "^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*#.+$",
"$comment": "part of the pattern is based on `bom.serialNumber`'s pattern"
},
"bomLink": {
"anyOf": [
{
"title": "BOM-Link Document",
"$ref": "#/definitions/bomLinkDocumentType"
},
{
"title": "BOM-Link Element",
"$ref": "#/definitions/bomLinkElementType"
}
]
},
"metadata": {
"type": "object",
"title": "BOM Metadata Object",
"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": "",
"items": {
"type": "object",
"title": "Lifecycle",
"description": "The product lifecycle(s) that this BOM represents.",
"oneOf": [
{
"required": ["phase"],
"additionalProperties": false,
"properties": {
"phase": {
"type": "string",
"title": "Phase",
"description": "A pre-defined phase in the product lifecycle.\n\n* __design__ = BOM produced early in the development lifecycle containing 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.\n* __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.\n* __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.\n* __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.\n* __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.\n* __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.\n* __decommission__ = BOM containing inventory that will be, or has been retired from operations.",
"enum": [
"design",
"pre-build",
"build",
"post-build",
"operations",
"discovery",
"decommission"
]
}
}
},
{
"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": {
"oneOf": [
{
"type": "object",
"title": "Creation Tools",
"description": "The tool(s) used in the creation 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": "Creation Tools (legacy)",
"description": "[Deprecated] The tool(s) used in the creation of the BOM.",
"items": { "$ref": "#/definitions/tool" }
}
]
},
"authors": {
"type": "array",
"title": "Authors",
"description": "The person(s) who created the BOM. Authors are common in BOMs created through manual processes. BOMs created through automated means may not have authors.",
"items": { "$ref": "#/definitions/organizationalContact" }
},
"component": {
"title": "Component",
"description": "The component that the BOM describes.",
"$ref": "#/definitions/component"
},
"manufacture": {
"title": "Manufacture",
"description": "The 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)",
"$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" }
}
}
},
"tool": {
"type": "object",
"title": "Tool",
"description": "[Deprecated] - DO NOT USE. This will be removed in a future version. This will be removed in a future version. Use component or service instead. Information about the automated or manual tool used",
"additionalProperties": false,
"properties": {
"vendor": {
"type": "string",
"title": "Tool Vendor",
"description": "The name of the vendor who created the tool"
},
"name": {
"type": "string",
"title": "Tool Name",
"description": "The name of the tool"
},
"version": {
"type": "string",
"title": "Tool Version",
"description": "The version of the tool"
},
"hashes": {
"type": "array",
"items": { "$ref": "#/definitions/hash" },
"title": "Hashes",
"description": "The hashes of the tool (if applicable)."
},
"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."
}
}
},
"organizationalEntity": {
"type": "object",
"title": "Organizational Entity Object",
"description": "",
"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."
},
"name": {
"type": "string",
"title": "Name",
"description": "The name of the organization",
"examples": ["Example Inc."]
},
"url": {
"type": "array",
"items": {
"type": "string",
"format": "iri-reference"
},
"title": "URL",
"description": "The URL of the organization. Multiple URLs are allowed.",
"examples": ["https://example.com"]
},
"contact": {
"type": "array",
"title": "Contact",
"description": "A contact at the organization. Multiple contacts are allowed.",
"items": { "$ref": "#/definitions/organizationalContact" }
}
}
},
"organizationalContact": {
"type": "object",
"title": "Organizational Contact Object",
"description": "",
"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."
},
"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"]
}
}
},
"component": {
"type": "object",
"title": "Component Object",
"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"
],
"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. Types include:\n\n* __application__ = A software application. Refer to [https://en.wikipedia.org/wiki/Application_software](https://en.wikipedia.org/wiki/Application_software) for information about applications.\n* __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.\n* __library__ = A software library. Refer to [https://en.wikipedia.org/wiki/Library_(computing)](https://en.wikipedia.org/wiki/Library_(computing))\n 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.\n* __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)\n* __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.\n* __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)\n* __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.\n See also the list of [known device properties](https://github.com/CycloneDX/cyclonedx-property-taxonomy/blob/main/cdx/device.md).\n* __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)\n* __firmware__ = A special type of software that provides low-level control over a devices hardware. Refer to [https://en.wikipedia.org/wiki/Firmware](https://en.wikipedia.org/wiki/Firmware)\n* __file__ = A computer file. Refer to [https://en.wikipedia.org/wiki/Computer_file](https://en.wikipedia.org/wiki/Computer_file) for information about files.\n* __machine-learning-model__ = A model based on training data that can make predictions or decisions without being explicitly programmed to do so.\n* __data__ = A collection of discrete values that convey information.",
"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."
},
"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"
},
"author": {
"type": "string",
"title": "Component Author",
"description": "The 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": {
"type": "string",
"title": "Component Version",
"description": "The component version. The version should ideally comply with semantic versioning but is not enforced.",
"examples": ["9.0.14"]
},
"description": {
"type": "string",
"title": "Component Description",
"description": "Specifies a description for the component"
},
"scope": {
"type": "string",
"enum": ["required", "optional", "excluded"],
"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",
"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": "Component Common Platform Enumeration (CPE)",
"description": "Specifies a well-formed CPE name that conforms to the CPE 2.2 or 2.3 specification. See [https://nvd.nist.gov/products/cpe](https://nvd.nist.gov/products/cpe)",
"examples": ["cpe:2.3:a:acme:component_framework:-:*:*:*:*:*:*:*"]
},
"purl": {
"type": "string",
"title": "Component Package URL (purl)",
"description": "Specifies the 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)",
"examples": [
"pkg:maven/com.acme/tomcat-catalina@9.0.14?packaging=jar"
]
},
"swid": {
"$ref": "#/definitions/swid",
"title": "SWID Tag",
"description": "Specifies metadata and content for [ISO-IEC 19770-2 Software Identification (SWID) Tags](https://www.iso.org/standard/65666.html)."
},
"modified": {
"type": "boolean",
"title": "Component Modified From Original",
"description": "[Deprecated] - DO NOT USE. 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 are 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 complimentary 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": "Machine Learning 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."
},
"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" }
},
"signature": {
"$ref": "#/definitions/signature",
"title": "Signature",
"description": "Enveloped signature in [JSON Signature Format (JSF)](https://cyberphone.github.io/doc/security/jsf.html)."
}
}
},
"swid": {
"type": "object",
"title": "SWID Tag",
"description": "Specifies metadata and content for ISO-IEC 19770-2 Software Identification (SWID) Tags.",
"required": ["tagId", "name"],
"additionalProperties": false,
"properties": {
"tagId": {
"type": "string",
"title": "Tag ID",
"description": "Maps to the tagId of a SoftwareIdentity."
},
"name": {
"type": "string",
"title": "Name",
"description": "Maps to the name of a SoftwareIdentity."
},
"version": {
"type": "string",
"title": "Version",
"default": "0.0",
"description": "Maps to the version of a SoftwareIdentity."
},
"tagVersion": {
"type": "integer",
"title": "Tag Version",
"default": 0,
"description": "Maps to the tagVersion of a SoftwareIdentity."
},
"patch": {
"type": "boolean",
"title": "Patch",
"default": false,
"description": "Maps to the patch of a SoftwareIdentity."
},
"text": {
"title": "Attachment text",
"description": "Specifies the metadata and content of the SWID tag.",
"$ref": "#/definitions/attachment"
},
"url": {
"type": "string",
"title": "URL",
"description": "The URL to the SWID file.",
"format": "iri-reference"
}
}
},
"attachment": {
"type": "object",
"title": "Attachment",
"description": "Specifies the metadata and content for an attachment.",
"required": ["content"],
"additionalProperties": false,
"properties": {
"contentType": {
"type": "string",
"title": "Content-Type",
"description": "Specifies the content type of the text. Defaults to text/plain if not specified.",
"default": "text/plain"
},
"encoding": {
"type": "string",
"title": "Encoding",
"description": "Specifies the optional encoding the text is represented in.",
"enum": ["base64"]
},
"content": {
"type": "string",
"title": "Attachment Text",
"description": "The attachment data. Proactive controls such as input validation and sanitization should be employed to prevent misuse of attachment text."
}
}
},
"hash": {
"type": "object",
"title": "Hash Objects",
"required": ["alg", "content"],
"additionalProperties": false,
"properties": {
"alg": {
"$ref": "#/definitions/hash-alg"
},
"content": {
"$ref": "#/definitions/hash-content"
}
}
},
"hash-alg": {
"type": "string",
"enum": [
"MD5",
"SHA-1",
"SHA-256",
"SHA-384",
"SHA-512",
"SHA3-256",
"SHA3-384",
"SHA3-512",
"BLAKE2b-256",
"BLAKE2b-384",
"BLAKE2b-512",
"BLAKE3"
],
"title": "Hash Algorithm"
},
"hash-content": {
"type": "string",
"title": "Hash Content (value)",
"examples": ["3942447fac867ae5cdb3229b658f4d48"],
"pattern": "^([a-fA-F0-9]{32}|[a-fA-F0-9]{40}|[a-fA-F0-9]{64}|[a-fA-F0-9]{96}|[a-fA-F0-9]{128})$"
},
"license": {
"type": "object",
"title": "License Object",
"oneOf": [
{
"required": ["id"]
},
{
"required": ["name"]
}
],
"additionalProperties": false,
"properties": {
"bom-ref": {
"$ref": "#/definitions/refType",
"title": "BOM Reference",
"description": "An optional identifier which can be used to reference the license elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
},
"id": {
"$ref": "spdx.schema.json",
"title": "License ID (SPDX)",
"description": "A valid SPDX license ID",
"examples": ["Apache-2.0"]
},
"name": {
"type": "string",
"title": "License Name",
"description": "If SPDX does not define the license used, this field may be used to provide the license name",
"examples": ["Acme Software License"]
},
"text": {
"title": "License text",
"description": "An optional way to include the textual content of a license.",
"$ref": "#/definitions/attachment"
},
"url": {
"type": "string",
"title": "License URL",
"description": "The URL to the license file. If specified, a 'license' externalReference should also be specified for completeness",
"examples": ["https://www.apache.org/licenses/LICENSE-2.0.txt"],
"format": "iri-reference"
},
"licensing": {
"type": "object",
"title": "Licensing information",
"description": "Licensing details describing the licensor/licensee, license type, renewal and expiration dates, and other important metadata",
"additionalProperties": false,
"properties": {
"altIds": {
"type": "array",
"title": "Alternate License Identifiers",
"description": "License identifiers that may be used to manage licenses and their lifecycle",
"items": {
"type": "string"
}
},
"licensor": {
"title": "Licensor",
"description": "The individual or organization that grants a license to another individual or organization",
"type": "object",
"additionalProperties": false,
"properties": {
"organization": {
"title": "Licensor (Organization)",
"description": "The organization that granted the license",
"$ref": "#/definitions/organizationalEntity"
},
"individual": {
"title": "Licensor (Individual)",
"description": "The individual, not associated with an organization, that granted the license",
"$ref": "#/definitions/organizationalContact"
}
},
"oneOf": [
{
"required": ["organization"]
},
{
"required": ["individual"]
}
]
},
"licensee": {
"title": "Licensee",
"description": "The individual or organization for which a license was granted to",
"type": "object",
"additionalProperties": false,
"properties": {
"organization": {
"title": "Licensee (Organization)",
"description": "The organization that was granted the license",
"$ref": "#/definitions/organizationalEntity"
},
"individual": {
"title": "Licensee (Individual)",
"description": "The individual, not associated with an organization, that was granted the license",
"$ref": "#/definitions/organizationalContact"
}
},
"oneOf": [
{
"required": ["organization"]
},
{
"required": ["individual"]
}
]
},
"purchaser": {
"title": "Purchaser",
"description": "The individual or organization that purchased the license",
"type": "object",
"additionalProperties": false,
"properties": {
"organization": {
"title": "Purchaser (Organization)",
"description": "The organization that purchased the license",
"$ref": "#/definitions/organizationalEntity"
},
"individual": {
"title": "Purchaser (Individual)",
"description": "The individual, not associated with an organization, that purchased the license",
"$ref": "#/definitions/organizationalContact"
}
},
"oneOf": [
{
"required": ["organization"]
},
{
"required": ["individual"]
}
]
},
"purchaseOrder": {
"type": "string",
"title": "Purchase Order",
"description": "The purchase order identifier the purchaser sent to a supplier or vendor to authorize a purchase"
},
"licenseTypes": {
"type": "array",
"title": "License Type",
"description": "The type of license(s) that was granted to the licensee\n\n* __academic__ = A license that grants use of software solely for the purpose of education or research.\n* __appliance__ = A license covering use of software embedded in a specific piece of hardware.\n* __client-access__ = A Client Access License (CAL) allows client computers to access services provided by server software.\n* __concurrent-user__ = A Concurrent User license (aka floating license) limits the number of licenses for a software application and licenses are shared among a larger number of users.\n* __core-points__ = A license where the core of a computer's processor is assigned a specific number of points.\n* __custom-metric__ = A license for which consumption is measured by non-standard metrics.\n* __device__ = A license that covers a defined number of installations on computers and other types of devices.\n* __evaluation__ = A license that grants permission to install and use software for trial purposes.\n* __named-user__ = A license that grants access to the software to one or more pre-defined users.\n* __node-locked__ = A license that grants access to the software on one or more pre-defined computers or devices.\n* __oem__ = An Original Equipment Manufacturer license that is delivered with hardware, cannot be transferred to other hardware, and is valid for the life of the hardware.\n* __perpetual__ = A license where the software is sold on a one-time basis and the licensee can use a copy of the software indefinitely.\n* __processor-points__ = A license where each installation consumes points per processor.\n* __subscription__ = A license where the licensee pays a fee to use the software or service.\n* __user__ = A license that grants access to the software or service by a specified number of users.\n* __other__ = Another license type.\n",
"items": {
"type": "string",
"enum": [
"academic",
"appliance",
"client-access",
"concurrent-user",
"core-points",
"custom-metric",
"device",
"evaluation",
"named-user",
"node-locked",
"oem",
"perpetual",
"processor-points",
"subscription",
"user",
"other"
]
}
},
"lastRenewal": {
"type": "string",
"format": "date-time",
"title": "Last Renewal",
"description": "The timestamp indicating when the license was last renewed. For new purchases, this is often the purchase or acquisition date. For non-perpetual licenses or subscriptions, this is the timestamp of when the license was last renewed."
},
"expiration": {
"type": "string",
"format": "date-time",
"title": "Expiration",
"description": "The timestamp indicating when the current license expires (if applicable)."
}
}
},
"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" }
}
}
},
"licenseChoice": {
"title": "License Choice",
"description": "EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression)",
"type": "array",
"oneOf": [
{
"title": "Multiple licenses",
"description": "A list of SPDX licenses and/or named licenses.",
"type": "array",
"items": {
"type": "object",
"required": ["license"],
"additionalProperties": false,
"properties": {
"license": { "$ref": "#/definitions/license" }
}
}
},
{
"title": "SPDX License Expression",
"description": "A tuple of exactly one SPDX License Expression.",
"type": "array",
"additionalItems": false,
"minItems": 1,
"maxItems": 1,
"items": [
{
"type": "object",
"additionalProperties": false,
"required": ["expression"],
"properties": {
"expression": {
"type": "string",
"title": "SPDX License Expression",
"examples": [
"Apache-2.0 AND (MIT OR GPL-2.0-only)",
"GPL-3.0-only WITH Classpath-exception-2.0"
]
},
"bom-ref": {
"$ref": "#/definitions/refType",
"title": "BOM Reference",
"description": "An optional identifier which can be used to reference the license elsewhere in the BOM. Every bom-ref MUST be unique within the BOM."
}
}
}
]
}
]
},
"commit": {
"type": "object",
"title": "Commit",
"description": "Specifies an individual commit",
"additionalProperties": false,
"properties": {
"uid": {
"type": "string",
"title": "UID",
"description": "A unique identifier of the commit. This may be version control specific. For example, Subversion uses revision numbers whereas git uses commit hashes."
},
"url": {
"type": "string",
"title": "URL",
"description": "The URL to the commit. This URL will typically point to a commit in a version control system.",
"format": "iri-reference"
},
"author": {
"title": "Author",
"description": "The author who created the changes in the commit",
"$ref": "#/definitions/identifiableAction"
},
"committer": {
"title": "Committer",
"description": "The person who committed or pushed the commit",
"$ref": "#/definitions/identifiableAction"
},
"message": {
"type": "string",
"title": "Message",
"description": "The text description of the contents of the commit"
}
}
},
"patch": {
"type": "object",
"title": "Patch",
"description": "Specifies an individual patch",
"required": ["type"],
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": ["unofficial", "monkey", "backport", "cherry-pick"],
"title": "Type",
"description": "Specifies the purpose for the patch including the resolution of defects, security issues, or new behavior or functionality.\n\n* __unofficial__ = A patch which is not developed by the creators or maintainers of the software being patched. Refer to [https://en.wikipedia.org/wiki/Unofficial_patch](https://en.wikipedia.org/wiki/Unofficial_patch)\n* __monkey__ = A patch which dynamically modifies runtime behavior. Refer to [https://en.wikipedia.org/wiki/Monkey_patch](https://en.wikipedia.org/wiki/Monkey_patch)\n* __backport__ = A patch which takes code from a newer version of software and applies it to older versions of the same software. Refer to [https://en.wikipedia.org/wiki/Backporting](http