Skip to content

[Snyk] Security upgrade eslint from 8.11.0 to 9.4.0#40

Open
earthiverse wants to merge 1 commit intomainfrom
snyk-fix-48f715c1f0300f989b76c987ac415b5b
Open

[Snyk] Security upgrade eslint from 8.11.0 to 9.4.0#40
earthiverse wants to merge 1 commit intomainfrom
snyk-fix-48f715c1f0300f989b76c987ac415b5b

Conversation

@earthiverse
Copy link
Owner

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json
  • package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
low severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-BRACEEXPANSION-9789073
  508  

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Regular Expression Denial of Service (ReDoS)

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.

Summary of Changes

Hello @earthiverse, 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 updates the project's eslint dependency to version 9.4.0 to fix a reported security vulnerability. This is a major version upgrade for ESLint, which involves significant changes to its internal dependencies and structure, as detailed in the lock file.

Highlights

  • Security Upgrade: This PR was automatically generated by Snyk to address a low-severity Regular Expression Denial of Service (ReDoS) vulnerability (SNYK-JS-BRACEEXPANSION-9789073) by upgrading the eslint dependency.
  • Major Version Bump: The eslint dependency is being upgraded from version 8.11.0 to 9.4.0. This is a significant major version jump and likely includes breaking changes and substantial internal restructuring, as reflected in the package-lock.json changes.
  • Dependency Updates: The upgrade of eslint necessitates updates and changes to numerous nested dependencies within package-lock.json, including core ESLint components and parsing libraries.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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 configureGemini 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, automatically generated by Snyk, upgrades eslint from v8.11.0 to v9.4.0 to address a security vulnerability (ReDoS in brace-expansion).

While the direct dependency update is straightforward, this is a major version upgrade for ESLint, which introduces significant breaking changes and requires careful attention:

  1. @typescript-eslint Compatibility: The most critical concern is the compatibility of your existing @typescript-eslint/eslint-plugin (^5.16.0) and @typescript-eslint/parser (^5.16.0) with ESLint 9. These versions are not officially compatible. You will likely need to upgrade them to typescript-eslint v6.x (which supports ESLint 9 with flat config) or v7.x (which fully supports ESLint 9). Without this, your TypeScript linting may break or behave unexpectedly.
  2. ESLint 9 Breaking Changes:
    • Configuration System: ESLint 9 defaults to the new "flat config" system (using eslint.config.js). If your project uses the legacy .eslintrc.* files, you may need to migrate your configuration or make adjustments.
    • Rule Changes: Some core rules may have been removed or changed.
  3. Node.js Version Requirement: ESLint 9 requires Node.js ^18.18.0 || ^20.9.0 || >=21.1.0. Please ensure your project's development and deployment environments meet this requirement. This is reflected in the updated package-lock.json.

Recommendations:

  • Upgrade @typescript-eslint: Before merging, or immediately after, update @typescript-eslint/eslint-plugin and @typescript-eslint/parser to versions compatible with ESLint 9.
  • Review ESLint Migration Guide: Consult the official ESLint migration guide for v9.
  • Thorough Testing: After addressing compatibility and configuration, run your linting tasks and full test suite to catch any issues.

This upgrade is important for security, but due to the major version jump, careful integration is necessary.

"@typescript-eslint/parser": "^5.16.0",
"copyfiles": "^2.4.1",
"eslint": "^8.11.0",
"eslint": "^9.4.0",

Choose a reason for hiding this comment

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

critical

The upgrade of ESLint to v9.4.0 is a major version change that introduces breaking changes and potential compatibility issues.

Key considerations for this update:

  1. @typescript-eslint Compatibility: The current versions of @typescript-eslint/eslint-plugin (^5.16.0) and @typescript-eslint/parser (^5.16.0) are not officially compatible with ESLint 9. These packages will likely need to be upgraded to typescript-eslint v6.x or v7.x to ensure proper functionality. Please verify compatibility and update these dependencies accordingly. This is crucial as Snyk's automated PR might not handle ecosystem dependencies.
  2. ESLint Configuration Changes: ESLint 9 defaults to a new flat configuration system (eslint.config.js). If your project uses the legacy .eslintrc.* format, you may need to migrate your configuration or make adjustments to ensure it works correctly with ESLint 9.
  3. Node.js Version Requirement: ESLint 9 has updated its Node.js version requirements to ^18.18.0 || ^20.9.0 || >=21.1.0. Ensure your project's development and CI/CD environments meet this new requirement.

After addressing these points, especially the @typescript-eslint upgrade, a full npm install (or equivalent) and thorough testing of your linting setup are highly recommended.

Comment on lines 1447 to 1497
"node_modules/eslint": {
"version": "8.11.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
"integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
"version": "9.4.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.4.0.tgz",
"integrity": "sha512-sjc7Y8cUD1IlwYcTS9qPSvGjAC8Ne9LctpxKKu3x/1IC9bnOg98Zy6GxEJUfr1NojMgVPlyANXYns8oE2c1TAA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint/eslintrc": "^1.2.1",
"@humanwhocodes/config-array": "^0.9.2",
"ajv": "^6.10.0",
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/config-array": "^0.15.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "9.4.0",
"@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.3.0",
"@nodelib/fs.walk": "^1.2.8",
"ajv": "^6.12.4",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
"debug": "^4.3.2",
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1",
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
"espree": "^9.3.1",
"esquery": "^1.4.0",
"eslint-scope": "^8.0.1",
"eslint-visitor-keys": "^4.0.0",
"espree": "^10.0.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^6.0.1",
"functional-red-black-tree": "^1.0.1",
"glob-parent": "^6.0.1",
"globals": "^13.6.0",
"file-entry-cache": "^8.0.0",
"find-up": "^5.0.0",
"glob-parent": "^6.0.2",
"ignore": "^5.2.0",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
"js-yaml": "^4.1.0",
"is-path-inside": "^3.0.3",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
"lodash.merge": "^4.6.2",
"minimatch": "^3.0.4",
"minimatch": "^3.1.2",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",
"regexpp": "^3.2.0",
"optionator": "^0.9.3",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
"text-table": "^0.2.0"
},
"bin": {
"eslint": "bin/eslint.js"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}

Choose a reason for hiding this comment

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

high

This package-lock.json update reflects the upgrade to ESLint 9.4.0 and its associated dependency changes.

A significant change to note within this block is the updated Node.js engine requirement for ESLint itself (line 1493: "node": "^18.18.0 || ^20.9.0 || >=21.1.0").

Please ensure that all development, testing, and deployment environments for this project are compatible with this Node.js version. Running on an older, incompatible Node.js version could lead to runtime errors or unexpected behavior with ESLint 9.

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