specification icon indicating copy to clipboard operation
specification copied to clipboard

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

Open Mehrn0ush opened this issue 9 months ago • 1 comments

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.2…bom-1.7 files, but could behave incorrectly for future multi-digit versions.

Mehrn0ush avatar Feb 21 '26 15:02 Mehrn0ush

fixed

jkowalleck avatar Sep 10 '26 16:09 jkowalleck