-
Notifications
You must be signed in to change notification settings - Fork 0
fix: patch @eslint/plugin-kit ReDoS vulnerability (GHSA-xffm-g5w8-qvg7) #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a pnpm configuration block to package.json. It introduces an overrides entry mapping "@eslint/[email protected]" to "0.4.0". A comments.overrides note documents the rationale, referencing GHSA-xffm-g5w8-qvg7 (ReDoS) and indicating that "@eslint/[email protected]" is backward-compatible with "[email protected]". No other files or functional logic are changed. Pre-merge checks✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Add pnpm override to force @eslint/plugin-kit 0.2.8 → 0.4.0 - Resolves Dependabot alert #9 - All tests passing, no breaking changes Using override instead of updating eslint to avoid updating all other eslint dependencies. [email protected] uses @eslint/[email protected] (vulnerable), but 0.4.0 is backward compatible.
e289df7 to
c45eafa
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
package.json(1 hunks)
| "@eslint/[email protected]": "0.4.0" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Override pattern doesn't hit ESLint's dependency range.
[email protected] declares @eslint/plugin-kit with the range ^0.2.8, so pnpm will keep resolving 0.2.x. An override key of @eslint/[email protected] only matches requests that exactly require 0.2.8, meaning this override never fires and the vulnerable version stays in the tree. Please switch the key to cover the whole package (e.g. @eslint/plugin-kit: 0.4.0 or @eslint/plugin-kit@*: 0.4.0) so pnpm force-resolves the patched release.
Apply this diff:
- "overrides": {
- "@eslint/[email protected]": "0.4.0"
- },
+ "overrides": {
+ "@eslint/plugin-kit": "0.4.0"
+ },📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@eslint/[email protected]": "0.4.0" | |
| }, | |
| "overrides": { | |
| "@eslint/plugin-kit": "0.4.0" | |
| }, |
🤖 Prompt for AI Agents
In package.json around lines 20 to 21, the override key
"@eslint/[email protected]" only matches an exact version and therefore doesn't
override the ^0.2.8 range that eslint depends on; change the override key to
cover the package range (for example use "@eslint/plugin-kit": "0.4.0" or
"@eslint/plugin-kit@*": "0.4.0") so pnpm will force-resolve all requests for
@eslint/plugin-kit to the patched 0.4.0 release.
|
Closing this PR as it has been merged into #16. Both security fixes (brace-expansion and @eslint/plugin-kit) are now combined in a single PR for easier review and management. |



🔒 Security Fix
Resolves Dependabot alert #9: GHSA-xffm-g5w8-qvg7
📋 Summary
Fixes the Regular Expression Denial of Service (ReDoS) vulnerability in
@eslint/plugin-kitby using pnpm overrides to force the patched version:@eslint/plugin-kit:0.2.8→0.4.0✅🎯 Why pnpm Overrides?
This is the best solution because:
@eslint/plugin-kitwithout updating eslint or other dependenciespackage.json(+10 lines) andpnpm-lock.yaml(+21/-5 lines)📊 Vulnerability Details
CVE: GHSA-xffm-g5w8-qvg7
Severity: LOW (CVSS 4.0: 2.3)
Type: ReDoS in
ConfigCommentParser#parseJSONLikeConfigAffected:
@eslint/plugin-kit < 0.3.4Fixed in:
@eslint/[email protected]+The vulnerable regex pattern could cause quadratic runtime attacks leading to blocking execution and high CPU usage when processing specially crafted input.
📝 What Changed
{ "pnpm": { "overrides": { "@eslint/[email protected]": "0.4.0" }, "comments": { "overrides": { "@eslint/plugin-kit": "Security fix for GHSA-xffm-g5w8-qvg7..." } } } }Lock file changes:
@eslint/plugin-kitto 0.4.0@eslint/coredependency (used by plugin-kit)✅ Testing
@eslint/plugin-kitand its direct dependency updated