dotnet restore should report security vulnerabilities for shared assembly projects. #13708
Labels
Area:NuGetAudit
Functionality:Restore
Resolution:NeedMoreInfo
This issue appears to not have enough info to take action
Type:Feature
WaitingForCustomer
Applied when a NuGet triage person needs more info from the OP
NuGet Product(s) Involved
dotnet.exe
The Elevator Pitch
When a shared assembly has a vulnerability in one of its dependencies, it should be identified explicitly. Instead, the vulnerability is reported through the containing application with a link to the vulnerability.
The problem is the suggested fix leads the dev to fix the application with a PackageReference/explicit version instead of addressing the issue directly in the shared assembly and obfuscates the fact that other uses of hte shared assembly have the same vulnerability.
Additional Context and Details
I encountered the System.Private.Uri security vulnerability today after upgrading my VS installation when building a 'test application' for testing some Maui-base shared assemblies.
At first, I thought his was an issue with the VS upgrade, since I had been building the shared assemblies and all dependent applications over the previous few days without any issues.
Next, I thought there was an issue with the test application itself, so I added the PackageReference to it.
I then started running dotnet resolve against the dependent applications and started seeing the same issue for a number of the applications.
After researching the issue, I found this thread (dotnet/sdk#42651) and the suggestion to searching project.assets.json and found numerous applications had the same issue and eventually determined that the root cause was in one of my shared assemblies.
If dotnet resolve had identified the shared assembly in addition to, or instead of, the various application projects, it would have been much quicker to find the root cause. As it stands, I could have easily fixed on application only to discover it in others later.
The text was updated successfully, but these errors were encountered: