Skip to content

CycloneDX 2.0 - Modularize the specification into multiple schemas #636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stevespringett opened this issue May 6, 2025 · 0 comments
Open

Comments

@stevespringett
Copy link
Member

Proposal: Modularization of the CycloneDX JSON Schema

To improve maintainability and promote reuse across the CycloneDX specification, this proposal introduces a modular schema structure. The schema will be decomposed into individual files aligned with top-level BOM fields and high-composability objects.

Proposed Modules

  • cyclonedx-annotation-2.0.schema.json
  • cyclonedx-api-2.0.schema.json
  • cyclonedx-bom-2.0.schema.json
  • cyclonedx-common-2.0.schema.json
  • cyclonedx-component-2.0.schema.json
  • cyclonedx-composition-2.0.schema.json
  • cyclonedx-declarations-2.0.schema.json
  • cyclonedx-definitions-2.0.schema.json
  • cyclonedx-dependency-2.0.schema.json
  • cyclonedx-formulation-2.0.schema.json
  • cyclonedx-license-2.0.schema.json
  • cyclonedx-metadata-2.0.schema.json
  • cyclonedx-service-2.0.schema.json
  • cyclonedx-vulnerability-2.0.schema.json

Structural Principles

  • bom and api modules define BOM file and API contexts, respectively.
  • common contains reusable objects like OrganizationalEntity and ExternalReferences.

A GitHub workflow will be introduced to compile these modular schemas into a single monolithic schema using AJV, enabling $ref resolution and schema validation.


Benefits of Individual Schemas

Selective Adoption

Users can adopt only the schemas they need, e.g., component, license, or declarations, without requiring the entire BOM structure. This supports domain-specific tooling and integration.

Improved Maintainability

Smaller files mean easier updates, reviews, and debugging. Isolated changes reduce risk and improve version control granularity.

Enhanced Reusability

Common elements can be reused across schemas and even integrated into external ecosystems.

Supports APIs and Partial Payloads

APIs can validate and serve partial BOM fragments (e.g., only metadata or vulnerabilities) without relying on the full schema.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant