Togoder security

Glossary

What is CycloneDX?

Also called: CycloneDX SBOM, CDX, ECMA-424Updated

Definition

CycloneDX is an open standard from OWASP for describing the components of software: a bill of materials (BOM) format in JSON, XML or Protocol Buffers that lists each component with its version, package URL, hashes and license, the dependency graph between them and, optionally, known vulnerabilities. It is also published as the Ecma standard ECMA-424.

What a CycloneDX file contains

{
  "bomFormat": "CycloneDX",
  "specVersion": "1.6",
  "components": [
    {
      "type": "library",
      "name": "express",
      "version": "4.21.2",
      "purl": "pkg:npm/express@4.21.2",
      "licenses": [{ "license": { "id": "MIT" } }]
    }
  ],
  "dependencies": [
    { "ref": "pkg:npm/express@4.21.2", "dependsOn": ["pkg:npm/body-parser@1.20.3"] }
  ]
}
  • components: libraries, applications, containers and files, each identified by a package URL (purl) and hashes.
  • dependencies: which component needs which, so transitive dependencies can be traced.
  • vulnerabilities: known issues and their status (VEX: whether a vulnerability actually affects the product).
  • Besides software BOMs, the format also covers services, hardware, machine-learning models and cryptographic assets.

How to generate a CycloneDX SBOM

npm sbom --sbom-format cyclonedx > bom.json
npx @cyclonedx/cyclonedx-npm --output-file bom.json
cyclonedx-py environment > bom.json
cdxgen -o bom.json
syft dir:. -o cyclonedx-json > bom.json
trivy fs --format cyclonedx --output bom.json .

OWASP Dependency-Track is a common tool to store CycloneDX files and watch them for new vulnerabilities.

CycloneDX vs SPDX

CycloneDXSPDX
Maintained byOWASPLinux Foundation
StandardECMA-424ISO/IEC 5962
OriginSecurity toolingLicense compliance
Vulnerability data (VEX)Built inIn separate documents

Most generators write both, and both satisfy the common SBOM requirements. Use the one your customers or your tools ask for.

What a CycloneDX SBOM does not tell you

A BOM is an inventory. It says that express 4.21.2 is present, not what its code does. Matching the inventory against advisory databases (SCA) finds known vulnerabilities; a malicious package that nobody has reported yet passes. Togoder Security covers that gap by reading the source of each package in a lockfile.

Frequently asked questions

Is CycloneDX an ISO standard?

No. CycloneDX is an Ecma International standard, ECMA-424. SPDX is the ISO/IEC standard (ISO/IEC 5962).

Can npm generate a CycloneDX SBOM?

Yes. Run npm sbom --sbom-format cyclonedx in a project with a lockfile. The @cyclonedx/cyclonedx-npm package gives more control over the output.

CycloneDX or SPDX: which should I use?

Both are accepted for SBOM requirements. CycloneDX is more common in security tools and has vulnerability data built in; SPDX is more common for license compliance. Most tools can write either format.