-
Notifications
You must be signed in to change notification settings - Fork 253
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
NugetAudit is not consistent #13969
Comments
@AlbertoMonteiro If you'd like to discuss this furtner, please create an issue over at https://github.com/dotnet/sdk. GitHub only allows transfers of issues within the same org account, and NuGet reports only what it gets told about, and the .NET SDK changes NuGet's inputs depending on the command. You can verify this as NuGet saves the restore inputs in For example, do the following commands:
Depending on the CLI arguments, you might see a new + },
+ "runtimes": {
+ "linux-x64": {
+ "#import": []
+ } In other words, the .NET SDK wasn't previously telling NuGet about any RIDs, and now it is. One of the packages you're referencing has RID specific dependencies, and when the .NET SDK doesn't tell NuGet about any RIDs, NuGet doesn't resolve any RID package graphs, and therefore there's nothing more for NuGetAudit to check. You can mitigate this by explicitly setting the |
@zivkan for Is there some other way to make those commands know about this vulnerability? |
For I couldn't find an issue for Please add a 👍 reaction to it, as we use these upvotes as a signal to prioritize work |
Tyvm for you help, upvoted both linked issues! |
NuGet Product Used
dotnet.exe
Product Version
Worked before?
Just noticed in .NET 9, didn't tried in other versions
Impact
It's more difficult to complete my work
Repro Steps & Context
The issue is the different behavior of NugetAudit configured in the .csproj file when executing a
dotnet build
ordotnet publish
with the argument--self-contained true
.csproj config:
When the argument
--self-contained
is not used, the build completes successfully without any failures related to vulnerable packages.Example:
Command:
Output
However, when using the
--self-contained
parameter, the build returns messages regarding vulnerable packages.Command:
Output
I've created that repo that does have the behavior: https://github.com/AlbertoMonteiro/NugetAuditRepro
I've created github action that does some combinations of
dotnet build
https://github.com/AlbertoMonteiro/NugetAuditRepro/actions/runs/12075457777/job/33675284368
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: