Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Professional Electron: main/renderer architecture, IPC, security hardening, packaging, and auto-updates. Use when writing, reviewing, or structuring Electron apps.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Electron ships desktop apps with web tech — but it's Chromium + Node with real security and performance obligations. Professional Electron means respecting the process model (main vs renderer), hardening aggressively (a renderer is an untrusted browser), keeping IPC tight and typed, and nailing the unglamorous parts: packaging, signing, auto-updates, and startup performance.
The through-line: the renderer is hostile territory — harden it like a browser, and keep privileged work in main behind a minimal, validated IPC surface.
contextBridge). Utility processes for
heavy work off the main thread.contextIsolation: true, nodeIntegration: false,
sandbox: true, strict Content Security Policy, no allowRunningInsecureContent, permission
requests default-deny with explicit allowlist. Treat every renderer as compromised-by-default —
validate everything crossing IPC.ipcMain.handle/ipcRenderer.invoke for request/response;
preload exposes only what's needed via contextBridge.exposeInMainWorld. Define the IPC
contract as typed functions (shared types package) — not stringly-typed channel names scattered
everywhere. Validate all renderer-supplied arguments in main (it's attacker input).BrowserWindow; CSP meta; preload-only bridge. Lint the security checklist in review.webSecurity on, and no loading of remote content without explicit trust decisions
(remote content + privileged bridge = RCE).Preload bridge pattern:
// preload.js — the ONLY code with both worlds; keep it tiny and boring
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('api', {
// Typed, minimal surface — no raw ipcRenderer exposure
openFile: () => ipcRenderer.invoke('dialog:openFile'),
onFileChanged: (cb) => ipcRenderer.on('file:changed', (_e, path) => cb(path)),
saveSettings: (settings) => ipcRenderer.invoke('settings:save', settings),
});
// main.js — validate everything from the renderer
ipcMain.handle('settings:save', async (_event, settings) => {
const parsed = SettingsSchema.parse(settings); // validate: renderer is untrusted
await store.save(parsed);
});
nodeIntegration: true or disabled context isolation. The classic Electron RCE — any XSS
becomes full system compromise. Never disable the sandbox/isolation for convenience.ipcRenderer or broad "do anything" bridges.
Minimal typed surface; each method validated main-side.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
中文简介正在准备中。当前显示原文说明。
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
中文简介正在准备中。当前显示原文说明。
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
中文简介正在准备中。当前显示原文说明。
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
中文简介正在准备中。当前显示原文说明。
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
中文简介正在准备中。当前显示原文说明。