TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Building a Secure Electron App

56 pointsby bobblywobblesover 5 years ago

9 comments

itsanandersonover 5 years ago
It&#x27;s a great idea to have a template for writing secure Electron apps, but this particular template should only be used with caution. I don&#x27;t think it has been reviewed or endorsed by the Electron team as actually following those best practices, and I see a few issues just skimming from my phone:<p>They&#x27;re trying to expose IPC to the renderer in an unsafe way. See their discussion on this GH issue <a href="https:&#x2F;&#x2F;github.com&#x2F;electron&#x2F;electron&#x2F;issues&#x2F;21437" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;electron&#x2F;electron&#x2F;issues&#x2F;21437</a> (referenced from the main readme as blocking some features they want to implement)<p>On their &quot;building a secure app&quot; page they complain about Electron&#x27;s quick release cadence <a href="https:&#x2F;&#x2F;github.com&#x2F;reZach&#x2F;secure-electron-template&#x2F;blob&#x2F;master&#x2F;docs&#x2F;secureapps.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reZach&#x2F;secure-electron-template&#x2F;blob&#x2F;mast...</a><p>&gt; The trouble that I&#x27;ve found with electron, is that their release schedule is crazy, with only a few months before each major release. We know that electron is a young framework, but it is hard to keep up so quickly!<p>Electron releases quickly to pull in critical upstream security fixed from chromium. That reasoning is explained pretty thoroughly in the best practices documentation <a href="https:&#x2F;&#x2F;electronjs.org&#x2F;docs&#x2F;tutorial&#x2F;security#17-use-a-current-version-of-electron" rel="nofollow">https:&#x2F;&#x2F;electronjs.org&#x2F;docs&#x2F;tutorial&#x2F;security#17-use-a-curre...</a><p>I haven&#x27;t looked at their implementations of the other security best practices, so these might be the only red flags, but I&#x27;d still recommend against just blindly copying the template without understanding and verifying the best practices they&#x27;re attempting to implement.
评论 #22046962 未加载
molochover 5 years ago
If anyone is interested in Electron application security, I wrote a guide that explains the methodology behind some of the choices the author here has taken and even goes a bit further in a variety of areas: <a href="https:&#x2F;&#x2F;know.bishopfox.com&#x2F;research&#x2F;reasonably-secure-electron" rel="nofollow">https:&#x2F;&#x2F;know.bishopfox.com&#x2F;research&#x2F;reasonably-secure-electr...</a>
评论 #22046977 未加载
pspeter3over 5 years ago
I wish that Safari would support Progressive Web Apps on Desktop like Chrome. I would much rather provide an Application Manifest and Service Worker than building a pseudo native desktop app.
kilianover 5 years ago
This is based on the Security documentation that the Electron team maintains, which is full of good advice: <a href="https:&#x2F;&#x2F;electronjs.org&#x2F;docs&#x2F;tutorial&#x2F;security" rel="nofollow">https:&#x2F;&#x2F;electronjs.org&#x2F;docs&#x2F;tutorial&#x2F;security</a>
sansnommeover 5 years ago
For other types of security try <a href="https:&#x2F;&#x2F;github.com&#x2F;tauri-apps&#x2F;tauri" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tauri-apps&#x2F;tauri</a><p>It is an electron-like framework written in Rust, and is designed to be as lightweight as possible.
yodonover 5 years ago
Be aware this is GPL licensed
评论 #22047470 未加载
评论 #22047924 未加载
cfvover 5 years ago
Is it still possible to unpack the asar, rewrite the source, and repackage the asar?
评论 #22048488 未加载
评论 #22048366 未加载
cjbprimeover 5 years ago
It would be cool to have a regression testsuite showing &quot;insecure&quot; code for each class of security problem, and showing that the problem is fixed by the template.
评论 #22060217 未加载
bilekasover 5 years ago
&gt; Secure Electron App Bit of an oxymoron no ?<p>&#x2F;facetiousness<p>On a lighter note :<p>&gt; Feature #1<p>&gt; Only load secure content - (Need help!)<p>What kind of help? For this template project ?!
评论 #22047060 未加载