Skip to content

fix(http-client-csharp): patch playground container Brotli - #12440

Merged
JoshLove-msft merged 3 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft-patch-playground-image
Oct 29, 2026
Merged

JoshLove-msft merged 3 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft-patch-playground-image

Conversation

@JoshLove-msft

@JoshLove-msft JoshLove-msft commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Use the explicit Ubuntu Noble .NET SDK base for the playground server.
  • Run apt-get update and upgrade Ubuntu's libbrotli1 in a shared build/runtime base, without a hard-coded package-version assertion.
  • Keep the full SDK needed to run the generator.

Mitigation performed

Rebuilt with --pull --no-cache using ACR Tasks run cfpy, verified libbrotli1 is 1.1.0-2ubuntu0.1 (the Defender-reported fix for CVE-2026-111497), and pushed typespecacr.azurecr.io/csharp-playground-server:brotli-patch-20261029.

The only consumer found across accessible Azure resources was App Service csharp-playground-server in resource group typespec; it has no deployment slots. It was redeployed with an immutable digest reference:

State Image digest
Previous tag 7016045 (correlated with platform startup logs) sha256:963528d8bd5ed90111769f609cc40f359571bcaca142c8f4f91d20e20406bec3
Patched image (platform logs confirm pull, creation, and successful startup) sha256:e201597194a5eff3cec753c39f1dfe66396b7e945dece2aeeb5a64108cdcbfa2

Base image: mcr.microsoft.com/dotnet/sdk:10.0-noble@sha256:de4fe90a98845d75910b9769662465c84de1a934665c431279d1382b2bddc02b.

The subsequent removal of the hard-coded version assertion is source-only; no additional production rebuild or deployment was performed.

Verification and caveats

  • The deployed image was verified to contain the fixed Brotli package and the server and generator DLLs.
  • App Service logs show the exact patched digest was pulled and its startup probe succeeded at 2026-10-29T18:21:37Z; /health returns status: ok and generatorFound: true.
  • A sample /generate request returns the same ModelReaderWriterContextDefinition initialization error before and after the patch. This pre-existing functional failure is not fixed here; health endpoint success does not establish successful generation.
  • Historical vulnerable tags were not deleted or overwritten. Defender recommendation clearance requires a subsequent scan and has not been claimed.

Upgrade the Ubuntu SDK base's libbrotli1 in both build and runtime stages and require the fixed package version.

Co-authored-by: Copilot App <[email protected]>

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.

🟢 Approval recommended

The container-hardening change has no active review issues.

No open issues 🎉

What changed in this PR

Hardens the C# playground server container by upgrading Brotli in a shared SDK base used by both build and runtime stages.

Changes:

  • Selects the explicit Ubuntu Noble .NET 10 SDK image.
  • Upgrades libbrotli1 and fails the build unless its version is at least 1.1.0-2ubuntu0.1.
  • Retains the full SDK required to run the generator.
File Description
packages/​http-client-csharp/​playground-server/​Dockerfile Adds a shared Noble SDK base with a Brotli upgrade and minimum-version assertion.

Review effort: Balanced

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@12440

commit: f8e59b1

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

Keep the Brotli package upgrade without a hard-coded minimum version check.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 18:48

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.

🟢 Approval recommended

No active review issues block the Dockerfile’s shared SDK base and Brotli package update.

No open issues 🎉

Review effort: Balanced

Apply Prettier shell indentation and allow the Brotli package name in spell check.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 19:32

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.

🟢 Approval recommended

No active review issues are identified for the shared-base Brotli package update.

No open issues 🎉

Review effort: Balanced

@JoshLove-msft
JoshLove-msft added this pull request to the merge queue Oct 29, 2026
Merged via the queue into microsoft:main with commit 0ec1c31 Oct 29, 2026
30 checks passed
@JoshLove-msft
JoshLove-msft deleted the joshlove-msft-patch-playground-image branch October 29, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants