-
Notifications
You must be signed in to change notification settings - Fork 109
[docs] needs docs on how/why to use Muon instead of Electron #165
Comments
Electron has added basic sandbox support back in september/2016, but that is only a first step towards making a framework that can be considered secure for running untrusted content. Since I've been working on improving electron's security and sandbox mode, I'm interested in knowing what are muon advantages over electron from a security POV. |
@tarruda one thing I have noticed is that many security-focused apps (Keybase client, Cryptocat, etc.) do not have the sandbox enabled; is that because the sandbox causes problems with app functionality or because they do not know about this feature? Paul Betts alluded to some tradeoffs in electron/electron#8578 (comment), and I'm curious what those are for Electron. Other than having features like sandbox and lack-of-nodeintegration on by default, I think the other big security benefit of Muon is keeping more up-to-date with Chromium upgrades. IIRC we aim for no more than 2 weeks gap between Chromium stable and Muon. |
I think it is not known yet. I implemented this feature a few months ago as experimental/incomplete but only recently got the time to resume my work. You can keep track of some planned enhancements here: electron/electron#6712 . There's already a PR with some documentation: electron/electron#8983 As for the tradeoffs, a sandboxed window is indeed more limited than a normal electron window, but I'm working to reduce these limitations. This month I already sent quite a few PRs with many fixes/improvements, such as making the If you only care about accessing node.js APIs, sandbox is not so limiting since you can already access every module in the main process through My long term goal is to make it possible for |
@diracdeltas , I agree with @tarruda , the story of an already available sandbox in electron hasn't been spread far enough. I, for one, read in May 2016 about some efforts to bring sandbox back, and only today, April 2017, noticed that Historically, though, since there was no perfect sandbox story, people didn't try to split crypto into electron's main, aka crypto core, and UI and whatnot into electron's renderer processes. Cryptocat may be an example here, code has been written before story of available sandbox went to Electron's blog -- that's right, there is no such story on the blog, although this is a huge deal. Unlike Cryptocat, there are folks that do even less. And those are not proper examples of Eletron app, at all. Let's propagate the story we have now! Electron now allows to split important core, and less important UI, which is POLA, and is lazy security. My envisioned use case is as follows. Yes, even PGP is e2e encrypted. We can have protocols were clients do not expose metadata. But, sometimes, I want a message to be an interactive postcard, with full html, css and javascript enabled, to have a wonderful experience. (... asking programmers, when was the last time you hand-crafted a gift card for your mom?) @tarruda some primitive documentation is needed about writing a preload script that goes on the start of a sandbox-ed window. For one, it seems that it should be browserified, as |
@tarruda can you ask on electron repo to put a few words about sandbox on the front of Electron's repo page? You have weight there. Point folks to muon, that bluntly suggest to give up on Electron, and stick with Muon. |
@diracdeltas I want to add a little detail into compartmentalization of UI picture in electron. Yes, in electron sandbox mix of vulnerable code has XMLHTTPRequest as part of DOM. But, main process has all hooks to filter it. This is what I do in our project: our own UI code doesn't have a permission just to go out and do any request(s). |
@3n-mb electron's sandbox mode is still not ideal for running untrusted content. IMO we still need at least these extra features:
Once we have these(I imagine in the next couple of months), I will implement a very simple web browser as a showcase of |
Cannot overstate how glad I am to hear that you do this sandboxing. Thank you. |
i have gotten some questions from devs about whether they should use Muon instead of Electron. we should document the reasons to do so (and how to do it) somewhere, maybe a wiki page.
this is especially of interest to developers migrating off of Chrome Apps, which will be deprecated within a year. https://blog.chromium.org/2016/08/from-chrome-apps-to-web.html
related: #87
The text was updated successfully, but these errors were encountered: