Secure Electron Template screenshot

Secure Electron Template

Author Avatar Theme by Rezach
Updated: 14 Apr 2024
1713 Stars

The best way to build Electron apps with security in mind.

Categories

Overview:

The secure-electron-template is an Electron app template designed and built with security in mind. It includes popular frameworks such as Electron, React, Typescript, and Redux. The template focuses on following best practices for security and includes features like loading secure content, enabling context isolation for remote content, and handling session permission requests. It also provides additional modules for localization, storing config/data, custom context menus, and more. The template’s architecture is documented for better understanding, and there is an FAQ section for common questions. Users are encouraged to share their applications built using this template.

Features:

  • Only load secure content
  • Do not enable node.js integration for remote content
  • Enable context isolation for remote content
  • Handle session permission requests from remote content
  • Do not disable web security
  • Define a content security policy
  • Do not set allowRunningInsecureContent to true
  • Do not enable experimental features
  • Do not use enableBlinkFeatures
  • Do not use allowpopups
  • <webview> verify options and params
  • Disable or limit navigation
  • Disable or limit creation of new windows
  • Do not use openExternal with untrusted content
  • Disable remote module
  • Filter the remote module
  • Use a current version of Electron

Installation:

To get started with the secure-electron-template, clone the repository using the “Use this template” button or through the command line with the following command:

git clone https://github.com/reZach/secure-electron-template.git

Once cloned, install the dependencies by running the following commands:

cd secure-electron-template
npm install

Summary:

The secure-electron-template is an Electron app template that prioritizes security. It includes key features for secure content loading, isolation for remote content, session permission handling, and more. The template also provides popular frameworks and additional modules for localization, data storage, custom context menus, and license key validation. It is well-documented and encourages users to contribute their applications built using this template.