Skip to content

Isolate the desktop shell and restrict embedded live views - #18

Draft
shrey150 wants to merge 4 commits into
mainfrom
codex/desktop-renderer-isolation
Draft

shrey150 wants to merge 4 commits into
mainfrom
codex/desktop-renderer-isolation

Conversation

@shrey150

@shrey150 shrey150 commented Nov 13, 2026 •

Copy link
Copy Markdown

Keep the desktop shell privileged API confined to its own top-level frame and allow local live-view guests only at Browserbase's inspector routes. Bundle the preload so the shell can enable sandboxing; deny guest preloads, Node access, popups, unexpected navigation, and local device permissions. The shell CSP now permits only packaged scripts, and tab metadata is rendered with DOM properties rather than HTML interpolation.

Inline handlers have been replaced with listeners, live-view capability URLs are no longer logged by the renderer, and missing optional status-bar elements no longer interrupt connection-error handling.

Verification

Command / flow Observed output Confidence / sufficiency
npm run build and tsc --noEmit -p tsconfig.json Passed Builds bundled preload and renderer and checks all source types.
node --test tests/security-url.test.cjs Passed Rejects scheme, credentials, port, hostname, and route confusion.
xvfb-run -a electron --no-sandbox tests/electron-security.cjs with Electron 45.3.2 Passed Runs the actual main entrypoint with a synthetic local viewer fixture: trusted IPC works, untrusted IPC fails, inline/eval scripts fail, metadata remains inert, popups/navigation fail, malicious guest attributes are overridden, and permissions are denied. This environment requires --no-sandbox, so OS sandbox enforcement is not verified.

Screenshot: full application UI with a local synthetic viewer fixture; no live cloud session is represented.

Desktop security test fixture

Additional integration verification with the companion runtime, lifecycle, tab, and viewport changes applied: all 34 automated tests passed. The actual Electron app opened a real cloud Live View; a screenshot-only computer-use model completed a synthetic form in 14 actions, and an independent remote-state check confirmed the values. Reload preserved the tab/address and session, and app shutdown released the session. Pointer input targeted the desktop window; keyboard events targeted the embedded viewer. This Linux run still required --no-sandbox.

Combined validation: the mainline candidate containing #13–#18 and #20 passed builds, all 34 automated tests, and the high/critical advisory gate on Linux, macOS, and Windows. Cross-platform CI results.

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.

1 participant