Overview
Two specification families dominate the SBOM landscape. CycloneDX is the OWASP-curated, security-focused format and this skill's primary subject; SPDX is the Linux Foundation's license-focused standard, covered in references/spdx.md.
Per cyclonedx.org/specification/overview (opens in new window), CycloneDX's distinguishing features vs SPDX:
This is a reference skill - defines the schemas + tooling landscape; doesn't run scans. Pair with syft-generation to generate SBOMs in either format from real codebases.
Choosing a format
| Signal | Pick |
|---|---|
| Security-focused consumer (vuln tracking, supply-chain attestation) | CycloneDX |
| US Federal procurement (NIST SP 800-218 + EO 14028 guidance) | SPDX (references/spdx.md) |
| License-compliance focus (richest license-expression vocabulary) | SPDX |
| Linux Foundation member organization workflow | SPDX |
| EU consumers / broad modern tooling | CycloneDX (most common) |
| Consumer dictates the format | Whatever the consumer requires |
When no consumer constraint exists, CycloneDX is the default here: its embedded VEX (vulnerabilities[].analysis) feeds the triage workflow directly. Generating both (Syft emits either) satisfies mixed audiences. Note SPDX license IDs are the cross-format standard - even CycloneDX license blocks use them.
When to use
How to use
Work the numbered Steps in order: generate the BOM (Steps 1-2), add a VEX-style analysis record per triaged finding (Steps 3, 5), validate against the schema (Step 4), then sign + attest in CI (Step 6). Pin the specVersion your consumer agreed; bump version on each re-issue. For an SPDX consumer, follow references/spdx.md instead.
Step 1 - Top-level structure
A minimal CycloneDX 1.6 BOM (JSON):
{
"$schema": "http://cyclonedx.org/schema/bom-1.6.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
"version": 1,
"metadata": {
"timestamp": "2026-05-06T12:00:00Z",
"tools": [{"vendor": "anchore", "name": "syft", "version": "1.16.0"}],
"component": {
"type": "application",
"name": "my-app",
"version": "1.0.0",
"purl": "pkg:generic/my-app@1.0.0"
}
},
"components": [
{
"type": "library",
"bom-ref": "pkg:npm/lodash@4.17.20",
"name": "lodash",
"version": "4.17.20",
"purl": "pkg:npm/lodash@4.17.20",
"licenses": [{"license": {"id": "MIT"}}]
}
],
"dependencies": [
{
"ref": "pkg:generic/my-app@1.0.0",
"dependsOn": ["pkg:npm/lodash@4.17.20"]
}
]
}Step 2 - Required fields per spec
Per cdx-spec (opens in new window):
| Field | Required? | Use |
|---|---|---|
bomFormat | yes | Must be "CycloneDX" |
specVersion | yes | "1.6" (current) / "1.5" / "1.4" |
serialNumber | recommended | URN UUID identifying the BOM |
version | recommended | BOM revision (incremented per re-issue) |
metadata | recommended | Generation context (timestamp, tools, top-level component) |
components[] | required for non-empty BOMs | Inventory of dependencies |
dependencies[] | recommended | Dependency-graph edges via bom-ref |
services[] | optional | Hosted services (SaaS BOM) |
vulnerabilities[] | optional | Per-finding records |
formulation[] | optional | Build metadata |
Component types and per-language native generators are cataloged in references/component-types-and-tooling.md; the purl (Package URL) field is the canonical component identifier.
Step 3 - Vulnerability block (VEX-equivalent)
CycloneDX has first-class vuln support (unlike SPDX which delegates to companion files):
"vulnerabilities": [
{
"id": "CVE-2024-1234",
"source": {"name": "NVD", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1234"},
"ratings": [
{"source": {"name": "NVD"}, "severity": "critical", "method": "CVSSv3", "score": 9.8}
],
"cwes": [798],
"description": "Hardcoded credential in lodash sortBy function",
"affects": [{"ref": "pkg:npm/lodash@4.17.20"}],
"analysis": {
"state": "not_affected",
"justification": "code_not_present",
"detail": "Vulnerable function not exported in current build"
}
}
]The analysis.state field uses VEX-equivalent values: resolved, resolved_with_pedigree, exploitable, in_triage, false_positive, not_affected.
Step 4 - Validation
Validate a CycloneDX SBOM against the schema:
# Using cyclonedx-cli
cyclonedx validate --input-file sbom.json --input-version v1_6
# Or via npm
npx @cyclonedx/cyclonedx-bom validate sbom.jsonValidation catches structural issues (missing required fields, invalid PURLs, unknown component types) before publishing. For SPDX validation (pyspdxtools), see references/spdx.md.
Step 5 - VEX integration
The Step 3 vulnerabilities[] record IS embedded VEX (Vulnerability Exploitability Exchange, CycloneDX 1.4+). To assert a triaged CVE does not affect the shipped product, extend that same record - deltas only:
This lets downstream consumers filter the false-positive finding instead of re-doing reachability analysis.
Step 6 - CI integration
jobs:
cyclonedx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# Per-language native (recommended for richer SBOM)
- run: npx @cyclonedx/cyclonedx-npm --output-file=sbom.cyclonedx.json
# OR via Syft (broader source coverage)
- uses: anchore/sbom-action@v0
with:
format: cyclonedx-json
output-file: sbom.cyclonedx.json
# Validate
- run: cyclonedx validate --input-file sbom.cyclonedx.json --input-version v1_6
# Sign + attest
- run: cosign attest --predicate sbom.cyclonedx.json --type cyclonedx my-image:1.0Worked example
A Node.js service must ship a CycloneDX SBOM to a security-focused customer. The team:
Result: a schema-valid, attested CycloneDX 1.6 BOM whose embedded VEX lets the customer drop the lodash finding without re-doing reachability analysis.
Anti-patterns
| Anti-pattern | Why it fails | Fix |
|---|---|---|
Skip serialNumber field | Can't deduplicate across re-generations | Generate URN UUID per BOM |
Use metadata.tools[] v1.4 schema in 1.6+ | Schema evolution; tools shape changed | Use metadata.tools.components[] (newer schema) |
Skip dependencies[] block | Loss of dep-graph info; downstream tools degrade | Always include (Step 1) |
| Hand-author CycloneDX | Schema is large; errors easy to introduce | Use generators (references) |
| Skip schema validation | Invalid SBOMs pass into prod; downstream consumers fail | Validate in CI (Step 4) |
| Pick format by tooling habit, not consumer | Consumer rejects the delivery | Format-choice table (Choosing a format) |
Limitations
References
Reference tables extracted from cyclonedx-format. See cyclonedx.org/specification/overview (opens in new window) for the source spec.
Component types
Per cdx-spec (opens in new window) common component types:
| Type | Use |
|---|---|
application | Top-level app being described |
library | Code dependency (npm, pip, Maven artifact) |
framework | Application framework (React, Django, Spring) |
container | OCI/Docker container image |
operating-system | OS (Alpine, Ubuntu, etc.) |
firmware | Embedded firmware |
device | Hardware device |
file | Standalone file (script, binary) |
machine-learning-model | ML model (since 1.5) |
data | Dataset (since 1.5) |
cryptographic-asset | Crypto algorithm/key (since 1.6) |
The purl (Package URL) field is the canonical identifier per github.com/package-url/purl-spec (opens in new window).
Per-language native tooling
CycloneDX has per-language native generators (alternative to Syft):
| Language | Tool | Source |
|---|---|---|
| Node.js | @cyclonedx/cyclonedx-npm | github.com/CycloneDX/cyclonedx-node-npm |
| Python | cyclonedx-py (cyclonedx-bom) | github.com/CycloneDX/cyclonedx-python |
| Java/Maven | cyclonedx-maven-plugin | github.com/CycloneDX/cyclonedx-maven-plugin |
| Java/Gradle | cyclonedx-gradle-plugin | github.com/CycloneDX/cyclonedx-gradle-plugin |
| Go | cyclonedx-gomod | github.com/CycloneDX/cyclonedx-gomod |
| .NET | CycloneDX-DOTNET | github.com/CycloneDX/cyclonedx-dotnet |
| Rust | cargo-cyclonedx | github.com/CycloneDX/cyclonedx-rust-cargo |
Per-language tools often produce richer SBOMs than Syft (deeper metadata, language-specific quirks handled).
Companion reference for sbom-formats. Consult when the SBOM consumer requires SPDX (US Federal procurement, Linux Foundation members, license-compliance focus); the SKILL.md covers CycloneDX and the format-choice guidance.
SPDX is the Linux Foundation's SBOM standard, originally focused on license compliance. Per spdx.org/specifications (opens in new window):
Two active major versions:
| Version | Status | Notable |
|---|---|---|
| SPDX 2.3 | Stable; broadly tooled | Tag-Value / JSON / YAML / RDF / Spreadsheet; ISO/IEC 5962:2021 |
| SPDX 3.0 | Recent (2024); growing tooling | Profile-based: core + software + AI + dataset + build + security; JSON-LD primary |
When SPDX is the right format
SPDX 2.3 top-level structure (JSON)
{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "my-app-1.0.0-sbom",
"documentNamespace": "https://example.com/spdx/my-app/1.0.0",
"creationInfo": {
"created": "2026-05-06T12:00:00Z",
"creators": ["Tool: syft-1.16.0", "Organization: Acme Corp"]
},
"packages": [
{
"SPDXID": "SPDXRef-Package-myapp",
"name": "my-app",
"versionInfo": "1.0.0",
"downloadLocation": "NOASSERTION",
"filesAnalyzed": false,
"licenseConcluded": "Apache-2.0",
"licenseDeclared": "Apache-2.0"
},
{
"SPDXID": "SPDXRef-Package-lodash",
"name": "lodash",
"versionInfo": "4.17.20",
"downloadLocation": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"filesAnalyzed": false,
"licenseConcluded": "MIT",
"licenseDeclared": "MIT"
}
],
"relationships": [
{
"spdxElementId": "SPDXRef-DOCUMENT",
"relationshipType": "DESCRIBES",
"relatedSpdxElement": "SPDXRef-Package-myapp"
},
{
"spdxElementId": "SPDXRef-Package-myapp",
"relationshipType": "DEPENDS_ON",
"relatedSpdxElement": "SPDXRef-Package-lodash"
}
]
}Required fields per SPDX 2.3
Per spdx-spec (opens in new window):
| Field | Required? | Use |
|---|---|---|
spdxVersion | yes | Must be "SPDX-2.3" |
dataLicense | yes | "CC0-1.0" (CC0 - the SBOM data itself) |
SPDXID | yes | "SPDXRef-DOCUMENT" |
name | yes | Human-readable doc name |
documentNamespace | yes | Unique URI per BOM revision |
creationInfo.created | yes | ISO 8601 timestamp |
creationInfo.creators | yes | Tool / org / person who created |
packages[] | required for non-empty BOM | Inventory |
relationships[] | required (at least DESCRIBES) | Dep graph |
License expressions
SPDX is the canonical source for license identifiers (cross-format standard - even CycloneDX uses SPDX license IDs).
"licenseConcluded": "Apache-2.0",
"licenseConcluded": "MIT OR Apache-2.0",
"licenseConcluded": "(MIT AND BSD-3-Clause) OR GPL-2.0-only WITH Classpath-exception-2.0"Full list: spdx.org/licenses (current count ~600+).
The LicenseRef- prefix declares custom licenses:
"hasExtractedLicensingInfos": [{
"licenseId": "LicenseRef-AcmeProprietary",
"extractedText": "Acme Proprietary License Text..."
}],
"licenseConcluded": "LicenseRef-AcmeProprietary"Relationships
The relationships[] block is the dep-graph (SPDX equivalent of CycloneDX's dependencies[]):
| RelationshipType | Use |
|---|---|
DESCRIBES / DESCRIBED_BY | Document to top-level package |
DEPENDS_ON / DEPENDENCY_OF | Compile-time / runtime dep |
BUILD_DEPENDENCY_OF | Build-only dep |
DEV_DEPENDENCY_OF | Test/dev-only dep |
RUNTIME_DEPENDENCY_OF | Runtime-only dep |
OPTIONAL_DEPENDENCY_OF | Optional dep |
CONTAINS / CONTAINED_BY | Container to contained file/package |
GENERATED_FROM | Source-of-build |
STATIC_LINK / DYNAMIC_LINK | Linkage type |
Tag-Value format (SPDX-native)
Some toolchains use the SPDX Tag-Value format (older but well-tooled):
SPDXVersion: SPDX-2.3
DataLicense: CC0-1.0
SPDXID: SPDXRef-DOCUMENT
DocumentName: my-app-1.0.0-sbom
DocumentNamespace: https://example.com/spdx/my-app/1.0.0
Creator: Tool: syft-1.16.0
Creator: Organization: Acme Corp
Created: 2026-05-06T12:00:00Z
PackageName: my-app
SPDXID: SPDXRef-Package-myapp
PackageVersion: 1.0.0
PackageDownloadLocation: NOASSERTION
FilesAnalyzed: false
PackageLicenseConcluded: Apache-2.0
PackageLicenseDeclared: Apache-2.0
Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-myappJSON is preferred for new toolchains; Tag-Value persists for legacy integrations.
SPDX 3.0 profiles and the SPDX tooling landscape are cataloged in spdx3-profiles-and-tooling.md (opens in new window); for most teams, stay on SPDX 2.3 unless 3.0 features are required.
Validation
# Python spdx-tools
pip install spdx-tools
pyspdxtools --infile sbom.spdx.json --version SPDX-2.3
# Validates structural conformance + license-expression syntax
# Validation via spdx online tool
# Upload to https://tools.spdx.org/app/CI integration
jobs:
spdx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: anchore/sbom-action@v0
with:
format: spdx-json
output-file: sbom.spdx.json
- run: |
pip install spdx-tools
pyspdxtools --infile sbom.spdx.json --version SPDX-2.3
- uses: actions/upload-artifact@v4
with:
name: spdx-sbom
path: sbom.spdx.jsonWorked example
A team must deliver an SPDX 2.3 SBOM to a US Federal procurement consumer for an app that bundles one proprietary component:
Result: a validated SPDX 2.3 JSON SBOM whose custom license resolves cleanly and whose relationship graph satisfies the federal consumer's format requirement.
SPDX anti-patterns
| Anti-pattern | Why it fails | Fix |
|---|---|---|
Skip documentNamespace | Can't deduplicate across BOM revisions | Generate unique URI per BOM |
| Use SPDX 3.0 with consumer expecting 2.3 | Tooling incompat | Stick to SPDX 2.3 unless 3.0 required |
Manual license assignment without LicenseRef- for custom | License-expression validation fails | Use proper SPDX license ID or LicenseRef- |
Skip relationships[] (just packages) | No dep-graph; downstream tools degrade | Always include DESCRIBES + DEPENDS_ON |
| Mix Tag-Value + JSON in same workflow | Toolchain confusion | Pick one format per workflow |
SPDX limitations
Sources
Extended reference for the SPDX chapter of sbom-formats (see spdx.md (opens in new window)). See spdx.dev/specifications (opens in new window) for the source spec.
SPDX 3.0 profiles
SPDX 3.0 (2024 release) restructures into composable profiles:
| Profile | Use |
|---|---|
core | Minimum BOM model |
software | Software-specific extensions (approx. SPDX 2.3 packages) |
licensing | License identification + expressions |
security | Vulnerability + VEX statements |
ai | AI/ML models, datasets, hyperparameters |
dataset | Dataset-specific metadata |
build | Build provenance (similar to in-toto attestations) |
JSON-LD is the primary encoding; tooling support is growing but less mature than 2.3 as of 2026. For most teams, stay on SPDX 2.3 unless 3.0 features are required - 2.3 has broader tooling.
Tooling
| Tool | Use |
|---|---|
syft | Generates SPDX 2.3 (JSON / Tag-Value); cross-source |
spdx-tools | Reference impl (Python); validation + conversion |
spdx-tools-java | Java reference impl |
ORT (OSS Review Toolkit) | License compliance scanning + SPDX reporting |
spdx-sbom-generator | Per-language native generation |
tern | Container image SPDX generation |
Trivy | Cross-purpose scanner with SPDX output |