.NET: Update GitHub.Copilot.SDK to 1.0.0-beta.2 to address NU1903#5697
.NET: Update GitHub.Copilot.SDK to 1.0.0-beta.2 to address NU1903#5697
Conversation
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/d9d91295-72ca-4a34-ac27-2b97ea1abcfe Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Pins a vulnerable transitive dependency (Nerdbank.MessagePack) via .NET Central Package Management to eliminate NU1903 failures caused by GitHub.Copilot.SDK’s transitive dependency graph.
Changes:
- Adds a central transitive pin for
Nerdbank.MessagePackto version1.1.62indotnet/Directory.Packages.props. - Documents the security motivation inline (GHSA-2cwq-pwfr-wcw3 /
NU1903).
|
We don't rely directly on (Happy to do it either way, so approving now, but wanted to raise awareness) |
|
(Sorry, wrong tab; did not mean to trigger merge queue) |
….MessagePack) Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/87766014-7331-4d2c-bf53-d59097d66021 Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Done in cf5b467 — upgraded
Switched approach in cf5b467 to upgrade |
Motivation and Context
GitHub.Copilot.SDK0.1.29 transitively pullsNerdbank.MessagePack1.0.2 (viaStreamJsonRpc), which has a known high severity vulnerability (GHSA-2cwq-pwfr-wcw3 — attacker-controlledstackallocin DateTime decoding causes a process-terminatingStackOverflowException, fixed in 1.1.62). This surfaces asNU1903errors and breaks the build underTreatWarningsAsErrors.Per review feedback, since we don't depend on
Nerdbank.MessagePackdirectly, the cleaner fix is to upgradeGitHub.Copilot.SDKitself rather than pin the transitive dependency — the newer SDK releases (1.0.0-beta.1/1.0.0-beta.2) no longer referenceStreamJsonRpc/Nerdbank.MessagePackat all.Description
GitHub.Copilot.SDKfrom0.1.29to the latest1.0.0-beta.2indotnet/Directory.Packages.props. Its only dependencies are nowMicrosoft.Extensions.AI.Abstractions,Microsoft.Extensions.Logging.Abstractions, andSystem.Text.Json, eliminating the vulnerable chain.Microsoft.Agents.AI.GitHub.Copilot, theAgent_With_GitHubCopilotsample, and the unit/integration tests to match the new SDK API:UserMessageDataAttachmentsItem/UserMessageDataAttachmentsItemFile→UserMessageAttachmentFileMcpLocalServerConfig(stdio) /McpRemoteServerConfig(http) →McpStdioServerConfig/McpHttpServerConfig(the explicitTypediscriminator is no longer needed)McpServersdictionary value type changed fromobjectto the newMcpServerConfigbase typePermissionRequestResult.Kindis now strongly typed:string→PermissionRequestResultKindenum (Approved/Rejected)Verified
dotnet buildsucceeds with 0 warnings/errors acrossnet8.0/net9.0/net10.0for the src project, unit tests, integration tests, and the sample. All 45 unit tests pass.Note: there is overlap with #5699 which performs the same SDK upgrade; either PR can supersede the other.
Contribution Checklist