Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOM upload fails when externalReferences.url contains multiple URL entries #4506

Open
2 tasks done
saishivarcr opened this issue Jan 2, 2025 · 0 comments
Open
2 tasks done
Labels
defect Something isn't working in triage

Comments

@saishivarcr
Copy link

saishivarcr commented Jan 2, 2025

Current Behavior

When I upload a BOM(json format) containing two URLs separated by a space, as shown below, I encounter an error stating, "The uploaded BOM is invalid."

"externalReferences": [
                {
                    "url": "http://web.mit.edu/kerberos/www/ http://h5l.org",
                    "type": "distribution"
                }
            ]

Error

[DependencyTrack] {"status":400,"title":"The uploaded BOM is invalid","detail":"Schema validation failed","errors":["$.components[567].externalReferences[0].url: does not match the iri-reference pattern must be a valid RFC 3987 IRI-reference","$.components[567].externalReferences[0].url: does not match the iri-reference pattern must be a valid RFC 3987 IRI-reference","$.components[567].externalReferences[0].url: does not match the regex pattern ^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*$","$.components[567].externalReferences[0].url: does not match the iri-reference pattern must be a valid RFC 3987 IRI-reference","$.components[567].externalReferences[0].url: does not match the regex pattern ^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*#.+$"]}

Interestingly, the same BOM in XML format works without issues.

Steps to Reproduce

1.Attached sample BOM(json format) for issue reproduction.
sbom-1.json

Expected Behavior

Expecting BOM(json) upload to be successful as in case of XML BOM format.

Dependency-Track Version

4.7.x

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Google Chrome

Checklist

@saishivarcr saishivarcr added defect Something isn't working in triage labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working in triage
Projects
None yet
Development

No branches or pull requests

1 participant