Repository navigation
Update MessagePack-CSharp to v3 - autoclosed - #1576
renovate[bot] wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Existing manually registered formatters need exclusions from v3’s automatic discovery to avoid compilation diagnostics.
1 open finding
What changed in this PR
Updates StreamJsonRpc’s MessagePack-CSharp dependencies to v3, including upstream security fixes.
Changes:
- Raises the shared MessagePack and MessagePackAnalyzer version from 2.5.305 to 3.1.11.
| File | Description |
|---|---|
| Directory.Packages.props | Updates the central MessagePack version. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> | ||
| <MicrosoftTestingPlatformVersion>2.5.1</MicrosoftTestingPlatformVersion> | ||
| <MessagePackVersion>2.5.305</MessagePackVersion> | ||
| <MessagePackVersion>3.1.11</MessagePackVersion> |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
## Description NuGet reports NU1902 for MessagePack 2.5.302, pulled in by StreamJsonRpc 2.25.29, and fails restores/builds that treat warnings as errors. Temporarily pin MessagePack to **2.5.307** to pick up the patched 2.x releases without independently forcing StreamJsonRpc onto MessagePack 3.x. - Add the central MessagePack version using the existing transitive-pinning mechanism. StreamJsonRpc remains **2.25.29**. - Add an explicit `MessagePack` reference in `Aspire.Hosting` so out-of-tree `ProjectReference` consumers also receive the patched minimum. A central transitive pin alone still allowed the generated AppHost in `MSBuildTests` to restore 2.5.302. - Both MessagePack and MessagePack.Annotations resolve to **2.5.307** for Hosting, CLI, and an out-of-tree AppHost project-reference consumer. The packed Hosting nuspec requires MessagePack **2.5.307**. - The package is already available on the approved `dotnet-public` feed; no feed, audit, warning, or test assertion changes are included. Related to #21050. **This interim mitigation does not resolve the issue.** When StreamJsonRpc releases with MessagePack 3.x, upgrade StreamJsonRpc and remove both the central version entry and the security-only Hosting reference. Prior Aspire changes: [#18155](#18155), its release backport [#18204](#18204), and the previous temporary pin [#20071](#20071). Upstream: [microsoft/vs-streamjsonrpc#1560](microsoft/vs-streamjsonrpc#1560) merged MessagePack 2.5.305; [microsoft/vs-streamjsonrpc#1571](microsoft/vs-streamjsonrpc#1571) proposes 2.5.307; [microsoft/vs-streamjsonrpc#1576](microsoft/vs-streamjsonrpc#1576) tracks the 3.1.11 upgrade. The latest released StreamJsonRpc remains 2.25.29. ### Validation Passed: ```bash ./restore.sh dotnet restore src/Aspire.Hosting.AppHost/Aspire.Hosting.AppHost.csproj --force-evaluate -warnaserror -p:NuGetAudit=true dotnet restore src/Aspire.Cli/Aspire.Cli.csproj --force-evaluate -warnaserror -p:NuGetAudit=true MSBUILDTERMINALLOGGER=false dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -p:SkipNativeBuild=true -- --filter-class '*.BackchannelJsonSerializerContextTests' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' MSBUILDTERMINALLOGGER=false dotnet pack src/Aspire.Hosting/Aspire.Hosting.csproj --no-restore -p:SkipNativeBuild=true -o artifacts/packages/messagepack-pin-validation ``` Repository restore: 0 warnings/errors. CLI backchannel tests: **29 passed**. Hosting package created successfully; its nuspec has the patched MessagePack minimum. A separate out-of-tree AppHost project-reference consumer also passed restore with `-warnaserror -p:NuGetAudit=true -p:NuGetAuditMode=all` against the unchanged repository NuGet configuration, resolving MessagePack/Annotations 2.5.307 and StreamJsonRpc 2.25.29. Failed / remaining validation blocker: ```bash MSBUILDTERMINALLOGGER=false dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -p:SkipNativeBuild=true -- --filter-method '*.CliBundleSetupFailureReportsAspire009WhenWarningsAreErrors' --filter-method '*.CliBundleSetupTimeoutReportsAspire009' --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' ``` Both setup diagnostic tests still fail before their expected ASPIRE009 assertion. A diagnostic rerun of the warnings-as-errors case confirms the MessagePack NU1902 failure is gone; its next blocker is existing MSB3277 assembly conflicts, including Google.Protobuf 3.31.1 versus 3.36.1 and YamlDotNet. Those unrelated version conflicts are not changed here. No full test suite was run. ### Security considerations This selects the published MessagePack 2.x security fixes, including [GHSA-qhrr-8q5h-9q3h](GHSA-qhrr-8q5h-9q3h) and subsequent fixes in [2.5.307](https://github.com/MessagePack-CSharp/MessagePack-CSharp/releases/tag/v2.5.307). It does not alter RPC formatters, trust boundaries, or suppress NuGet vulnerability auditing. No new threat model or security review was performed for this dependency pin. ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [ ] Yes - [x] No - Did you add public API? - [ ] Yes - If yes, did you have an API Review for it? - [ ] Yes - [ ] No - Did you add `<remarks />` and `<code />` elements on your triple slash comments? - [ ] Yes - [ ] No - [x] No - Does the change make any security assumptions or guarantees? - [x] Yes - If yes, have you done a threat model and had a security review? - [ ] Yes - [x] No - [ ] No Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25f67c97-c7d9-43c6-be44-a406e0bf1b17
df842ad to
a698e91
Compare
a698e91 to
31bff60
Compare
| <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled> | ||
| <MicrosoftTestingPlatformVersion>2.5.1</MicrosoftTestingPlatformVersion> | ||
| <MessagePackVersion>2.5.307</MessagePackVersion> | ||
| <MessagePackVersion>3.1.12</MessagePackVersion> |
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |


Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
2.5.307→3.1.122.5.307→3.1.12Release Notes
MessagePack-CSharp/MessagePack-CSharp (MessagePack)
v3.1.12What's Changed
New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.11...v3.1.12
v3.1.11Security fix
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.10...v3.1.11
v3.1.10Security fix
Other fixes
New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.9...v3.1.10
v3.1.9What's Changed
Security fix
7fd78bbOther fixes
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.8...v3.1.9
v3.1.8What's Changed
New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.7...v3.1.8
v3.1.7What's Changed
scopedtoMessagePackWriter.Write(ReadOnlySpan<T>)methods by @AArnott in #2271Security release details
This release fixes 3 high severity and 9 moderate severity security vulnerabilities.
High severity advisory fixes
26d4e74GHSA-382j-8mxh-c7x2 Reject invalid DateTime ext lengths for CWE-789b9cb605GHSA-vh6j-jc39-fggf Use iteration for skipping msgpack structures for CWE-674719e690GHSA-hv8m-jj95-wg3x Bound LZ4 input reads for CWE-125Moderage severity advisory fixes
2b5a500GHSA-v72x-2h86-7f8m Guard LZ4 decompression length for CWE-409f093bdcGHSA-qhmf-xw27-6rqr Reject nested typeless blocklist bypass for CWE-502f077798GHSA-2f33-pr97-265q Default MVC input formatter to UntrustedData for CWE-118825a3493GHSA-2x83-8g95-xh59 Limit untrusted ExpandoObject maps for CWE-407b414e6dGHSA-wfr3-xj75-pfwh Guard dynamic union depth for CWE-6740555f07GHSA-w567-gjr2-hm5j Validate Unity blit lengths for CWE-7899b5783aGHSA-cxmj-83gh-fp49 Fix CWE-789 multidimensional array allocation validationf96fcf0GHSA-q2h6-ghwm-5qm8 Use secure lookup comparer for CWE-407b3af7cfGHSA-cj9g-3mj2-g8vv Guard JSON conversion depth for CWE-67466ad089GHSA-cj9g-3mj2-g8vv Avoid JSON separator recursion for CWE-674082ba7dGHSA-cj9g-3mj2-g8vv Guard typeless JSON depth for CWE-674Fixes with no security advisory
fb0fe9fHonor TypeFormatter options hooks for CWE-470c1c06a6Fix WriteRawX methods to advance by written length46c6a0fFix CWE-190 map header length overflowFull Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.6...v3.1.7
v3.1.6What's Changed
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.5...v3.1.6
v3.1.5What's Changed
Fix Incorrect DateTimeOffset Serializer by @T0PP1ng in #2225New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.4...v3.1.5
v3.1.4What's Changed
GetMemoryCheckResultby @AArnott in #2172New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.3...v3.1.4
v3.1.3What's Changed
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.2...v3.1.3
v3.1.2What's Changed
CodeAnalysisUtilities.GetTypeParametersby @AArnott in #2123New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.1...v3.1.2
v3.1.1What's Changed
New Contributors
Full Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.1.0...v3.1.1
v3.1.0What's Changed
Int128,UInt128,Rune.OrderedDictionary<T, V>.ReadOnlySet<T>serialization supportFull Changelog: MessagePack-CSharp/MessagePack-CSharp@v3.0.301...v3.1.0
v3.0.300Fixed version, release notes see v3.0.3.
v3.0.3See our migration guide.
Details blog article
What's new
mpcis no longer available. Dynamic formatters still exist (for runtimes that support them), but code that compiles against v3 are unlikely to need them, resulting in better startup performance and improved debugging experience.DynamicObjectResolversupported.[MessagePackObject]types can serialize private members without the application having to switch toDynamicObjectResolverAllowPrivate.[ExcludeFormatterFromSourceGeneratedResolverAttribute].CompositeResolverAttributeoffers a faster runtime alternative to theCompositeResolverclass.Unity
.unitypackageWhat's Changed
ILookup<TKey, TElement>deserialized behavior by @AArnott in #1623[MessagePackFormatter]on parameters by @AArnott in #1678[MessagePackFormatter]on parameters" by @AArnott in #1679[MessagePackFormatter]on parameters and return values by @AArnott in #1680longtointtruncation of stream position by @AArnott in #1685[CompositeResolver]attribute that triggers source generation by @AArnott in #1754ExcludeFormatterFromSourceGeneratedResolverAttributeby @AArnott in #1824#ifregions related to unity by @AArnott in #1825[MessagePackObject]attribute for generic types by @AArnott in #1859partialmodifier required by @AArnott in #1893[MessagePackFormatter]on parameters and return values by @AArnott in #1901ExcludeFormatterFromSourceGeneratedResolverAttributeby suppressing certain warnings by @AArnott in #1907MessagePackSerializer.Typeless.Deserializeoverload that takesReadOnlyMemory<byte>by @AArnott in #1959CompositeResolverAttributemuch more useful by @AArnott in #1968partialrequirements by @AArnott in #2002scopedmodifier toinparameters ofref structby @AArnott in #2021IMessagePackFormatter<T>by @AArnott in #2022Configuration
📅 Schedule: (in timezone America/Los_Angeles)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.