Temporarily override Miniflare Sharp security advisory - #50
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sharp@0.34.5to patchedsharp@0.35.34.20260714.0and Wrangler4.112.0unchangednpm audit --audit-level=highgate instead of suppressing the advisoryTracks #49. Upstream supported resolution: cloudflare/workers-sdk#14493.
Qualification evidence
Windows x64 and Linux x64 Node 22:
npm cinpm ls sharp miniflare wrangler --allresolvessharp@0.35.3 overriddennpm audit --audit-level=highreports zero vulnerabilitiesnpm run checkpasses all 159 main-branch tests plus real workerd D1, bundled/local Worker, packed consumer, licensing, coverage, and readinessnpm run conformancepasses 490/490npm run conformance:earlwrites 490 passing assertionsWindows Node 24 also passed. An isolated cross-platform compatibility probe confirmed that Miniflare itself dynamically loaded the 0.35.3 native addon and transformed a known 4×3 PNG to a checked 3×2 WebP. This is override qualification, not an Images feature claim.
AVIF/HEIF boundary
No AVIF regression is claimed. Sharp 0.35 reports AVIF metadata as
heif, and pinned Miniflare lacks Cloudflare's corresponding mapping fix. Upstream #14493 updates the dependency and mapping together. Miniflare Images remain outside Diamond's supported package surface.Removal trigger
Remove this override and regenerate the lock as soon as a released Miniflare/Wrangler pair declares a non-vulnerable Sharp version and the unchanged audit, real-D1, Worker, packed-consumer, and W3C gates pass.
Strongest counterargument
Miniflare pins exactly 0.34.5 rather than a compatible range, so this override is outside upstream's tested contract. The risk is bounded to development tooling, qualified on the two CI operating-system families and supported Node lines, explicitly excludes Images/AVIF, and is temporary. Independent review should reject this PR if that evidence is not sufficient.