-
Notifications
You must be signed in to change notification settings - Fork 68
Enable NuGetAudit in SBRP #1016
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
Conversation
Contributes to dotnet/arcade#15019 Fixes dotnet/source-build#4577
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 this be backported to 9.0?
|
The PR is throwing a lot of errors for old packages. I'm not sure how to respond to these. I.e.
There is no patched System.Formats.Asn1 in the 7.0.x version range. |
|
@MichaelSimons how do you deal with CG reports for SBRP? |
These are not being reported by CG - the report is clean and these weren't dismissed. In the past whenever CGs are reported, we manually upgrade the references as illustrated by this PR. I don't recall a situation where CG reports an vulnerability where a package is not available. In general I view these vulnerabilities as not applicable in the context of reference packages. It would be nice to be able to disable them. The product repos are what are vulnerable and this repo is just a reflection of what the product repos reference. The caveat would be the infra structure within this repo should still have vulnerabilities flagged. |
Interesting. Any idea why NuGetAudit reports those vulnerabilities but CG doesn't? cc @zivkan
That should be possible by setting the |
I understand the reasoning for not wanting to alert for packages in src/referencePackages, but doing this will mean that dotnet/source-build#4577 does not get resolved with this PR. I still think that it's important to add some sort of safeguard from adding packages with vulnerabilities to SBRP. |
I don't know how CG works. In the past they used to look at NuGet's Global Packages Directory, but since NuGet's dependency resolver algorithm downloads packages that are culled from the final graph, I think they might have got so many complaints that they stopped doing that. So, my guess is that whatever technique they're using now might have gaps. NuGetAudit, on the other hand, looks at the final, resolved package graph (though it currently doesn't consider There might also be a difference in which advisories the two products consider. NuGetAudit uses whatever the audit source tells us, and nuget.org uses GitHub's Advisory Database. Maybe CG curate their vulnerability database differently. For example, System.* reference assembly only packages, maybe CG don't warn about. Just a guess, as some people call these packages "false positives", despite the fact that GitHub Advisory Database have defined those packages as vulnerable, and neither NuGet client, nor nuget.org try to hide. |
|
Got it, thanks for the input. Given that the build currently fails with 642 reported vulnerabilities I'm not sure how to make progress here. Also, I will be out for the next six weeks so I'm inclined closing this PR unless someone else would like to take it over. |
I don't see my team having bandwidth at the moment to help with this. Given there is no clear solution, I lean towards closing as well. |
Contributes to dotnet/arcade#15019 Fixes dotnet/source-build#4577
Also delete unused feeds.
Before merging, we should add this line to the repo's Directory.Build.props file: