Skip to content

fix(deps): resolve minimatch ReDoS vulnerability#482

Merged
CybotTM merged 1 commit intomainfrom
fix/dependabot-minimatch
Mar 1, 2026
Merged

fix(deps): resolve minimatch ReDoS vulnerability#482
CybotTM merged 1 commit intomainfrom
fix/dependabot-minimatch

Conversation

@CybotTM
Copy link
Member

@CybotTM CybotTM commented Mar 1, 2026

Summary

  • Add yarn resolutions to force minimatch >=9.0.7, resolving both Dependabot alerts:
    • #42 — minimatch ^10.2.1 via eslint (patched in 10.2.3)
    • #43 — minimatch ^9.0.5 via typedoc (patched in 9.0.7)
  • Resolved to minimatch@10.2.4 (covers both ranges)

Test plan

  • yarn test — 75 tests pass
  • yarn lint — clean
  • yarn build:lib — builds clean

Copilot AI review requested due to automatic review settings March 1, 2026 09:49
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 critical security vulnerabilities by updating the minimatch dependency to a patched version. By leveraging Yarn's resolution capabilities, the project ensures that all instances of minimatch across the dependency tree are upgraded, thereby mitigating potential ReDoS attacks and enhancing the overall security posture of the application.

Highlights

  • Security Vulnerability Resolution: Resolved two Dependabot alerts related to a ReDoS (Regular Expression Denial of Service) vulnerability in the minimatch package by enforcing a minimum version of minimatch >=9.0.7.
  • Dependency Version Pinning: Utilized Yarn's resolutions feature in package.json to explicitly set the required minimatch version, ensuring all sub-dependencies use the patched version.
  • Consolidated Dependencies: Updated yarn.lock to reflect the forced minimatch version 10.2.4, which covers the required ranges and consolidates previous minimatch, balanced-match, and brace-expansion entries.
Changelog
  • package.json
    • Added a resolutions field to enforce minimatch version >=9.0.7.
  • yarn.lock
    • Updated the minimatch dependency to version 10.2.4.
    • Consolidated multiple minimatch entries into a single, updated entry.
    • Removed outdated balanced-match and brace-expansion entries, which are now implicitly handled by the updated minimatch.
Activity
  • All 75 tests passed after the changes (yarn test).
  • The codebase remained clean after linting (yarn lint).
  • The library built successfully without errors (yarn build:lib).
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

@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 aims to resolve ReDoS vulnerabilities in the transitive dependency minimatch by adding a yarn resolution. My review identifies a significant risk with the current approach: it forces a major version upgrade on a transitive dependency (typedoc), which could lead to unexpected breakages. I've provided a comment explaining this risk and suggesting a safer alternative. I've also added a recommendation to pin the dependency version in the resolution for more deterministic builds.

Add yarn resolution to force minimatch >=9.0.7, resolving both
Dependabot alerts for ReDoS via multiple non-adjacent GLOBSTAR segments.
@CybotTM CybotTM force-pushed the fix/dependabot-minimatch branch from 4695fd8 to 71dfa82 Compare March 1, 2026 09:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses reported minimatch ReDoS vulnerabilities by forcing minimatch to a patched version via Yarn resolutions, updating the lockfile accordingly.

Changes:

  • Add a Yarn resolutions override for minimatch in package.json.
  • Update yarn.lock so minimatch resolves to 10.2.4 and removes now-unneeded transitive entries.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Adds resolutions to enforce a patched minimatch version.
yarn.lock Updates resolved minimatch version and related transitive dependency entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@CybotTM CybotTM merged commit 438ab10 into main Mar 1, 2026
10 checks passed
@CybotTM CybotTM deleted the fix/dependabot-minimatch branch March 1, 2026 10:29
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