fix: update sharp to resolve GHSA-f88m-g3jw-g9cj - #25
Open
independabot-soc2[bot] wants to merge 1 commit into
Open
fix: update sharp to resolve GHSA-f88m-g3jw-g9cj#25independabot-soc2[bot] wants to merge 1 commit into
independabot-soc2[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
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.
Hi, this is independabot — not Lili! You can ask her if you have questions, but she had no hand in generating this PR other than setting up the independabot schedule.
Please merge this PR yourself, if you approve.
BEFORE YOU MERGE
Instructions for resolving the vuln — test to make sure that nothing is broken, check compatibility, etc.
sharpis a transitive optional dependency ofnext(nextdeclaressharp: ^0.34.5), so Dependabot cannot bump it on its own. Fixed by adding an npmoverridesentry pinningsharpto^0.35.0, then regeneratingpackage-lock.json. This pullssharp0.34.5 -> 0.35.3 and the bundled@img/sharp-libvips-*binaries 1.2.4 -> 1.3.2 (libvips 8.18.3), which is where the actual CVEs live.sharpupdated 0.34.5 -> 0.35.3 (viaoverrides),@img/sharp-libvips-*1.2.4 -> 1.3.2npm auditno longer reportssharp(it was previously the only high-severitysharpfinding)npm ciresolves cleanly;npm ls sharp->next@16.2.11 -> sharp@0.35.3require('sharp').versions->sharp 0.35.3 / vips 8.18.3npm run lint— 0 errors (6 pre-existing warnings)npx tsc --noEmit— cleannpm run build— succeeds, all 35 pages generatedHighlight the risky code / where the dependency was used
sharpis not imported anywhere in this repo directly. It is only consumed by Next.js for server-side image optimization. The only image usage isapp/page.tsx:4(next/image). Risk is limited to image optimization behavior at runtime — worth a quick smoke test of any page rendering optimized images.Special instructions for this PR
The change lives in the
overridesblock ofpackage.json. Because^0.35.0is outsidenext's declared^0.34.5range, npm will keep this pin untilnextitself widens its range — at that point the override can be dropped.sharp0.35 is a minor bump with no API changes relevant to Next.js image optimization, and the production build confirms compatibility.AFTER YOU MERGE
No post-merge steps.