Skip to content

fix: override transitive esbuild to resolve vulnerability#203

Merged
allenhutchison merged 1 commit intomainfrom
fix/esbuild-vulnerability
Feb 9, 2026
Merged

fix: override transitive esbuild to resolve vulnerability#203
allenhutchison merged 1 commit intomainfrom
fix/esbuild-vulnerability

Conversation

@allenhutchison
Copy link
Contributor

Summary

Test plan

  • npm ls esbuild shows 0.27.3 everywhere (no more 0.21.5)
  • npm audit reports 0 vulnerabilities
  • All 378 tests pass
  • Build succeeds

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @allenhutchison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical security vulnerability by upgrading a transitive esbuild dependency. It leverages npm's overrides feature to enforce a secure version of esbuild across the project, ensuring the application's dependency tree is free from known security risks.

Highlights

  • Security Vulnerability Resolution: This PR resolves a moderate severity Dependabot alert (chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.46.1 to 8.46.4 #9) concerning esbuild versions <= 0.24.2.
  • Dependency Override Implementation: An npm override has been introduced in package.json to force vite (a transitive dependency of vitepress) to use the root esbuild version ^0.27.2, which resolves to 0.27.3.
  • Vulnerable Path Identified: The specific vulnerable dependency path identified was [email protected][email protected][email protected].
  • Security Audit Status: Following this change, npm audit now reports zero vulnerabilities, confirming the fix.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • package.json
    • Added an overrides section to explicitly define the esbuild version used by vite within vitepress to resolve to the root esbuild version.
Activity
  • Verified that npm ls esbuild now consistently shows version 0.27.3 across all dependencies.
  • Confirmed that npm audit reports zero vulnerabilities after the change.
  • Ensured all 378 existing tests pass successfully.
  • Validated that the project build completes without any issues.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively resolves a moderate severity security vulnerability in the transitive dependency esbuild. The use of npm's overrides feature in package.json is the correct and modern approach for such issues. The implementation is targeted and maintainable by referencing the root esbuild version with $esbuild. The change is well-described and appears to be well-tested according to the pull request description. This is a solid contribution to improve the project's security posture.

@allenhutchison allenhutchison force-pushed the fix/esbuild-vulnerability branch from a9e878c to a5639b1 Compare February 8, 2026 20:27
vitepress → vite 5.x → [email protected] was flagged as a moderate
vulnerability (dependabot alert #9, fixed in esbuild >=0.25.0).

Add vite ^6.4.1 as a direct devDependency with an npm override to
ensure vitepress uses it instead of vite 5.x. Vite 6.x depends on
esbuild ^0.25.0, resolving the vulnerability.
Copy link
Contributor

@abhipatel12 abhipatel12 left a comment

Choose a reason for hiding this comment

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

LGTM!

@allenhutchison allenhutchison merged commit ceb5cf4 into main Feb 9, 2026
14 checks passed
@allenhutchison allenhutchison deleted the fix/esbuild-vulnerability branch February 9, 2026 15:53
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.

2 participants