igo95862 / bubblejail

Bubblewrap based sandboxing for desktop applications
259 stars 17 forks source link

secure global Flatpak configs to protect bubblejail home #143

Open boredsquirrel opened 1 day ago

boredsquirrel commented 1 day ago

Description

Afaik bubblejail protects it's home from other bubblejailed applications.

To complete this, Flatpak apps must not access the bubblejail directories either.

This can be accomplished like this:

cat >> ~/.local/share/flatpak/overrides/global <<EOF
[Context]
filesystems=!~/.local/share/flatpak/overrides;!~/.local/share/bubblejail
EOF

This blocks all flatpak apps from changing their own configurations, and from accessing the bubblejail homes or configs.

Or the more complete file that I use, to block pulseaudio, x11 and ipc to prevent apps sniffing each other.

cat >> ~/.local/share/flatpak/overrides/global <<EOF
[Context]
filesystems=xdg-run/pipewire-0:ro;!~/.local/share/flatpak/overrides;!~/.ssh;!~/.gnupg;!~/.local/share/bubblejail
sockets=!x11;!pulseaudio;wayland;
shared=!ipc;

[Environment]
QT_QPA_PLATFORM=wayland
ELECTRON_OZONE_PLATFORM_HINT=auto
EOF
igo95862 commented 1 day ago

Interesting but I am not sure about messing with other applications settings.

Also wouldn't it only be relevant for flatpak applications that have complete access to home file system?

rusty-snake commented 1 day ago

My two cents about this,