-
Notifications
You must be signed in to change notification settings - Fork 579
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
3122 valid license url characters #3449
Conversation
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
cleanedURL = strings.TrimSpace(cleanedURL) | ||
|
||
// Step 3: Validate the cleaned URL | ||
_, err := url.ParseRequestURI(cleanedURL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we leave these in the core model but then filter them when encoding sbom specs that have specific requirements? That is, should we move this to the cyclonedx encoder? We could check for any similar requirement for SPDX and do the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best to clean it as early as possible in the process and get our own model's URL inline with the RFC 3987 IRI-reference
Signed-off-by: Christopher Phillips <[email protected]>
Signed-off-by: Christopher Phillips <[email protected]>
Description
This PR updates the license constructors to strip unwanted characters from URLs in license metadata and make sure all URLs conform to RFC 3987 IRI-reference.
Fix Validation
go run cmd/syft/main.go --output cyclonedx-json=file.json --verbose
The URL now listed for the
UserAgentUtils
should no longer have special characters in it as listed in the issue.Type of change
Checklist: