Electron Security Review
Use when changes touch
apps/desktop/src/main/**apps/desktop/src/preload/**apps/desktop/src/shared/desktopBridge.ts- IPC validators or channel definitions
- renderer code that consumes privileged APIs
- BrowserWindow configuration, permissions, CSP, file system, shell, or native access
Do not use when
- The change is backend-only
- The change is renderer-only styling or presentational UI with no bridge or privilege impact
Inspection steps
- Inspect
apps/desktop/src/main/window/overlayWindow.ts:contextIsolation: truenodeIntegration: falsesandbox: true- no unsafe web preferences
- Inspect
apps/desktop/src/preload/preload.tsandapps/desktop/src/shared/desktopBridge.ts:- only narrow, typed APIs exposed through
contextBridge - no raw
ipcRenderer,electron, or Node surface leaked to renderer
- only narrow, typed APIs exposed through
- Inspect
apps/desktop/src/main/ipc/registerIpcHandlers.tsandapps/desktop/src/main/ipc/validators.ts:- inputs validated before use
- no generic pass-through, eval-style, or shell-style channels
- overlay and settings mutations remain constrained
- Inspect renderer entry points such as
apps/desktop/src/renderer/index.htmland changed renderer files:- CSP still present
- renderer does not import Electron or Node directly
- Search for dangerous patterns in changed files and nearby code:
shell.openExternalwebSecurity: falseallowRunningInsecureContent: truenodeIntegration: truecontextIsolation: false- dynamic
require/importfrom user input
- Check secret handling:
- no permanent Gemini key shipped to the client
- token flow still uses backend-issued ephemeral credentials
- If a claim cannot be proven from the changed code or current repository state, say so explicitly.
Output format
## Electron Security Review
**Findings:**
- [severity] <finding> — <path>
**Required fixes:**
- <fix or "None">
**Verified invariants:**
- <invariant>
**Cannot verify from current context:**
- <item or "None">
**Verdict:** PASS / FAIL
If there are no findings, still list the invariants that were actually checked.
