Skip to content

Replace ImageSharp with Apache-licensed Magick.NET - #1235

Merged
Shane32 merged 1 commit into
masterfrom
codex/replace-imagesharp
Nov 30, 2026
Merged

Shane32 merged 1 commit into
masterfrom
codex/replace-imagesharp

Conversation

@Shane32

@Shane32 Shane32 commented Nov 22, 2026

Copy link
Copy Markdown
Member

Replace SixLabors.ImageSharp 2.1.11 in the upload sample with Magick.NET-Q8-AnyCPU 15.1.0, which uses the Apache 2.0 license. This removes the vulnerable ImageSharp dependency that prevents solution restore when vulnerability warnings are treated as errors.

Preserve the upload mutation's 90-degree clockwise rotation and base64-encoded JPEG response, using Magick.NET's asynchronous stream reads and writes with the existing cancellation token. Magick.NET bundles native runtime assets; it does not require a separate ImageMagick installation.

Replace the encoder-specific JPEG snapshot with tests that decode the response and verify its format, swapped dimensions, and rotated colors for both JPEG and PNG uploads. Keep the existing invalid-media-type test.

Validation:

  • Full solution restore succeeds.
  • All 3 upload sample tests pass on .NET 8.
  • NuGet reports no known vulnerable direct or transitive packages for the upload sample.
  • dotnet format --no-restore --verify-no-changes --severity warn and git diff --check pass.

@Shane32 Shane32 self-assigned this Nov 22, 2026
@Shane32

Shane32 commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

SixLabors.ImageSharp v2 (the open-source version) isn't being updated to fix latest vulnerabilities anymore.

@Shane32
Shane32 merged commit 92d5540 into master Nov 30, 2026
10 checks passed
@Shane32
Shane32 deleted the codex/replace-imagesharp branch November 30, 2026 13:20
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.

2 participants