Skip to content

Get notified

Get an email when a new major security incident drops. No spam, unsubscribe any time.

Only used for pwn.watch incident emails. Protected by Cloudflare Turnstile.

Supply Chain & SBOM8 min read

CycloneDX vs SPDX SBOM Guide for SOC 2 and Supply-Chain Audits

Compare CycloneDX and SPDX Software Bill of Materials (SBOM) formats for SOC 2, enterprise security reviews, license compliance, PURL tracking, and CI automation with Syft and cdxgen.

// key takeaways

  • Choose CycloneDX for application security, vulnerability triage, VEX (Vulnerability Exploitability eXchange), and SaaS/container pipelines; choose SPDX when ISO/IEC 5962 compliance or legal license provenance is the primary driver.
  • Package URLs (PURLs like pkg:npm/vite@6.0.0 or pkg:pypi/numpy@2.1.0) are the universal glue that connects SBOMs to CVE feeds across languages.
  • Generate SBOMs from lockfiles and built container images in CI — never from unpinned manifests like package.json or requirements.in.
  • Audit copyleft licenses (GPL, AGPL, LGPL) at PR time alongside CVEs so enterprise due diligence never uncovers last-minute blockers.

CycloneDX vs SPDX: practical differences for engineering teams

Both CycloneDX and SPDX are mature, open JSON standards recognized by U.S. NTIA/CISA minimum SBOM guidelines and European Cyber Resilience Act (CRA) workflows. Most modern scanners — including Trivy, Grype, Syft, and the pwn.watch SBOM Viewer — read both formats cleanly, so the right choice depends on which workflow you optimize for first.

CycloneDX (stewarded by OWASP) was built from day one for security operations: compact schemas, first-class dependency graphs, native VEX/VDR vulnerability annotations, cryptographic bill of materials (CBOM), and ML/AI model metadata. SPDX (stewarded by the Linux Foundation and ratified as ISO/IEC 5962) grew out of open-source legal compliance and excels at granular file-level license expressions, copyright assertions, and formal procurement exchanges.

  • CycloneDX JSON: Lighter payloads, clean components[] + dependencies[] arrays, native services and vulnerability blocks — ideal default for engineering CI/CD and CVE response.
  • SPDX 2.3 / 3.0 JSON: Standard license expression grammar (e.g., MIT OR Apache-2.0), file-level SHA-256 verification, and widespread recognition among enterprise legal/procurement teams.
  • Practical tip: If a customer questionnaire asks for 'an SBOM in CycloneDX or SPDX', emit CycloneDX as your internal source of truth and generate SPDX on demand from the same Syft or Trivy invocation.

Why Package URLs (PURLs) are the backbone of fast CVE lookup

Before PURLs, matching an advisory string like 'openssl' or 'numpy' against a production manifest was notoriously error-prone: CPE dictionaries lagged behind npm, PyPI, Cargo, and OCI registries, producing false positives and missed transitive packages.

A PURL encodes ecosystem, namespace, package name, and exact resolved version in one unambiguous URI — for example pkg:npm/next@15.3.0, pkg:pypi/numpy@2.2.0, pkg:cargo/rustls@0.23.0, or pkg:apk/alpine/openssl@3.3.2-r0. When you inspect an SBOM in a local viewer or feed it into a vulnerability scanner, valid PURLs let you jump straight from a component row to the exact ecosystem tracker.

Generating accurate SBOMs in CI from lockfiles and images

An SBOM built only from top-level manifests misses 80–90% of your transitive dependency tree. Always generate SBOMs from resolved lockfiles (package-lock.json, pnpm-lock.yaml, bun.lock, uv.lock, Cargo.lock, flake.lock) or directly from the built OCI container image right after docker build.

Generate CycloneDX and SPDX SBOMs across JS, Python, Rust, Nix & Docker
# Container image -> CycloneDX JSON (includes OS packages + app deps)
syft registry:ghcr.io/org/app@sha256:... -o cyclonedx-json=sbom.cdx.json

# Same image -> SPDX JSON for enterprise/SOC 2 procurement packets
syft registry:ghcr.io/org/app@sha256:... -o spdx-json=sbom.spdx.json

# Polyglot repo lockfiles (npm, PyPI, Go, Cargo, NuGet) via OWASP cdxgen
npx @cyclonedx/cdxgen -o sbom.cdx.json .

# Rust or Nix closures
cargo cyclonedx --format json
nix run github:tiiuae/sbomnix -- .#default

Using SBOMs to pass SOC 2 and enterprise security reviews faster

During SOC 2 Type II audits and Fortune 500 vendor assessments, auditors rarely want a raw 40,000-line JSON dump without context. They want proof of three controls: you know every third-party component shipping to customers, you detect vulnerable or unmaintained versions continuously, and you enforce license boundaries (catching strong copyleft packages like AGPL or GPL in proprietary builds).

Attach signed SBOMs as release artifacts alongside container digests (for example via cosign attest), retain them per production release tag, and inspect them locally before shipping to customers so no internal private package names or stray devDependencies leak out.

// actionable engineering checklist

  • Emit CycloneDX JSON on every release build and container image

    Store the SBOM next to the artifact digest so incident responders can query historical releases immediately.

  • Verify every component carries a valid PURL and resolved version

    Missing PURLs or floating version ranges break automated CVE matching.

  • Flag copyleft and unknown licenses automatically in CI

    Catch GPL/AGPL/SSPL or unlicensed transitive packages before they reach production.

  • Strip dev-only test dependencies from customer-facing production SBOMs

    Separate runtime production dependencies from dev/test tooling to keep vulnerability queues accurate.

// connected pwn.watch tools & live trackers

Frequently Asked Questions

Should startups choose CycloneDX or SPDX if they only maintain one format?
Start with CycloneDX JSON for AppSec and CVE response — it is concise and supported by every major scanner — and rely on Syft or Trivy to export SPDX JSON whenever an enterprise buyer specifically requests SPDX.
Does an SBOM include vulnerabilities automatically?
No. An SBOM is an inventory of components and relationships. You pair the SBOM with a vulnerability scanner (Trivy, Grype, OSV-Scanner) or VEX document to track which CVEs affect those components.
How often should we regenerate SBOMs?
Regenerate automatically on every production build or container image publish, and rescan stored SBOMs daily against fresh CVE/KEV feeds even when no code changed.

Get an email when a new major security incident drops. No spam, unsubscribe any time.