I expect the Flatpak sandbox to protect my ~/ from getting cluttered by applications, not to protect me from any actually malicious software. The post's premise seems misguided.
YES. I don't understand this delusion people keep perpetuating. Flatpak has a MILD form of container sandboxing. For a real security sandbox we have Firejails or Bubble wrap.
Flatpak is, at it's core, a software development and distribution packaging format. NOT a security implementation.
If we admit that then an app store where anyone can create an account and upload software becomes extremely problematic. This is especially true wherein clients autoupgrade very quickly.
Step one. Legit package a popular app
Step two. Wait for substantial uptake
Step three. Mix in some ad or malware and watch a tens of thousands get instantly owned.
I ignored flatpaks long enough, as everything could be installed as packages, without additional GBs of dependencies/libraries/runtimes of flatpaks, that duplicate the system ones. Recently started using immutable system, which assumes flatpaks is primary way to install apps. I found it is incredibly convenient when all your apps put their data in a single place, easier to backup and system looks clean without bunch of shit, apps create where they want.
In addition to own new code, bundled copies of libraries in packages introduces net new attack surface which isn't patched via the regular distribution security patch process. The image decoding lib that allows remote code execution now exists in flatpaks independently from the one in /lib. Every flatpak vendor that contains it has to build and ship their own patched version of it. This is even more valid for any other libraries flatpaks include that don't exist on the system. The most widely used Linux OSes come with security patching processes, expectations and sometimes guarantees. This new attack surface breaks those and the solution is security sandboxing. This approach has been proven in mobile app packaging and distribution systems. Android is a great example where apps are not trusted by default and vulnerable ones rarely cause collateral damage on otherwise up-to-date Android systems. This is an objective problem with the out-of-band distribution model allowed by flatpak and snap or any similar system, whether you care about it or not personally. It's a well understood tradeoff in software development. It has to be addressed as adoption grows or we risk reducing Linux security to the levels of Windows where apps regularly bundle dependencies with no sandboxing whatsoever.
Yes, I’m trusting flathub. LOL about people repackaging applications. Wait until they find out the Linux distro they use is a collection of software repackaged by 3rd parties. 😂
Userland hasn’t had any concept of security, so it’s nice people are trying to fix it.
This is generally good advice. Would you run the program without a sandbox? No? Then you probably shouldn't run it inside a sandbox either.
You can never be sure that the program isn't using a flaw in the sandbox to break out or is just piggybacking onto a whitelisted action that is required for the program's basic functionality.
And if some program requires r/w for your entire home directory and network access then you might as well not use a sandbox in the first place because it can already do everything useful that it needs to do.
Yes, makes Debian desktop perfect. Rock solid base system, all desktop apps updated to the latest and greatest without pollution.
Are you trusting Flathub?
Yes BUT... there should be a way to have / manage / install Flatpaks offline like AppImages and/or easy and officially supported ways of archiving the repository into something useful and easy to use.
I would love to install a browser, and a password manager through flatpaks but they won’t talk with each other.
I would get an IDE like visual studio code, through flathub, but it doesn’t talk with the system software I want to develop on.
I would love to get Steam or any other games as flatpaks but having to redownload mesa and other system files just for that uses a lot of space and feels like a second OS.
So yeah, I agree with you. It’s awesome! But it has some flaws right now (that I’m sure they’re being worked on)
Yes but they solve the cross distro packing problem and that's neat. The GNOME Software integration is also amazing, those few times when you see that desktop Linux actually can do it. :P
I just hope for better and easier tools to mange the security / process communication. For me flatpaks are more about finally having a fast and decent way of packing stuff across distros with dependencies than a sandbox / security feature.
FWIW I figured out how to get a password manager (Browserpass, not KeePassXC) to communicate with flatpak Chrome if you want some advice on how to get it to work.
But yes, it was way more difficult than it should have been (which is "should work out of the box, just like a regular package"). So if you're just listing some of the shortcomings of flatpak, never mind.
Yes, that works really well and whatnot. Totally reliable way of doing it. :P
Because the flatpak components/dependencies of a program can differ depending on the host (for example if you have an NVIDIA card, it will pull some NVIDIA dependencies), so if you export a program from a non-NVIDIA system to the other, it won't be complete to work reliably on the new system, but the missing parts can be downloaded on the Internet, it's still reducing the bandwidth requirement.
As someone who struggled quite a bit to learn Nix, I'd say start small. Install Nix the package manager on any old distro you're familiar with and play with standalone Home Manager. Enable one program here and there, have it manage your shells and CLI apps, set environment variables and write files. It's something you can immediately see the effects of and feels pretty rewarding, so I think it's a great place to start.
I also happened upon this video series a few days ago and it's a great resource, easy to parse and walks you through not only the basics but how to look around and investigate in the REPL when you want to figure something out.
I'm mostly using Flatpaks on Tumbleweed, I only use the package manager if I can't find a Flatpak version. Reason for that is that with Flatpak I can precisely know what I manually installed, as Tumbleweed lacks a proper easy way of getting a list of user installed packages
That's a feature not a bug. Under flathub, the original author of the software (for verified apps at least) knows what is the best configuration to ship for their package.
ATM. You are not trusting flathub when installing a flatpak. You are trusting the application's author. Maybe in the future, flathub would introduce restrictions on certain permissions but we would be speculating at that point.