[Aikido] Fix security issue in sharp via minor version upgrade from 0.34.5 to 0.35.3 - #17
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.
The search results show that:
Sharp is present only as a transitive dependency (through Astro) in
package-lock.jsonNo source code files (
.astro,.ts,.tsx,.js,.jsx) import or use sharp directlyNone of the deprecated features (
failOnError,paletteBitDepth, deprecatedsharpenproperties,jp2kformat) are used in the codebaseThe Node.js version requirement change (from >=18 to >=20.9.0) is compatible with the project's existing requirements, as Astro already requires Node.js 18.20.8 || ^20.3.0 || >=22.0.0
Since sharp is only used internally by Astro for image optimization and the codebase doesn't directly interact with sharp's API, the upgrade should not cause any issues.
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: upgrade
sharptransitive dependency to patched versionsharpby bumping its parentastroin the rootpackage.json.package-lock.json) is updated to reflect the new resolved versions ofastroandsharp.sharp
sharpis an optional transitive dependency pulled in byastro; it is not declared directly in the project'spackage.json. The installed version0.34.5is vulnerable under GHSA-f88m-g3jw-g9cj; the fix requires>= 0.35.0. Theastro@5.xseries constrainssharpto^0.34.0, making it impossible to resolve a patchedsharpwithout first upgradingastro. The declared spec forastroin the rootpackage.jsonwas therefore bumped from^5.7.10to^7.0.4— the firstastromajor line that widens itssharprange to^0.34.0 || ^0.35.0— allowing npm to resolvesharpto0.35.3after a lockfile refresh.Version changes
astro^5.7.10(resolved5.18.1)^7.0.4(resolved7.2.1)sharpresolutionsharp0.34.50.35.3astro