Skip to content

Harden external URL handling in Electron#637

Open
72897 wants to merge 1 commit into
undergroundwires:masterfrom
72897:codex/allowlist-external-url-schemes
Open

Harden external URL handling in Electron#637
72897 wants to merge 1 commit into
undergroundwires:masterfrom
72897:codex/allowlist-external-url-schemes

Conversation

@72897

@72897 72897 commented Jun 11, 2026

Copy link
Copy Markdown

This adds a small allowlist before forwarding renderer-created window open requests to Electron's shell.openExternal.

Only https:, http:, and mailto: URLs are forwarded to the operating system. Invalid URLs and unsupported schemes are denied through the existing setWindowOpenHandler path.

Verification:

  • npx eslint src/presentation/electron/main/index.ts --max-warnings=0 --ignore-path .gitignore
  • npm run build -- --mode production
  • npm audit --json --omit=dev

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