Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyze Electron IPC implementations for security vulnerabilities including contextIsolation, nodeIntegration, preload scripts, and channel validation
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 154% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 63% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 350% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 117% | 0% |
| case-06 | ✓→✗ | ▼ Worse | 70% | 0% |
Analyze Electron IPC implementations for security vulnerabilities. This skill performs comprehensive security audits of inter-process communication patterns, checking for contextIsolation issues, nodeIntegration risks, preload script security, and IPC channel validation.
json{ "type": "object", "properties": { "projectPath": { "type": "string", "description": "Path to the Electron project root" }, "auditScope": { "type": "array", "items": { "enum": ["ipc-channels", "preload-scripts", "main-process", "renderer-security", "csp", "all"] }, "default": ["all"] }, "severity": { "enum": ["all", "critical", "high", "medium"], "default": "all", "description": "Minimum severity level to report" }, "includeRecommendations": { "type": "boolean", "default": true } }, "required": ["projectPath"] }
json{ "type": "object", "properties": { "success": { "type": "boolean" }, "summary": { "type": "object", "properties": { "totalIssues": { "type": "number" }, "critical": { "type": "number" }, "high": { "type": "number" }, "medium": { "type": "number" }, "low": { "type": "number" } } }, "findings": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "severity": { "enum": ["critical", "high", "medium", "low"] }, "category": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "file": { "type": "string" }, "line": { "type": "number" }, "recommendation": { "type": "string" }, "codeExample": { "type": "string" } } } }, "securityScore": { "type": "number", "description": "Security score 0-100" } }, "required": ["success", "findings"] }
nodeIntegration: true in BrowserWindowcontextIsolation: falsesandbox: falseipcMain.on('*') patternswebSecurity: falsejavascript// BAD: Exposing ipcRenderer directly contextBridge.exposeInMainWorld('electron', { ipcRenderer: ipcRenderer // CRITICAL VULNERABILITY }); // GOOD: Expose only specific channels contextBridge.exposeInMainWorld('electron', { send: (channel, data) => { const validChannels = ['file:read', 'file:write']; if (validChannels.includes(channel)) { ipcRenderer.send(channel, data); } } });
javascript// BAD: Context isolation disabled new BrowserWindow({ webPreferences: { contextIsolation: false, // CRITICAL preload: path.join(__dirname, 'preload.js') } }); // GOOD: Context isolation enabled new BrowserWindow({ webPreferences: { contextIsolation: true, sandbox: true, preload: path.join(__dirname, 'preload.js') } });
javascript// BAD: Executing arbitrary commands ipcMain.handle('execute', async (event, cmd) => { return exec(cmd); // HIGH RISK }); // GOOD: Whitelisted commands only const ALLOWED_COMMANDS = ['list-files', 'get-info']; ipcMain.handle('execute', async (event, cmd, args) => { if (!ALLOWED_COMMANDS.includes(cmd)) { throw new Error('Command not allowed'); } return executeWhitelistedCommand(cmd, args); });
electron-main-preload-generator - Generate secure boilerplateelectron-builder-config - Build configurationdesktop-security-auditor agent - Comprehensive security reviewelectron-architect - Architecture guidancedesktop-security-auditor - Security expertiseOther measured skills in the registry, with their headline benchmark lift.