Don't package flatpak release with full file system access
The flatpak app shouldn't have access to the full file system, as that may be exploited by vulnerabilities and makes the app lest trustworthy.
I am not aware of how to make an Electron app be able to open files from argv without that permission
I'm pretty sure it's possible; I just don't know how or if that's viable from Electron
Some good news. We'll be getting rid of the full home access in the next update
Welcome improvement. Thank you!
The build was submitted to flathub. it'll probably show up within a few hours or so (update from the future: apparently removing permissions requires human review so it'll be longer than normal, but i've done all I can) (update 2: it's out)
It turns out removing --filesystem=home breaks dragging & dropping files in
https://github.com/electron/electron/issues/30650
I ended up adding --filesystem=home back because of the drag & drop problem
You can use Flatseal to manually remove it if you want. Everything else will still work
It once again does not use --filesystem=home. To make the user experience not awful with drag and drop, the app still retains direct access to a few standard folders but it can't read your SSH keys anymore. Ironically this makes the list of scary red warnings even longer:
~~(the subtitle for com.discordapp.Discord is also wrong)~~