-
-
Notifications
You must be signed in to change notification settings - Fork 598
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
NuGet component with space breaks analyzer #3688
Comments
Similar issue was fixed for NPM in v4.11: #3456 |
I am interested in working on this one. Please assign me if possible. Thanks. |
Hi, thank you for your contribute. There is any new about this issue? |
Same problem here with Maven (https://repo1.maven.org/maven2/), NuGet (https://api.nuget.org/) and Python (https://pypi.org/). URLs passed to MetaAnalyzers do not get URL-encoded, so any URL with a space character ( Maven example:
NuGet example:
Python/PyPi example:
Note that in all We are currently using Thanks for listening! 🙂 |
The PURL specification requires URL encoding of special characters. However, when accessing individual parts of the PURL (say the package's name), you URL-decode to get the original value. Analyzers will decode the PURL in order to assemble repository URLs, whereas warning / error logs will simply use the entire PURL, that's the reason why you're seeing this difference.
Yes. I guess the original implementation assumed that PURLs would contain valid namespaces and names according to the respective ecosystem's conventions, but in the examples you shared that is clearly not the case. To my knowledge, neither Maven, nor Python, nor NuGet packages are allowed to contain spaces. We labeled this issue as |
PURLs containing special characters such as spaces could render the constructed repository URL invalid. Fixes DependencyTrack#3688 Signed-off-by: nscuro <[email protected]>
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. |
Current Behavior
A CDXJSON1.4 SBOM from an internal docker image was uploaded to DT 4.11. The SBOM contains a component which is a NuGet package. When analysis is attempted, an Illegal Character exception is thrown. I suspect that the space (%20) character is not being handled properly. Here is a sample section of the SBOM:
During the analysis, I saw the following error in the log:
Steps to Reproduce
Expected Behavior
Dependencytrack properly handles the analysis.
Dependency-Track Version
4.11.0
Dependency-Track Distribution
Container Image
Database Server
PostgreSQL
Database Server Version
No response
Browser
Apple Safari
Checklist
The text was updated successfully, but these errors were encountered: