Skip to content

[release/10.0.1xx] Fix vulnerable MessagePack and cryptography dependency resolutions - #56709

Merged
nagilson merged 2 commits into
dotnet:release/10.0.1xxfrom
nagilson:nagilson/fix-audit-release-10.0.1xx-20261019
Oct 23, 2026
Merged

nagilson merged 2 commits into
dotnet:release/10.0.1xxfrom
nagilson:nagilson/fix-audit-release-10.0.1xx-20261019

Conversation

@nagilson

Copy link
Copy Markdown
Member

Summary

Fix vulnerable dependency resolutions on release/10.0.1xx without changing the branch's NuGet audit policy or enabling transitive pinning in projects that deliberately disable it.

  • Update the central MessagePack pin from 3.1.7 to 3.1.9.
  • Explicitly reference System.Security.Cryptography.Pkcs 9.0.21 in ApiCompat.Task and PackageValidation, preserving their existing dependency major version, runtime asset exclusions, and private tool deployment behavior.
  • Add explicit Pkcs and Xml references in NetAnalyzers unit tests so the branch's existing patched central 10.0.14 versions apply.
  • Leave the ApiCompat toolset version override unset during source-build so central source-built package versions remain authoritative.

Public advisories: MessagePack, Pkcs, additional Pkcs advisory, and Xml.

Validation

  • Full sdk.slnx restore passed with NuGetAudit=true, NuGetAuditMode=all, and audit warning suppressions removed for validation only. Existing non-audit warning exclusions were retained.
  • Inspected restored assets: MessagePack 3.1.9; ApiCompat Pkcs 9.0.21; analyzer test Pkcs and Xml 10.0.14.
  • ApiCompat.Task and its project dependencies built for net8.0 and net472 with no warnings or errors.
  • AnalyzerRedirecting built successfully against MessagePack 3.1.9.
  • Evaluated both ApiCompat projects with DotNetBuildSourceOnly=true and confirmed that the new toolset version override is absent.
  • Product tests and a complete source-build were not run.

Note

AI-generated with GitHub Copilot.

Update MessagePack and explicitly patch crypto dependencies where transitive pinning is disabled, preserving source-build version selection.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: b1a28d6b-4aa7-402e-b26a-da4aac706919
Copilot AI balanced review requested due to automatic review settings October 19, 2026 20:32
@nagilson
nagilson requested review from a team as code owners October 19, 2026 20:32
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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

Published-task runtime behavior and complete source-build compatibility remain unvalidated and require human review.

No open issues 🎉

What changed in this PR

Updates vulnerable dependencies while preserving the branch’s audit policy, transitive-pinning settings, and source-build version selection.

Changes:

  • Raises MessagePack to 3.1.9.
  • Explicitly references Pkcs 9.0.21 in ApiCompat projects, except during source-build.
  • Adds analyzer-test cryptography references to use patched central versions.
File Description
src/​Microsoft.CodeAnalysis.NetAnalyzers/​tests/​Microsoft.CodeAnalysis.NetAnalyzers.UnitTests/​Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj Adds central-version Pkcs and Xml references.
src/​Compatibility/​ApiCompat/​Microsoft.DotNet.PackageValidation/​Microsoft.DotNet.PackageValidation.csproj Pins Pkcs while retaining runtime exclusions.
src/​Compatibility/​ApiCompat/​Microsoft.DotNet.ApiCompat.Task/​Microsoft.DotNet.ApiCompat.Task.csproj Pins Pkcs while retaining private deployment metadata.
eng/​Versions.props Defines the Pkcs toolset version.
Directory.Packages.props Updates the MessagePack central pin.

Review effort: Balanced

@nagilson
nagilson merged commit b6090c5 into dotnet:release/10.0.1xx Oct 23, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants