.NET › Assemblies & NuGet
How do you audit a .NET project's dependencies for known security vulnerabilities using NuGet tooling?
AdvancedAnswer
`dotnet list package --vulnerable` (optionally with --include-transitive) scans all direct and transitive package references against the NuGet vulnerability database (sourced from GitHub Advisory Database) and reports any known CVEs with severity ratings, letting teams proactively identify and upgrade vulnerable dependencies before they become an incident, often integrated as a CI pipeline gate.
dotnet list package --vulnerable --include-transitive
# Output flags any package with a known CVE, e.g.:
# > System.Text.Json 6.0.0 : High severity - GHSA-xxxxReal-world example A CI pipeline fails the build automatically whenever `dotnet list package --vulnerable` reports a High or Critical severity vulnerability, preventing known-vulnerable dependencies from ever reaching a production deployment.