-
Notifications
You must be signed in to change notification settings - Fork 317
Enable NuGet audit on all builds #3713
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
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.
Pull Request Overview
This PR enables NuGet package vulnerability auditing on all builds by removing previous audit disabling configurations and establishing a consistent audit policy. Previously, auditing was disabled for official builds and test projects, but now all builds will fail if vulnerable dependencies are detected.
Key Changes:
- Removed all
<NuGetAudit>false</NuGetAudit>settings that disabled auditing in test projects and tools - Switched from custom nuget.org audit source to using the CFS audit source from the main package feed
- Added comprehensive documentation about NuGet audit settings and temporary workarounds for vulnerabilities
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/GenAPI/Directory.Build.props | Removed audit disabling for GenAPI tool |
| src/Microsoft.Data.SqlClient/tests/Directory.Build.props | Removed audit disabling for test projects |
| src/Directory.Build.props | Centralized audit configuration with explicit enabling and documentation |
| NuGet.config | Removed custom audit source configuration to use default CFS source |
….org as an audit source.
1b2a45c to
bbaedd4
Compare
benrr101
left a comment
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.
Looks good to me. Only request is to make sure to run an (un)official mds and akv pipeline (especially akv) in ADO before merging. The official pipelines use the onebranch template that has the restrictive network rules that necessitated the original changes to disable auditing in official builds. The issues didn't come up until I rewrote the akv pipelines, since the mds pipeline is grandfathered into allowing blocked connections to, eg, nuget.org.
|
ADO.net project non-official builds are here (can't to official builds from a topic branch): MDS: https://sqlclientdrivers.visualstudio.com/ADO.Net/_build/results?buildId=127989 AKV: https://sqlclientdrivers.visualstudio.com/ADO.Net/_build/results?buildId=127988 |
…ady exists on 1ES images, and some builds aren't allowed to download it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3713 +/- ##
==========================================
- Coverage 77.35% 76.81% -0.55%
==========================================
Files 271 272 +1
Lines 45123 45337 +214
==========================================
- Hits 34907 34824 -83
- Misses 10216 10513 +297
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
We are now performing implicit NuGet audits on all builds (developer, PR, CI, official, etc). Any vulnerabilities detected will fail the build.
I also removed our custom audit source, and we will now be using the CFS audit source from the same feed we get our dependencies from.
I left some comments in the main
Directory.Build.propsfile about how to temporarily disable audit errors if they can't be addressed immediately.