Skip to content

fix(build): pin patched System.Security.Cryptography.Pkcs for SqlClient consumers - #11497

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-pkcs-nuget-audit-failures
Oct 14, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-pkcs-nuget-audit-failures

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Fixes #11494.

Problem

Restore fails NuGet audit (NU1902/NU1903 as errors) for Orleans.AdoNet.Tests, Benchmarks, and Benchmarks.AdoNet. Microsoft.Data.SqlClient (every release through 7.1.1) depends on System.Security.Cryptography.Pkcs 8.0.1 (net8.0) and 9.0.11 (net10.0), which are affected by GHSA-2fmv-rv2c-59x7 and GHSA-846f-f764-76mx, both published 2026-10-13. No SqlClient release references a patched Pkcs version yet.

Solution

Add central transitive pins in Directory.Packages.props. NuGet audit enforcement stays enabled.

  • net10.0: Pkcs 10.0.13, which has no dependencies on net10.0.
  • net8.0: Pkcs 9.0.21. The advisory's net8 patch, Pkcs 8.0.2, and Pkcs 9.0.21's minimum Microsoft.Bcl.Cryptography 9.0.21 are on nuget.org, but the repo's package feed proxy returns 404 for both. Pkcs 9.0.21 therefore uses Microsoft.Bcl.Cryptography 10.0.12, which requires System.Formats.Asn1 10.0.12, so those two are pinned as well.

After a full solution restore, these three packages appear only in the three test projects listed above. Packable source projects and their nuspecs are unaffected. When the feed mirrors Pkcs 8.0.2, the net8.0 pins can collapse to that single package.

Microsoft Reviewers: Open in CodeFlow

…nt consumers

Microsoft.Data.SqlClient depends on Pkcs 8.0.1 (net8.0) and 9.0.11 (net10.0), which are affected by GHSA-2fmv-rv2c-59x7 and GHSA-846f-f764-76mx and fail NuGet audit during restore.

Fixes dotnet#11494
Copilot AI balanced review requested due to automatic review settings October 14, 2026 15:04

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

Clean audited restores for both target frameworks and compatibility of the cross-major net8.0 dependencies remain unverified.

0 open findings

What changed in this PR

Addresses SqlClient-related NuGet audit failures by centrally pinning patched cryptography dependencies without disabling audit enforcement.

Changes:

  • Pins Pkcs 9.0.21 by default and 10.0.13 for net10.0.
  • Adds supporting cryptography dependency pins for the net8.0 feed workaround.
File Description
Directory.Packages.props Adds patched Pkcs and supporting transitive dependency pins.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 83.46% (118,604 / 142,103)
Branches 73.03% (35,281 / 48,308)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 8a48ca2, not current main bdc6d4f.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

@ReubenBond
ReubenBond merged commit 4d94a39 into dotnet:main Oct 14, 2026
94 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-pkcs-nuget-audit-failures branch October 14, 2026 16:18
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
…nt consumers (dotnet#11497)

(cherry picked from commit 4d94a39)

Upstream-PR: dotnet#11497
Upstream-Commit: 4d94a39
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
Backport the approved MessagePack and framework-specific Pkcs pins from dotnet#11519 and dotnet#11497. These remove the normal NuGet audit blockers (dotnet#11518 and dotnet#11495) on this older author head without changing package sources, weakening audit enforcement, or importing the broader main integration conflicts.
ReubenBond added a commit that referenced this pull request Oct 23, 2026
…nt consumers (#11497)

(cherry picked from commit 4d94a39)

Upstream-PR: #11497
Upstream-Commit: 4d94a39
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: investigate Pkcs NuGet audit failures blocking provider restores

2 participants