Skip to content

Desktop apps (Electron and Tauri) checklist

Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).

Also apply the general checklist.

This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.

  • DESKTOP-1 (9) Keep Electron's secure renderer defaults: context isolation, the sandbox and webSecurity on, and Node.js integration off. Call app.enableSandbox() so that no window can turn the sandbox off. (specific/desktop) Automatable: app.enableSandbox().
  • DESKTOP-2 (9) In Electron preload scripts, expose a narrow API with contextBridge.exposeInMainWorld: one function per IPC message, using ipcRenderer.invoke for requests. Never expose ipcRenderer or its send, invoke or on methods, and don't pass the IPC event object to callbacks in the page. (specific/desktop)
  • DESKTOP-3 (9) In Electron's main process, check the sender of every IPC message, for example the origin of event.senderFrame, and validate its arguments before acting on them. (specific/desktop)
  • DESKTOP-12 (9) Store users' credentials and tokens with Electron's asynchronous safeStorage API, which uses the operating system's cryptography, or in Tauri, for example, with the Stronghold plugin, and never build API keys or other secrets into the app. (specific/desktop)
  • DESKTOP-4 (8) Treat the arguments of every Tauri command as untrusted input: deserialize them into specific types, check their values in the command, and enforce your own scopes in the command itself. Keep secrets and as much business logic as you can in the Rust core. (specific/desktop)
  • DESKTOP-8 (8) Scope every Tauri plugin permission that reaches the system: allow file system access only to the base directories the app needs, such as $APPDATA, with deny scopes for sensitive paths, allow the shell plugin to run only named programs with argument validators, and allow the opener plugin only the URLs and paths it needs. (specific/desktop)
  • DESKTOP-9 (8) Limit where Electron windows can go: block navigation in a will-navigate handler unless a parsed URL matches the pages you expect, deny new windows in setWindowOpenHandler by default, and pass only checked, allowlisted URLs to shell.openExternal. (specific/desktop)
  • DESKTOP-13 (8) Sign every release in the release pipeline: sign macOS apps with a Developer ID Application certificate and notarize them, and sign Windows executables and installers with one consistent identity, as STEAM-16 describes. (specific/desktop) Automatable: SignTool verify.
  • DESKTOP-14 (8) Deliver updates only through a signed update mechanism over HTTPS: Electron's autoUpdater, for example through update-electron-app, in a signed app, or the Tauri updater with its signing key pair. Keep the update signing key in the CI secret store, and never set the Tauri updater's dangerousInsecureTransportProtocol. (specific/desktop) Automatable: Tauri updater signature check.
  • DESKTOP-15 (8) Stay on an Electron major that the Electron team still supports, which is one of the latest three, on its latest minor release, and upgrade one major at a time. Update Tauri, the Rust compiler and Node.js just as promptly. (specific/desktop) Automatable: npm audit.
  • DESKTOP-5 (7) Never block Electron's main process: use the asynchronous versions of Node.js APIs, avoid ipcRenderer.sendSync and @electron/remote, and move CPU-heavy, crash-prone or untrusted work to a worker thread or a utility process. (specific/desktop)
  • DESKTOP-6 (7) Give every window a Content Security Policy that allows only your own scripts, such as script-src 'self': in Electron, send it as a header from session.webRequest.onHeadersReceived, or in a <meta> tag for pages that can't get headers; in Tauri, set app.security.csp in tauri.conf.json, because Tauri's CSP protection is off until you set it. (specific/desktop)
  • DESKTOP-7 (7) Grant each Tauri window only the permissions it needs: give windows with different privileges separate capabilities, add a window to several capabilities only if it needs all their permissions, declare your own commands with AppManifest::commands in build.rs so that a window can call them only when a capability allows it, and let only higher-privileged windows create windows. (specific/desktop)
  • DESKTOP-10 (7) Serve Electron's local pages from a custom protocol with protocol.handle instead of file://, and flip the fuses you don't need when packaging, before code signing: turn off RunAsNode, EnableNodeOptionsEnvironmentVariable, EnableNodeCliInspectArguments and GrantFileProtocolExtraPrivileges, and turn on EnableEmbeddedAsarIntegrityValidation and OnlyLoadAppFromAsar. (specific/desktop) Automatable: @electron/fuses.
  • DESKTOP-11 (6) Use Tauri's isolation pattern when the front end has many dependencies or loads third-party content, and keep the isolation application small, with few dependencies and build steps. (specific/desktop)
  • DESKTOP-16 (6) Run end-to-end tests against the built app, for example with WebdriverIO's Electron or Tauri service, or with Playwright's experimental Electron support, and mock the IPC layer in front-end unit tests, for example with Tauri's mockIPC. (specific/desktop)