Skip to content

[Defect]: JS schema compile test does not include CycloneDX 2.0 schemas #837

@Mehrn0ush

Description

@Mehrn0ush

Describe the defect

tools/src/test/js/json-schema-lint-tests.js compiles and checks only schema/bom-*.schema.json (1.x) schemas.
CycloneDX 2.0 JSON schemas live under schema/2.0/ (e.g. schema/2.0/cyclonedx-2.0-bundled.schema.json) and are draft 2020-12, so they are currently not compiled/validated by the JS lint test.

As a result, npm run test:json-schema-lint provides no coverage that the 2.0 schema(s) are syntactically valid/compilable.

Steps to reproduce

From repo root:

cd tools/src/test/js
npm install
npm run test:json-schema-lint

Note

Separately, the current 1.x harness logic assumes single-digit bom-x.y versions and uses non-numeric comparison to decide strict mode. This does not affect existing bom-1.2bom-1.7 files, but could behave incorrectly for future multi-digit versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions