Cyclonedx external reference URLs are not validated when encoding #2079
Labels
bug
Something isn't working
format:cyclonedx
CycloneDX related enhancement or bug
good-first-issue
Good for newcomers
What happened:
When analyzing
docker.io/anchore/test_images:grype-quality-node-d89207b@sha256:f56164678054e5eb59ab838367373a49df723b324617b1ba6de775749d7f91d4
and outputing to cyclonedx I'm seeing values that are not valid URLs in theexternalReferences
section:Which results in invalid cyclonedx relative to the validator:
What you expected to happen:
URLs encoded should be compliant relative to where they were parsed, so for node cataloging https://github.com/jsdom/webidl-conversions/blob/master/package.json#L15 will result in a repository value of
jsdom/webidl-conversions
. For node, this should be interpreted asgithub.com/jsdom/webidl-conversions
, for other package types these assumptions might not be valid or have different assumptions that can be made about the URL.Ultimately
syft/syft/formats/common/cyclonedxhelpers/external_references.go
Line 15 in cfebae2
Environment:
Syft version v0.87.1
The text was updated successfully, but these errors were encountered: