Controlling Electron's Renderer Attack Surface with contextBridge
Electron's contextBridge lets you expose a narrow, audited API from the main process to the renderer. Here is how to replace nodeIntegration with an explicit IPC contract, with a worked file-read example.