-
Notifications
You must be signed in to change notification settings - Fork 258
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
[Feature]: Make dotnet list package --vulnerable take the target framework into account #11786
Comments
Thank you for filing this issue. |
I mention that as a solution in the paragraph, but it's not good solution for reasons I describe in this discussion I also posted here today. |
There doesn't exist any field nor tooling to do this. It is a false positive but something we don't have much control over right now. I can talk to GitHub to see if we can add something like this in the future. It is best practice to regularly audit your dependencies and be on newer versions as time passes. While .NET may have a bias towards lowest applicable version, it puts you in a position where a future disclosed vulnerability may force you to update anyway. On the other end, updating always to the latest is subject to any active supply chain attacks. Ideally you should be on a recent version or even the latest version that is pinned and doesn't automatically update. |
That would be great. What does GitHub have to do with this, though? Isn't this something that would be good to have support for directly in
That is a perspective I hadn't considered. I'll respond to this and the rest of your comment in #11787 (reply in thread). |
@cmeeren We use the GitHub Advisory database as noted by your example advisory url. Many CVE/GHSA do not contain any informational fields such as an affected target framework, programming language version, runtime, and more. The only thing available is the description and package versions today which isn't enough to decipher. If we can better classify the advisories, then we could in theory build this feature. While some advisories do have custom fields, we would need a standard field that the larger process follows and is exposed via the advisory API. |
For transparency sake, I did talk to the GitHub Advisory team and mentioned this ask. They have heard similar across other ecosystems and it may be worth providing community feedback to their issue trackers: https://github.com/community/community#product-feedback |
I see the same
It detects correctly that the project targets
|
NuGet Product(s) Involved
dotnet.exe
The Elevator Pitch
(Sent here from dotnet/sdk#24193)
I did a scan using
dotnet list package --vulnerable --include-transitive
. I get the following:According to information linked from the advisory URL, this only affects some old .NET Core 1.x and 2.x runtimes. As you can see above, I'm using .NET 6. This false positive is therefore just noise that I have to filter out when scanning for vulnerable packages. This is particularly annoying when running on CI.
I could install the package directly to update it and get rid of the false positive, but with tens or hundreds of different projects with hundreds of transitive dependencies each, that won't scale. Another aspect is that this is a transitive dependency through
NETStandard.Library
(1.6.1 in my case), so I'm not sure if it should be updated at all. (NETStandard.Library
is a dependency ofMicrosoft.IdentityModel.Clients.ActiveDirectory
targetingnetstandard1.3
, which again is a dependency ofMicrosoft.Azure.Services.AppAuthentication
, which is a dependency ofdbup-sqlserver
, which is a direct dependency of mine.)Additional Context and Details
No response
The text was updated successfully, but these errors were encountered: