reZach / secure-electron-template

The best way to build Electron apps with security in mind.
MIT License
1.65k stars 154 forks source link
boilerplate electron i18next react redux security template webpack

secure-electron-template

A current electron app template with the most popular frameworks, designed and built with security in mind. (If you are curious about what makes an electron app secure, please check out this page).

Quality Gate Status Security Rating Maintainability Rating Bugs Vulnerabilities

How to get started

To get started, clone the repository by clicking the Use this template button, or through the command line (git clone https://github.com/reZach/secure-electron-template.git).

Once cloned, install the dependencies for the repo by running the following commands (you do not have to run the first command if your command line is already inside the newly cloned repository):

cd secure-electron-template
npm i
npm run dev

Are you using yarn? You'll want to read this issue.

When you'd like to test your app in production, or package it for distribution, please navigate to this page for more details on how to do this.

Demo

Demo

Features

Taken from the best-practices official page, here is what this repository offers!

  1. Only load secure content - βœ… (But the developer is responsible for loading secure assets only πŸ™‚)
  2. Do not enable node.js integration for remote content - βœ…
  3. Enable context isolation for remote content - βœ…
  4. Handle session permission requests from remote content - βœ…
  5. Do not disable websecurity - βœ…
  6. Define a content security policy - βœ…
  7. Do not set allowRunningInsecureContent to true - βœ…
  8. Do not enable experimental features - βœ…
  9. Do not use enableBlinkFeatures - βœ…
  10. Do not use allowpopups - βœ…
  11. <webview> verify options and params - βœ…
  12. Disable or limit navigation - βœ…
  13. Disable or limit creation of new windows - βœ…
  14. Do not use openExternal with untrusted content - βœ…
  15. Disable remote module - βœ…
  16. Filter the remote module - βœ…
  17. Use a current version of electron - βœ…

Included frameworks

Built-in to this template are a number of popular frameworks already wired up to get you on the road running.

Bonus modules

What would a template be without some helpful additions?

Architecture

For a more detailed view of the architecture of the template, please check out here. I would highly recommend reading this document to get yourself familiarized with this template.

FAQ

Please see our faq for any common questions you might have. NEW TO ELECTRON? Please visit this page.

Show us your apps!

If you've built any applications with our template, we'd love to see them!.