Skip to content

Conversation

@paulmedynski
Copy link
Contributor

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.props file about how to temporarily disable audit errors if they can't be addressed immediately.

@paulmedynski paulmedynski requested a review from a team as a code owner October 22, 2025 16:29
Copilot AI review requested due to automatic review settings October 22, 2025 16:29
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Oct 22, 2025
Copy link
Contributor

Copilot AI left a 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

@paulmedynski paulmedynski added this to the 7.0.0-preview3 milestone Oct 22, 2025
benrr101
benrr101 previously approved these changes Oct 22, 2025
Copy link
Contributor

@benrr101 benrr101 left a 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.

@paulmedynski
Copy link
Contributor Author

paulmedynski commented Oct 22, 2025

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
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.81%. Comparing base (37a9c99) to head (7e7d23e).
⚠️ Report is 9 commits behind head on main.

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     
Flag Coverage Δ
addons 90.82% <ø> (ø)
netcore 76.72% <ø> (-0.62%) ⬇️
netfx 76.16% <ø> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmedynski paulmedynski merged commit 0a39567 into main Oct 23, 2025
252 checks passed
@paulmedynski paulmedynski deleted the dev/paul/nuget-audit branch October 23, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants