SBOM Schema Import - CycloneDX
Overview
This document describes the mandatory schema requirements for CycloneDX SBOM files that can be successfully processed and imported by the Mend system. The schema applies to both JSON and XML formats and is based on the CycloneDX specification versions 1.4, 1.5, and 1.6, with specific requirements defined by Mend.io.
The system automatically detects the format (JSON or XML) and processes both using the same internal logic, ensuring consistent behavior regardless of the input format.
Mandatory Schema Requirements
The table below lists the fields that are mandatory for passing the CycloneDX validation.
Field | Type | Required | Description | Fallback Behavior |
|---|---|---|---|---|
| String | ✅ | Must be "CycloneDX" | N/A |
| String | ✅ | CycloneDX specification version | N/A |
| Integer | ❌ | BOM document version | Defaults to 1 if not specified |
Metadata Section (Optional but Recommended)
When metadata is present, the following structure applies:
Field | Type | Required | Description | Fallback Behavior |
|---|---|---|---|---|
| String (ISO 8601) | ❌ | Creation timestamp | N/A |
| Object | ❌ | Contains an identifier that groups all the direct dependencies to create a hierarchy | If unspecified, all packages are treated as direct dependencies |
| String | ❌ | Root component name | N/A |
| String | ❌ | Root component type | Falls back to “application” |
| String | ❌ | Root component group | N/A |
| String | ❌ | Root component version | N/A |
| String | ❌ | Root component reference | If unspecified, all packages are treated as direct dependencies |
Note: Only for the project element, metadata.component equal to “application” ("type" : "application") is processed. This occurs once per SBOM file.
Components Section (Required for Dependency Matching)
Note: For a list of languages and package managers supported by Mend SCA, please Refer to the support matrix.
Each component in the components array must have the following structure:
Field | Type | Required | Description | Fallback Behavior |
|---|---|---|---|---|
| String | ✅ | Component type Must be "library" | N/A |
| String | ✅ | Unique component reference Used for dependency mapping | N/A |
| String | ✅ | Package URL Required PURL structure: Refer to this repository for more details on PURL specification. | When the PURL is absent, the matching algorithm will attempt to rely on |
| String | ❌ | Component name Used as artifactId | N/A |
| String | ❌ | Component version | N/A |
| String | ❌ | Component group | N/A |
| Array | ❌ | Component hashes Used for SHA1 extraction | N/A |
Component Type Filtering:
Only components with type equal to "library" are processed. Other component types are ignored.
Dependencies Section (Recommended)
If the dependencies array is present, the system builds a dependency tree starting from the root component.
Field | Type | Required | Description | Fallback Behavior |
|---|---|---|---|---|
| Array | ✅ | Dependency relationships | If missing, all components are treated as direct dependencies |
| String | ✅ | Component reference Must match a component's | N/A |
| Array | ✅ | Array of dependency references | N/A |
Example Valid SBOM
JSON Format Example
{
"bomFormat": "CycloneDX",
"specVersion": "1.5",
"version": 1,
"metadata": {
"component": {
"name": "my-project",
"type": "application",
"bom-ref": "root-component"
}
},
"components": [
{
"type": "library",
"name": "example-library",
"version": "1.0.0",
"bom-ref": "lib-1",
"purl": "pkg:maven/com.example/library@1.0.0"
}
],
"dependencies": [
{
"ref": "root-component",
"dependsOn": ["lib-1"]
},
{
"ref": "lib-1",
"dependsOn": []
}
]
}
XML Format Example
<?xml version="1.0" encoding="UTF-8"?>
<bom xmlns="http://cyclonedx.org/schema/bom/1.5"
version="1"
serialNumber="urn:uuid:12345678-1234-1234-1234-123456789012">
<metadata>
<component type="application" bom-ref="root-component">
<name>my-project</name>
</component>
</metadata>
<components>
<component type="library" bom-ref="lib-1">
<name>example-library</name>
<version>1.0.0</version>
<purl>pkg:maven/com.example/library@1.0.0</purl>
</component>
</components>
<dependencies>
<dependency ref="root-component">
<dependsOn>lib-1</dependsOn>
</dependency>
<dependency ref="lib-1">
<dependsOn></dependsOn>
</dependency>
</dependencies>
</bom>