Skip to content

Fix NuGet audit failures blocking CI restore - #3870

Merged
RubenCerna2079 merged 1 commit into
mainfrom
dev/aaronburtle/fix-nuget-audit-vulnerabilities
Oct 20, 2026
Merged

RubenCerna2079 merged 1 commit into
mainfrom
dev/aaronburtle/fix-nuget-audit-vulnerabilities

Conversation

@aaronburtle

@aaronburtle aaronburtle commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Why make this change?

What is this change?

  • Directory.Packages.props: pin System.Security.Cryptography.Pkcs 9.0.21, bump MessagePack 2.5.301 -> 2.5.307, and bump Microsoft.OpenApi and Microsoft.OpenApi.Readers 1.6.14 -> 1.6.31 together.
  • Pkcs is only a transitive dependency, and central package management does not pin transitive versions without a reference. It is referenced from Config and Core, where Microsoft.Data.SqlClient enters the graph (Core also so the packed library declares it), and from Aspire.AppHost, whose restore graph does not include its project references.
  • No audit warnings are suppressed.

How was this tested?

  • Integration Tests
  • Unit Tests

Locally with the CI SDK (10.0.402) and real NuGet vulnerability data: replaying CI's restore and dotnet format --verify-no-changes reproduces the 22 errors on main and passes on this branch (0 audit errors, 0 of 791 files changed). Full solution Release and Debug builds, including Aspire.AppHost, have 0 warnings; the Release pack succeeds; the CI unit test filter passes (Service.Tests 3254/3254, Cli.Tests 629 passed, 3 ignored in source).

Sample Request(s)

  • N/A (package versions only).

New advisories make the implicit restore in the Unit Tests pipeline's
"Check formatting" step fail (NuGet audit warnings are errors):

- System.Security.Cryptography.Pkcs 9.0.11 (via Microsoft.Data.SqlClient
  6.1.5) and 9.0.4 (via Aspire.Hosting.SqlServer -> Microsoft.Data.SqlClient
  6.1.1): GHSA-2fmv-rv2c-59x7, GHSA-846f-f764-76mx. Pin 9.0.21.
- MessagePack 2.5.301 (Aspire.AppHost): GHSA-qhrr-8q5h-9q3h. Bump to 2.5.307.
- Microsoft.OpenApi.Readers 1.6.14 (Service.Tests): GHSA-7pxr-59rr-hqj2.
  Bump Microsoft.OpenApi and Microsoft.OpenApi.Readers to 1.6.31 together.

Pkcs is only a transitive dependency and central package management does
not pin transitive versions without a reference, so reference it from
Config and Core (where SqlClient enters the product graph; Core also so the
packed library declares it) and from Aspire.AppHost, whose restore graph
does not include its project references. No audit warnings are suppressed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Package availability and an audit-clean restore still require CI confirmation.

No open issues 🎉

What changed in this PR

Updates dependency pins and references to address NuGet security audit failures blocking CI restore, without suppressing audit warnings.

Changes:

  • Updates MessagePack and both OpenAPI packages to the specified patched versions.
  • Pins Pkcs centrally and adds direct references for product, packaging, and Aspire restore coverage.
File Description
src/​Directory.Packages.props Updates security-related package pins and explanatory comments.
src/​Core/​Azure.DataApiBuilder.Core.csproj Adds Pkcs as an explicit packed-library dependency.
src/​Config/​Azure.DataApiBuilder.Config.csproj Adds Pkcs to override the SqlClient transitive dependency.
src/​Aspire.AppHost/​Aspire.AppHost.csproj Adds Pkcs for Aspire’s separate restore graph.

Review effort: Balanced

@RubenCerna2079
RubenCerna2079 merged commit 01627a5 into main Oct 20, 2026
19 checks passed
@RubenCerna2079
RubenCerna2079 deleted the dev/aaronburtle/fix-nuget-audit-vulnerabilities branch October 20, 2026 18:32
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Data API builder Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working pipeline

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

NuGet audit errors (Pkcs, MessagePack, OpenApi.Readers) block the Unit Tests pipeline

5 participants