You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validate uploaded BOMs against CycloneDX schema #3218
Uploaded BOMs are currently not validated against the CycloneDX schema.
Users who upload (unknowingly) invalid BOMs only get to know about that fact when inspecting the logs of the API server. Further, error logs from the BOM parser can be hard to understand. Instead of spewing out gibberish error messages, it should be stated clearly if the BOM is invalid to begin with.
Proposed Behavior
Validate uploaded BOMs against the CycloneDX schema synchronously, as an additional step of handling upload requests.
Users and clients should know immediately if the uploaded file is invalid and has no chance of being ingested.
Note
There may be tools out there that generate BOMs that are valid JSON / XML, but not entirely schema conform. As a consequence, there will be users who will have to adjust / fix their tooling first. Dependency-Track should have an "escape latch" to disable validation for those users. However, validation should default to on.
Not all DT Users will have admin privileges or the knowledge about cyclonedx cli tool for further validation.
A general user should be able to get a toast notification that the BOM does not meet specification (and that is why the bom failed to upload).
Additionally, it would be helpful for non-admin users to be able to navigate within DT to upload the BOM to a specification validator, so that they may see where the problem resides and/or get output with this data.
If a 3rd party vendor, supplier, etc. provides a malformed SBOM, giving users the basic data of why and where the problem is would reduce time to remediation/analysis.
There's plenty of tools to handle sbom validation. Perhaps just a response from dependency track saying "Malformed CycloneDX SBOM". I wouldn't duplicate what other tooling is doing.
Activity
melba-lopez commentedon Feb 3, 2024
+1 on this.
If a 3rd party vendor, supplier, etc. provides a malformed SBOM, giving users the basic data of why and where the problem is would reduce time to remediation/analysis.
jhlmco commentedon Feb 3, 2024
There's plenty of tools to handle sbom validation. Perhaps just a response from dependency track saying "Malformed CycloneDX SBOM". I wouldn't duplicate what other tooling is doing.
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
Validate uploaded BOMs against CycloneDX schema
github-actions commentedon Apr 10, 2024
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Validate uploaded BOMs against CycloneDX schema