electron_audit_security
Audits Electron app source files against an official security checklist, detecting insecure BrowserWindow, IPC, CSP, and version settings and flagging items that need runtime or packaging review.
Instructions
Audit an Electron app against the official security checklist. Covers 19 of the items that can be detected from static inputs (BrowserWindow configuration, main process code, package.json, preload, HTML): HTTPS-only content, nodeIntegration, contextIsolation, sandbox, webSecurity, CSP, allowRunningInsecureContent, experimentalFeatures, enableBlinkFeatures, raw ipcRenderer exposure, direct window assignment, @electron/remote, supported Electron version, shell.openExternal validation, file:// usage, tag, will-navigate handler, setWindowOpenHandler, and IPC sender validation. The remaining checklist items (session permissions, fuse configuration) require runtime / packaging context and are flagged in the report's footer.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "electron_audit_security"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mainCode | No | Main process code -- used to detect non-HTTPS URLs in loadURL/loadFile calls | |
| htmlContent | No | Content of the main HTML file to check CSP meta tags | |
| packageJson | No | Content of package.json to check Electron version and dependencies | |
| preloadCode | No | Content of the preload script | |
| electronVersion | No | Electron major version if not in package.json (e.g. '41') | |
| browserWindowConfig | No | BrowserWindow constructor options as a JSON string or code snippet |