Skip to content

[WIP] Update sharp npm package to fix security vulnerability - #3

Merged
Witching Hour Music and Art Collective (witchinghourartcollective) merged 1 commit into
mainfrom
copilot/update-sharp-npm-package
Sep 15, 2026
Merged

Witching Hour Music and Art Collective (witchinghourartcollective) merged 1 commit into
mainfrom
copilot/update-sharp-npm-package

Conversation

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Update the sharp npm package to version 0.35.4 or later to fix the GHSA-rgj7-g3m4-5g8c security vulnerability in the libheif dependency affecting this repository.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: fix all of these

Assistant: I'll help you fix these security advisories. Let me first get the details about this advisory.

Assistant: This advisory (GHSA-rgj7-g3m4-5g8c) affects the sharp npm package and involves vulnerabilities in the libheif dependency that could lead to remote code execution (RCE).

Key Details:

  • Severity: High (CVSS 8.9)
  • Affected: sharp versions prior to 0.35.4
  • Risk: Processing untrusted image files could trigger RCE on glibc-based Linux systems
  • Fix: Upgrade to sharp 0.35.4 or later

To fix this in your project:

  1. Update your dependencies:

    npm install sharp@latest
    # or
    npm install sharp@>=0.35.4
  2. Update your package.json if needed to ensure sharp is at version 0.35.4 or higher

  3. For Node.js protection: Ensure your Node.js executable is compiled as PIE (Position Independent Executable)

  4. As a temporary workaround if you can't upgrade immediately:

    sharp.block({ operation: ["VipsForeignLoadHeif"] });

Would you like me to help you identify which of your repositories use sharp and create pull requests to upgrade the dependency? I can search your account for projects with this vulnerability and automate the fixes.

User: i need all of these fixed https://github.com/advisories/GHSA-rgj7-g3m4-5g8c/dependabot?query=user%3AWitching-Hour-Music so yes

Assistant: Now let me search for repositories that have the sharp vulnerability (GHSA-rgj7-g3m4-5g8c):

Assistant: Now I found a repository with the vulnerable sharp package! Let me search more specifically for package.json files that might have sharp:

Assistant: Let me search for repositories with package.json files containing sharp:

Assistant: Now I'll create PRs to fix the vulnerable sharp packages. I found 3 repositories with sharp dependencies that need updating:

  1. Witching-Hour-Music/snap-7715-permissions - sharp@0.35.0 (needs 0.35.4+)
  2. Witching-Hour-Music/major-motion - sharp@^0.34.2 (needs 0.35.4+)

Let me create the fixes:

Assistant: I need your confirmation to proceed with fixing the vulnerabilities. I found 3 repositories in your account with the vulnerable sharp package:

  1. Witching-Hour-Music/snap-7715-permissions - Using sharp 0.35.0 (needs update to 0.35.4+)
  2. Witching-Hour-Music/major-motion - Using sharp 0.34.2 (needs update to 0.35.4+)
  3. Witching-Hour-Music/explorer - Using sharp as ignoredBuiltDependencies

Should I proceed with creating pull requests to upgrade all these repositories to sharp 0.35.4 or later?

User: Copilot Accepted Confirmation: Confirm cloud agent session

User: i need all 12 closed

Assistant: Let me check the Dependabot alerts by accessing the repositories directly. Based on the search results I found earlier, I identified the repositories with vulnerable sharp dependencies. Let me create pull requests to fix all of them:

User: Copilot Accepted Confirmation: Confirm cloud agent session

Assistant: I'm starting to fix these vulnerabilities. Based on your search, there are vulnerable sharp packages in multiple repositories. Let me create pull requests for all affected repos:

PR 1 - snap-7715-permissions: Updating sharp from 0.35.0 → 0.35.4+

PR 2 - major-motion: Updating sharp from 0.34.2 → 0.35.4+

Let me now create PRs for any additional repositories with vulnerable sharp versions. Can you clarify which specific 12 repositories need the fix? The URL you provided shows the dependabot alert page, but I need to identify all repos affected. From my search, I found:

  1. ✅ snap-7715-permissions (0.35.0)
  2. ✅ major-motion (0.34.2)
  3. explorer (has sharp in ignoredBuiltDependencies)

Could you provide the complete list of the 12 repositories that need fixing, or would you like me to search more comprehensively across all your organizations?

User: snap witching-hour-app exlporer major-motion nextjs cc6a8f95 witching-hour-platform chanfana

Assistant: Waiting for your confirmation to proceed with creating pull requests across all 8 repositories to fix the GHSA-rgj7-g3m4-5g8c sharp vulnerability.

Copilot AI lite review requested due to automatic review settings September 15, 2026 09:01
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

3 participants