cyclonedx-cli
cyclonedx-cli copied to clipboard
Improve JSON validation
Improve JSON validation, in particular if you don't specify the specification version.
This helps to address https://github.com/CycloneDX/cyclonedx-cli/issues/221.
On the given example, it will result in:
cyclonedx.exe validate --input-file badType_log4j_2.17.2_cyclonedx_1.3_sbom.json
Validation failed: Value is "boolean" but should be "string"
#/properties/dependencies/items/$ref/properties/ref/type
On instance: #/dependencies/0/ref:
True
Unable to validate against any JSON schemas.
BOM is not valid.
There are a couple of merge tests that fail due to the update of CycloneDX.Utils; however, they are unrelated to the changes in the validation.