Uploading an sbom file through the rest API has stopped working and it is returning: {"status":400,"title":"The uploaded BOM is invalid","detail":"Unable to determine schema version from JSON"}.
We've verified through multiple sources that the SBOM file is valid. Trying to upload it directly through the UI gives the exact same error (pic).
What is really interesting though that when json properties: serialNumber, version, $schema, bomFormat, specVersion are moved to the top of the sbom file, then everything works smoothly. (files available in Steps to Reproduce section)
The SBOM file is generated using cyclonedx-python and we've never encountered such issue.
Steps to Reproduce
Upload sbom_original.json using rest api / UI
Get error: Unable to determine schema version from JSON
OR
Upload sbom_properties_moved.json using rest api / UI
Sbom file is succesfully uploaded and we see components, services, dependency graph etc.
Current Behavior
Uploading an sbom file through the rest API has stopped working and it is returning:
{"status":400,"title":"The uploaded BOM is invalid","detail":"Unable to determine schema version from JSON"}
.We've verified through multiple sources that the SBOM file is valid. Trying to upload it directly through the UI gives the exact same error (pic).
What is really interesting though that when json properties:
serialNumber, version, $schema, bomFormat, specVersion
are moved to the top of the sbom file, then everything works smoothly. (files available inSteps to Reproduce
section)The SBOM file is generated using cyclonedx-python and we've never encountered such issue.
Steps to Reproduce
sbom_original.json
using rest api / UIUnable to determine schema version from JSON
OR
sbom_properties_moved.json
using rest api / UIsbom_properties_moved.json sbom_original.json
Expected Behavior
The sbom file is uploaded without us having to move the json properties to the top of the file.
Dependency-Track Version
4.11.0
Dependency-Track Distribution
Container Image
Database Server
N/A
Database Server Version
No response
Browser
N/A
Checklist