Skip to content

Cherry-Pick: Fix NuGet audit failures blocking CI restore - #3887

Open
RubenCerna2079 wants to merge 1 commit into
release/2.1from
dev/rubencerna/cherry-pick-upgrade-nugets
Open

RubenCerna2079 wants to merge 1 commit into
release/2.1from
dev/rubencerna/cherry-pick-upgrade-nugets

Conversation

@RubenCerna2079

@RubenCerna2079 RubenCerna2079 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Why make this change?

What is this change?

Cherry-picked PR:

How was this tested?

This is a cherry-pick it was already tested when it was first merged.

Sample Request(s)

N/A

## Why make this change?

- Closes #3871
- New NuGet advisories for System.Security.Cryptography.Pkcs,
MessagePack and Microsoft.OpenApi.Readers make the implicit restore in
the Unit Tests pipeline's "Check formatting" step fail with 22 audit
errors, blocking every PR to `main`.
  - Related: draft #3867 (overlapping version bumps).

## 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
- [x] 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).

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.

🟢 Approval recommended

No active review issues are reported for the dependency updates targeting NuGet vulnerability audit failures.

No open issues 🎉

What changed in this PR

Cherry-picks #3870 to address NuGet vulnerability audit failures blocking CI restore, without suppressing audit warnings.

Changes:

  • Updates MessagePack to 2.5.307 and both OpenAPI packages to 1.6.31.
  • Pins System.Security.Cryptography.Pkcs to 9.0.21 and adds explicit references so the patched dependency applies to Config, Core packaging, and Aspire.AppHost.
File Description
src/​Directory.Packages.props Sets patched package versions and documents the relevant advisories.
src/​Core/​Azure.DataApiBuilder.Core.csproj Adds a Pkcs reference to preserve the patched dependency in the packed library.
src/​Config/​Azure.DataApiBuilder.Config.csproj Adds a Pkcs reference to override SqlClient’s transitive dependency.
src/​Aspire.AppHost/​Aspire.AppHost.csproj Adds a Pkcs reference for Aspire’s separate dependency graph.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Cherry-pick Nuget Package Fix

5 participants