Skip to content

fix(desktop): upgrade Electron for the macOS GPU sandbox fix - #28123

Open
Hypermaker2 wants to merge 2 commits into
pingdotgg:mainfrom
Hypermaker2:fix/electron-45-macos-sandbox
Open

Hypermaker2 wants to merge 2 commits into
pingdotgg:mainfrom
Hypermaker2:fix/electron-45-macos-sandbox

Conversation

@Hypermaker2

@Hypermaker2 Hypermaker2 commented Oct 31, 2026 •

Copy link
Copy Markdown

Problem

Current main pins Electron 44.10.1 / Chromium 152 and lacks Chromium's macOS GPU TCC-responsibility fix. The upstream fix prevents a GPU child from inheriting an authorized parent's TCC context when the browser is launched directly. Exploitation also requires a browser-process compromise; this PR does not claim that an arbitrary page alone can execute commands.

Change

Upgrade the desktop runtime to Electron 45.2.3 / Chromium 156.0.8078.80, including its exact release-age exception and lockfile.

  • Update node-abi to 4.40.0 so native rebuilds recognize Electron 45's ABI 150.
  • Remove the Node events/timers/url shims from the preload verifier to match Electron 45's sandbox, and cover all six removed import names in the existing verifier tests.
  • Merge current upstream main (0d3b01a8884b) and resolve the dependency-file conflicts.

Status, 2026-11-05: the upstream runtime concern that prompted the earlier hold no longer reproduces on 45.2.3, and the private report has been updated with that verification. The upstream hold is cleared. GitHub CI passed on cd5b03f083; CodeRabbit reported no actionable findings on that commit. Maintainer review and the remaining validation listed below are still outstanding. Private report details are not disclosed here.

References: Chromium GPU/TCC fix, research and prerequisites, Electron 45.2.3, Electron 45 breaking changes.

Scope and approval

Submitted under the focused-fix exception for a specific upstream security-runtime defect. The ABI and verifier changes are required compatibility work for that same upgrade. No product defaults, UI design, shared contracts, or unrelated application behavior are intentionally changed. No prior maintainer approval is claimed.

Verification

Fresh validation of cd5b03f083 on macOS 27.0.1 / Apple Silicon:

  • vp run check:changed upstream/main passes: formatting, lint, unused patches, knip, affected typechecks, and all 10 selected tests across 2 files.
  • vp run dist:desktop:artifact --platform mac --target dir --arch arm64 succeeds. This builds desktop/server/web bundles, rebuilds native dependencies for Electron 45.2.3, generates server bytecode using the packaged runtime, and validates the macOS payload.
  • The unsigned packaged app starts its backend, migrates the repository's launch-fixture database, opens “Release launch check,” and renders its saved message. Both the Electron-driven check and the Playwright check passed.
  • All four packaged preload bundles load in hidden BrowserWindows with sandbox and context isolation enabled, with no preload errors. The desktop bridge, Clerk passkey bridge, and picture-in-picture bridge are exposed as expected.
  • Runtime reports Electron 45.2.3, Chromium 156.0.8078.80, Node 24.22.2, and ABI 150. The verified official 45.2.3 framework contains MacDisclaimGpuTccResponsibility; 44.10.1 does not. This is source/version evidence, not an exploit-chain reproduction.

The smoke fixture uses an isolated database and Chromium profile. Before application entry, inspector instrumentation redirects the process's home-path lookup and stubs OS credential-storage availability to false; packaged files are unchanged. Without that credential-storage stub, the unsigned app's keychain check stalled. These results do not validate macOS keychain integration, signed authentication/passkeys, recording/capture permissions, Windows/Linux, or an exploit chain. Those remain release/maintainer checks.

The existing standalone VM preload verifier lacks a DOM for the macOS preload path; the real sandboxed packaged-runtime checks above cover the bundles instead. The installed T3 Code app was not modified.

Model: GPT-6-Astra. Harness: Codex in T3 Code.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 31, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 97d8c58

Macroscope's review found this PR approvable — This supports the Electron sandbox fix with an updated ABI dependency and stricter preload validation. Reported sandboxed-runtime smoke testing provides relevant compatibility evidence, with no product-default or permission expansion identified.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The desktop app now uses Electron 45.2.3, with an updated node-abi override. The preload verifier rejects six Node module imports, and its tests cover the updated import rules.

Changes: Desktop runtime updates

Layer / File(s) Summary
Electron and ABI version updates
apps/desktop/package.json, pnpm-workspace.yaml
The desktop Electron dependency changed to 45.2.3. The node-abi override changed to 4.40.0, and [email protected] was added to the minimum-release-age exclusion list.
Preload verifier import rules
apps/desktop/scripts/verify-preload-bundle.mjs, apps/desktop/scripts/verify-preload-bundle.test.mjs
The verifier no longer accepts events, node:events, timers, node:timers, url, or node:url as sandbox imports. Tests confirm these imports are rejected and that electron/common and electron/renderer are accepted.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Suggested reviewers: valuin, juliusmarminge, nabettu

Merge Risk: Minimal · up to cd5b0

The Electron upgrade has no identified merge-blocking issue. Signed authentication and Windows/Linux validation remain outstanding.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the main change: upgrading Electron to address the macOS GPU sandbox fix.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template closely. It has Problem, Change, Scope and approval, and Verification sections, and each contains specific, substantive content. The Problem section sta…
Full details: Description check

Explanation

The description follows the repository template closely. It has Problem, Change, Scope and approval, and Verification sections, and each contains specific, substantive content. The Problem section states the Electron 44.10.1 / Chromium 152 pin and the missing macOS GPU TCC-responsibility fix. The Change section lists the Electron 45.2.3 upgrade, the node-abi 4.40.0 update, and the preload verifier shim removal. The Verification section reports concrete commands, platform, and observed results, and it states what was not validated. The Scope and approval section uses the focused-fix exception and states that no prior maintainer approval is claimed. The template's Verification guidance applies to UI changes, and this PR changes no UI, so the lack of screenshots is not a gap. The description does not include the template's closing line naming the model and harness, but the author does provide it (Model: GPT-6-Astra. Harness: Codex in T3 Code.), so that item is covered. The description's status section also records a hold cleared on 2026-11-05 and cites CI and CodeRabbit state that may change; this is context, not a template gap.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 97d8c58 and cd5b03f.

Files ignored due to path filters: 1

  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2

  • apps/desktop/package.json
  • pnpm-workspace.yaml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Hypermaker2 commented Nov 4, 2026 •

Copy link
Copy Markdown
Author

Update, 2026-11-05: this hold has been cleared. The PR now targets Electron 45.2.3; see the new validation and status update. The original hold notice below is retained for context.

Status update: this upgrade is on hold pending upstream Electron assessment.

The macOS GPU/TCC fix remains outstanding on current main. While evaluating a newer Electron runtime, I found a regression that needs upstream assessment before proceeding. A report has now been submitted privately under Electron's reporting policy. I will link public upstream tracking when it becomes available; the private report's details are not included here.

This PR remains open. Once upstream resolves the concern, I will refresh it against current main, select the appropriate released Electron version, and rerun packaged-app validation and CI before requesting merge. The existing 45.2.1 verification does not cover a newer runtime.

Copy link
Copy Markdown
Author

Update (2026-11-05): upstream hold cleared; refreshed to Electron 45.2.3.

Pushed cd5b03f083, merging current main and resolving the dependency conflicts. The upstream runtime concern no longer reproduces on 45.2.3, and the private report now records the passing result.

Fresh validation passes:

  • vp run check:changed upstream/main (including all 10 selected tests).
  • Unsigned macOS arm64 packaging, native dependency rebuilds, and packaged server bytecode generation.
  • Packaged-app startup and rendering the repository's seeded thread, through both Electron and Playwright.
  • All four packaged preloads under sandbox/context isolation, with no preload errors.

The launch fixture isolates app data and disables OS credential-storage availability to avoid the unsigned app's keychain stall. Signed authentication/passkeys, keychain integration, recording permissions, and Windows/Linux remain unverified; the PR body records these limits.

GitHub reports the branch as conflict-free. CI is queued, and fresh CI/review results are still pending.

Wladefant

This comment was marked as spam.

@t3dotgg
t3dotgg dismissed Wladefant’s stale review November 8, 2026 23:28

Dismissed: unsolicited automated review from a blocked account.

This branch has not been deployed

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants