Skip to content

chore: bump electron devDependency from ^7.2.4 to ^39.8.5 - #55

Open
kparkinson-ld wants to merge 1 commit into
mainfrom
devin/1780989348-fix-dependabot-alerts
Open

chore: bump electron devDependency from ^7.2.4 to ^39.8.5#55
kparkinson-ld wants to merge 1 commit into
mainfrom
devin/1780989348-fix-dependabot-alerts

Conversation

@kparkinson-ld

@kparkinson-ld kparkinson-ld commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

N/A — devDependency-only change, no application code affected.

Related issues

Resolves all 29 open Dependabot alerts (#1#29), all targeting the electron devDependency.

Describe the solution you've provided

Bumps the electron devDependency from ^7.2.4 to ^39.8.5 in package.json. This resolves all 29 Dependabot security alerts:

  • 4 high severity (CVSS 7.0–8.8) — use-after-free, renderer injection, heap buffer overflow
  • 18 medium severity (CVSS 4.7–6.8) — ASAR bypass, IPC spoofing, protocol handler injection, etc.
  • 4 low severity (CVSS 2.2–3.9) — clipboard crash, USB validation, login item path, subframe IPC

electron is a devDependency used only for the test runner (@jest-runner/electron). It is not shipped to consumers of the SDK, so this change has no impact on the published package.

Describe alternatives you've considered

  • Dismissing alerts as devDependency-only — rejected since the alerts still show as open and represent real CVEs.
  • Incremental bump to a lower version — rejected since alerts span up to fix version 39.8.5, and a partial bump would leave high-severity alerts unresolved.

Additional context

  • spectron (deprecated, used only in integration tests via separate jest config) is incompatible with Electron 39.x but is not part of any Dependabot alert. It can be addressed in a follow-up if integration tests need to run.
  • Lint (eslint) passes cleanly. TypeScript errors in node_modules/@types/node are pre-existing on main (old typescript@^3.9.7 vs modern type definitions) and unrelated to this change.

Link to Devin session: https://app.devin.ai/sessions/6647dfd07f80421ca49b42dac633beae
Requested by: @kparkinson-ld


Note

Low Risk
Single devDependency version bump with no application or published-package code changes; only local/test Electron usage is affected.

Overview
Bumps the electron devDependency from ^7.2.4 to ^39.8.5 in package.json to clear Dependabot security alerts (use-after-free, renderer injection, ASAR/IPC issues, and related CVEs).

Electron is used only for local/testing tooling (e.g. @jest-runner/electron), not the published SDK, so runtime behavior for consumers is unchanged. Integration tests that rely on spectron may need a separate follow-up on Electron 39.x compatibility.

Reviewed by Cursor Bugbot for commit 1d0ad04. Bugbot is set up for automated code reviews on this repo. Configure here.

Resolves all 29 open Dependabot alerts (4 high, 18 medium, 4 low severity).
All alerts were for the electron devDependency, which is used only for
the test infrastructure and is not shipped to consumers of the SDK.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@kparkinson-ld
kparkinson-ld marked this pull request as ready for review June 9, 2026 07:22
@kparkinson-ld
kparkinson-ld requested a review from a team as a code owner June 9, 2026 07:22
@joker23

joker23 commented Jun 9, 2026

Copy link
Copy Markdown

I don't think this is going to work. Could you test the change with https://github.com/launchdarkly/hello-electron and see if the SDK could still work after updating.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

@joker23 Good call to verify. I tested this and here are the results:

SDK unit tests pass with electron 39:
All 6 test suites (38 tests) pass when running npm test against the bumped electron devDependency:

PASS  src/__tests__/LDClient-test.js
PASS  src/__tests__/LDClient-sync-test.js
PASS  src/__tests__/LDClient-streaming-test.js
PASS  src/__tests__/nodeSdkEmulation-test.js
PASS  src/__tests__/LDClient-tls-test.js
PASS  src/__tests__/LDClient-events-test.js
Test Suites: 6 passed, 6 total
Tests:       38 passed, 38 total

The electron devDep is not shipped to consumers:
electron is listed only in devDependencies — it's used by @jest-runner/electron to run tests in an Electron environment. When consumers npm install launchdarkly-electron-client-sdk, they get only the production dependencies (electron-json-storage, launchdarkly-js-client-sdk, etc.). Verified in hello-electron: the installed SDK package has no nested electron in node_modules.

hello-electron has a pre-existing issue unrelated to this PR:
hello-electron pins electron@12.2.3 as its own dependency, and currently crashes with TypeError: Object.hasOwn is not a function because electron 12's Node.js runtime doesn't support Object.hasOwn (needed by a winston transitive dep @so-ric/colorspace). This happens on main today and is unrelated to this PR.

One thing to note: The SDK's rendererClient.js uses electron.remote.require(), which was removed in Electron 14+. This means the SDK's renderer client functionality is already incompatible with Electron >=14 regardless of this PR — that's a pre-existing limitation of the SDK itself, not something introduced by this devDependency bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants