Skip to content

deps: bump electron stack and resolve all 22 npm audit findings#145

Open
kairoxxai wants to merge 1 commit into
lightningpixel:devfrom
kairoxxai:laptop/electron-stack-vuln-fix
Open

deps: bump electron stack and resolve all 22 npm audit findings#145
kairoxxai wants to merge 1 commit into
lightningpixel:devfrom
kairoxxai:laptop/electron-stack-vuln-fix

Conversation

@kairoxxai

Copy link
Copy Markdown

Summary

Closes all 22 npm audit findings (12 high, 6 moderate, 4 low) by bumping the electron build stack:

Package Before After
electron 33.3.0 42.0.1
electron-builder 24.13.3 26.8.1
electron-vite 2.3.0 5.0.0
vite 5.4.0 8.0.12

Notable advisories closed: node-tar path traversal (multiple GHSAs), postcss XSS (GHSA-qx2v-qp2m-jg93), and a long tail of esbuild/vite transitive vulns.

Test plan

  • npm audit reports 0 vulnerabilities post-upgrade
  • npm run build completes cleanly across all three electron-vite environments (main, preload, renderer)
  • npm run dev launches the Electron app on Linux (Pop OS 24.04, Wayland); Python bridge boots, registry initializes, three.js renderer loads
  • Maintainers should validate on macOS / Windows builds before merging

Notes

  • Pure dep bump: no source changes, no API surface changes from electron 33→42 that affected modly's runtime in my testing
  • Vite 8 surfaces some deprecation warnings (esbuild plugin option, optimizeDeps.rollupOptions, plugin-reactplugin-react-oxc). All non-fatal — flagged for a future cleanup PR
  • ESLint 9 is now a transitive — pre-existing .eslintrc.* config will need migration to eslint.config.js (out of scope here; npm run lint was already broken before this PR)

- electron 33.3.0 → 42.0.1
- electron-builder 24.13.3 → 26.8.1
- electron-vite 2.3.0 → 5.0.0
- vite 5.4.0 → 8.0.12

Closes 22 npm audit findings (12 high, 6 moderate, 4 low) including
node-tar path traversal (multiple GHSAs), postcss XSS, and
esbuild/vite transitive vulns. Build verified clean across all three
electron-vite environments (main, preload, renderer). App launches
and exercises Python bridge + three.js renderer successfully.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Lorchie

Lorchie commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Can you merge it into the dev branch? Thanks

@lightningpixel lightningpixel changed the base branch from main to dev May 22, 2026 09:06
@Lorchie

Lorchie commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Hi @kairoxxai — thanks again for tackling this, the security goal is exactly right. 🙏 I tested the branch in an isolated worktree before merging and hit a few things worth fixing; sharing them so you can keep ownership of the PR:

  1. npm ci fails on a clean install. Vite 8 isn't supported by @vitejs/plugin-react@4 (peer range is ^4 || ^5 || ^6 || ^7), so a fresh clone / CI errors out with ERESOLVE. It only installs with --legacy-peer-deps, which we don't want to require.

  2. The branch doesn't actually reach 0 vulnerabilities. On a clean install, npm audit reports 7 vulnerabilities (3 high) — including two that are new and Windows-specific to Vite 8 (server.fs.deny bypass GHSA-fx2h-pf6j-xcff, and NTLMv2 hash disclosure via launch-editor), plus an esbuild dev-server file-read advisory that's left open.

What I'd suggest changing, and why:

  • Stay on Vite 7 instead of 8. It fixes the same original advisories, installs cleanly with plugin-react@4, and avoids the new Windows-specific Vite 8 issues above. (If you specifically want Vite 8, you'd also need to bump @vitejs/plugin-react to v5 / plugin-react-oxc — happy to do that as a follow-up instead.)
  • Add an esbuild override to close the remaining esbuild advisory:
    "overrides": { "esbuild": "^0.28.0" }
  • Rebase onto the current dev. The branch is a few merges behind (it predates feat(generate): add transform tools bar with selection-gated tools #178 / feat: add Gaussian Splat viewer support #182 and the test scripts), so npm test isn't present yet.

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