Skip to content

[Snyk] Security upgrade electron from 11.5.0 to 37.2.5 #568

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"cross-spawn": "^5.0.1",
"electron": "^11.1.0",
"electron": "^37.2.5",

Choose a reason for hiding this comment

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

critical

This is a major version upgrade from Electron v11 to v37. This large jump introduces significant breaking changes that will likely break the application.

Here are some of the breaking changes that need to be addressed in packages/react-devtools/app.js:

  • nodeIntegration Removal: The nodeIntegration option in webPreferences was removed in Electron v20. app.js uses nodeIntegration: true (line 32). This will cause the application to fail. The application needs to be refactored to use a preload script to expose Node.js APIs to the renderer process securely.

  • app.on('ready') Event: The ready event for app was deprecated and later removed. The code should be updated to use app.whenReady().then(...) instead of app.on('ready', ...) (line 23).

  • new-window Event: The new-window event on webContents is deprecated. It should be replaced with webContents.setWindowOpenHandler() (line 44).

Given this is an automated Snyk PR, it's crucial to manually verify and update the application code to be compatible with Electron v37 before merging. The application in its current state will not run with the updated Electron version.

"ip": "^1.1.4",
"minimist": "^1.2.3",
"react-devtools-core": "4.26.1",
Expand Down