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

fix(cyclonedx): trim non-URL characters #6801

Closed
knqyf263 opened this issue May 28, 2024 Discussed in #6224 · 2 comments · Fixed by #6952
Closed

fix(cyclonedx): trim non-URL characters #6801

knqyf263 opened this issue May 28, 2024 Discussed in #6224 · 2 comments · Fixed by #6952
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@knqyf263
Copy link
Collaborator

Description

Some advisories include invalid URLs, breaking CycloneDX.

e.g. https://github.com/andk/cpanpm/commit/9c98370287f4e709924aee7c58ef21c85289a7f0 (2.35-TRIAL)

The advisory contains the above string as a URL, so it should be their problem. However, we will trim the non-URL characters so that Trivy users are not disadvantaged by the problem.

Discussed in #6224

@knqyf263 knqyf263 added the kind/bug Categorizes issue or PR as related to a bug. label May 28, 2024
@knqyf263 knqyf263 added this to the v0.53.0 milestone May 28, 2024
@black-snow
Copy link

black-snow commented May 28, 2024

Excellent! I reported some bad URLs but without any echo so far. Any mitigation on our side would be a lifesaver.
ref: #6663

@RichieB2B
Copy link

Thanks for fixing this.
Just to make sure: trimming at the first non-URL character seems like the right solution, not URL-encoding them as #6790 suggests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

4 participants