Preflight Checklist
Problem Description
Since Electron v5 the default behavior of BrowserWindow is to create it with nodeIntegration: false. In v12 contextIsolation was turned on as well (see #23506). Another default that Electron should have is sandbox: true.
Proposed Solution
I'd like the defaults of creating a new BrowserWindow to be equivalent to the following:
const mainWindow = new BrowserWindow({
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
sandbox: true
}
);
Alternatives Considered
No alternatives considered. As @MarshallOfSound said in #23506:
We're making this change to improve the default security of Electron apps so that your app is only insecure if you have deliberately opted in to the insecure behaviour.
Additional Information
Happy to dig and try to find any data needed to make a decission.
Preflight Checklist
Problem Description
Since Electron v5 the default behavior of
BrowserWindowis to create it withnodeIntegration: false. In v12contextIsolationwas turned on as well (see #23506). Another default that Electron should have issandbox: true.Proposed Solution
I'd like the defaults of creating a new
BrowserWindowto be equivalent to the following:Alternatives Considered
No alternatives considered. As @MarshallOfSound said in #23506:
Additional Information
Happy to dig and try to find any data needed to make a decission.