Repository navigation
fix(build): pin patched System.Security.Cryptography.Pkcs for SqlClient consumers - #11497
Conversation
…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
There was a problem hiding this comment.
🔵 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.
Code coverage
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 |
…nt consumers (dotnet#11497) (cherry picked from commit 4d94a39) Upstream-PR: dotnet#11497 Upstream-Commit: 4d94a39
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.
Fixes #11494.
Problem
Restore fails NuGet audit (
NU1902/NU1903as errors) forOrleans.AdoNet.Tests,Benchmarks, andBenchmarks.AdoNet.Microsoft.Data.SqlClient(every release through 7.1.1) depends onSystem.Security.Cryptography.Pkcs8.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.Microsoft.Bcl.Cryptography9.0.21 are on nuget.org, but the repo's package feed proxy returns 404 for both. Pkcs 9.0.21 therefore usesMicrosoft.Bcl.Cryptography10.0.12, which requiresSystem.Formats.Asn110.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