Repository navigation
[.NET] Fail CI on known-vulnerable NuGet packages - #308
Merged
Tim Taylor (timtay-microsoft) merged 3 commits intoOct 8, 2026
Merged
Conversation
- dotnet/eng/check-vulnerable-packages.sh: restores every .csproj under dotnet/ (including projects outside Project.slnx) and fails if `dotnet list package --vulnerable --include-transitive` reports any advisory. - ci-dotnet-vulnerable-packages.yml: runs it on PRs that touch dotnet/, pushes to main, and daily. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
September 29, 2026 19:54
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused workflow and script correctly implement the described vulnerability gate with appropriate failure handling and coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds a dedicated CI security gate for vulnerable direct and transitive NuGet dependencies.
Changes:
- Adds a script that restores and audits all 14 .NET projects.
- Adds PR, main-branch, daily, and manual workflow triggers.
| File | Description |
|---|---|
dotnet/eng/check-vulnerable-packages.sh |
Audits all .csproj dependencies and reports vulnerabilities. |
.github/workflows/ci-dotnet-vulnerable-packages.yml |
Runs the vulnerability audit in CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Tim Taylor (timtay-microsoft)
approved these changes
Sep 29, 2026
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 8, 2026 18:56
View session
Copilot started reviewing on behalf of
Ewerton Scaboro da Silva (ewertons)
October 8, 2026 19:13
View session
Tim Taylor (timtay-microsoft)
deleted the
ewertons/dotnet-vulnerable-packages
branch
October 8, 2026 19:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fails CI when a .NET project references a NuGet package with a known vulnerability, including transitive packages.
dotnet/eng/check-vulnerable-packages.sh.csprojunderdotnet/, including the 5 projectsProject.slnxdoes not list.dotnet list package --vulnerable --include-transitive --format jsonand fails, listing package, version, severity and advisory, if anything is reported.ci-dotnet-vulnerable-packages.ymldotnet/(samechangesjob pattern as the other workflows), pushes tomain, daily at 13:00 UTC (new advisories apply to unchanged code), and manual dispatch.Relation to the other checks:
Validation (local, .NET SDK 10.0.401)
main: no known vulnerable packages in 14 projects (exit 0).System.Text.RegularExpressions 4.3.0added to a sample: reportsHigh https://github.com/advisories/GHSA-cmhx-cq75-c4mjand exits 1. Reverted.