[Aikido] Fix security issue in sharp via minor version upgrade from 0.34.5 to 0.35.3 - #12
Open
aikido-autofix[bot] wants to merge 1 commit into
Open
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.
Upgrade sharp to fix high-severity vulnerabilities in libvips affecting GIF, TIFF, and VIPS image processing.
✅ Code not affected by breaking changes.
✅ No breaking changes from the sharp upgrade affect this codebase. While sharp is listed as an optional dependency of Astro, there is no direct usage of sharp in the codebase - no imports, no method calls to sharp's API, and no configuration using sharp-specific features. Additionally, the project already requires Node.js >= 22.12.0 (per Astro's requirements), which exceeds sharp 0.35.0's new minimum requirement of Node.js >= 20.9.0. None of the deprecated features (
failOnError,paletteBitDepth, deprecatedsharpenproperties, orjp2kformat) are used in the codebase.All breaking changes by upgrading sharp from version 0.34.5 to 0.35.3 (CHANGELOG)
installscript frompackage.jsonfile. Compiling from source is now opt-in via thebuildscript.iqquality metrics.limitInputChannelswith a default value of 5.failOnErrorconstructor property.paletteBitDepthfrommetadataresponse.sharpenoperation.format.jp2kasformat.jp2for API consistency.✅ 1 CVE resolved by this upgrade
This PR will resolve the following CVEs:
🤖 Remediation details
Fix GHSA-f88m-g3jw-g9cj: bump
sharptransitive dependency to patched versionShort summary
This PR fixes a high-severity vulnerability in the
sharpimage-processing package by upgrading it from0.34.5to0.35.3. Becausesharpis a transitive optional dependency (not a direct dependency), the fix required bumping the parentastroto a major version that widens itssharprange to include^0.35.0, followed by a lockfile refresh to resolvesharpto the patched version. Changes affectpackage.json(declaredastroversion spec) andpackage-lock.json(resolved versions ofastro,sharp, and related transitive packages).sharp
sharpis pulled in as an optional transitive dependency ofastroand was not directly declared inpackage.json. The installed version0.34.5falls within the vulnerable range; the fix requires>= 0.35.0. Theastro@5.xseries pinssharpto^0.34.0, which cannot resolve to0.35.x, so a parent bump was necessary.astrowas updated inpackage.jsonfrom^5.7.10to^7.0.4— the firstastrorelease that declaressharp: "^0.34.0 || ^0.35.0"— allowingnpm update sharp --package-lock-onlyto resolvesharpto0.35.3, satisfying the patched version requirement.Version changes
astro^5.7.10(resolved5.18.1)^7.0.4(resolved7.2.1)sharprange to include^0.35.0sharp0.34.50.35.3astro