emersion / hydroxide

A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge
MIT License
1.64k stars 126 forks source link

(security) Add Firejail support #240

Closed bruceleerabbit closed 1 year ago

bruceleerabbit commented 1 year ago

Firejail is a sandbox that gives users some basic confidence that an untrusted app is not snooping on the local system (e.g. filesystem) without having to do a code inspection. It also gives users some control over an app’s access to network space.

Apps sometimes support network proxies (e.g. bug #110), but that’s merely a user preference. Apps can (and sometimes do) ignore user specified proxies, in which case users still must /trust/ the app to use the proxy. Leaks are possible due to human error, as an app may put most transactions over the proxy but overlook using the proxy for some transactions. Firejail definitively enforces the users’ access expectations.

Supporting Firejail does not require any code changes. It entails creating a profile that specifies files and resources that Hyroxide needs.

A comment requesting the same has been made to the Firejail project.

When the Firejail profile is complete, it’s useful even to non-Firejail users because it shows users what directories & accesses are needed. In the absence of a firejail profile, the installation docs should show which Firejail commandline options are needed for each command.

Note that @wokawoka’s needs which motivated bug #150 could be satisfied this way. He is perhaps concerned that proxies could leak, and that the app ultimately must be trusted by the user. A Tor middlebox can be used in tandem with firejail to force all transactions over Tor (even if an app would deliberately attempt to bypass Tor).

emersion commented 1 year ago

Not interested in this, sorry.