Skip to content

fix(desktop): ignore packaged renderer override - #42364

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
electron-audit-6
Open

fix(desktop): ignore packaged renderer override#42364
opencode-agent[bot] wants to merge 1 commit into
v2from
electron-audit-6

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • ignore ELECTRON_RENDERER_URL in packaged desktop applications
  • use one guarded parser for both renderer loading and trusted-origin checks
  • preserve the override for local Electron development
  • cover development, packaged, and invalid URL behavior

Why

The packaged app previously honored an environment-provided renderer URL and then treated that URL as trusted. A process launcher or inherited environment could therefore load remote content into the main window with the privileged preload bridge. Development overrides should never change packaged renderer code or its trust boundary.

Testing

  • bun typecheck (packages/desktop)
  • 70 desktop tests passed
  • 3 focused renderer-URL policy tests passed
  • Prettier and git diff --check

Requested by: @Hona (Luke Parker via Slack)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant