Comment by Ajedi32
2 months ago
That's why adding your user account to the docker group is a separate step that explicitly does not happen as part of the installation: https://docs.docker.com/engine/install/linux-postinstall/
> Warning
> The docker group grants root-level privileges to the user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.
wait so just being lazy and using sudo on Docker commands instead of figuring things out actually means I'm being safer? awesome.
No, because a malicious AI agent could just replace the sudo binary in your path with one that collects your password and uses it to execute arbitrary code as root. Nothing short of sandboxing everything or just never using AI agents or proprietary software will prevent this.
Once I noticed that models will treat lack of superuser access as an obstacle I moved all of the agent crap to its own machine. Watching some mid-tier offering chain together tools like its a gorilla escaping the zoo and I'm just not going to deal with that situation.
10 replies →
My agent has access to my email, my messages, my work, my finances, my life. But thank god it doesn't have access to root on my machine.
1 reply →
> Nothing short of sandboxing everything or just never using AI agents or proprietary software will prevent this.
Using open-source (non-proprietary) software won’t necessarily save you either. XZ is open-source and it was basically dumb luck that we weren’t all infected. Same with the myriad exploits to NPM.
Ok but in this case the problem wasn't the AI agent - the AI agent merely took advantage of this prior problem in the first place. For instance, if docker group were not superuser-like, that issue could not have happened.
> Nothing short of sandboxing everything or just never using AI agents
But the problem was not the AI agent.
Sandboxing is quite neat though; I remember on GoboLinux the idea of AlienFS to have every application run in a sandboxed manner, so it would only see other programs it needs, but never more than that. I consider it a better engineering focus to have this as minimal layer, even outside of security-related concerns.
If malicious AI has replaced the sudo binary, then it can already run arbitrary code as root. No need to "collect your password" then
1 reply →
Sigh. What ever happened to the principle of least privilege and why arent we applying it to AI agents. They ought to be locked in a box and not capable to act outside designated task.
This feels like using Docker is just inherently unsafe.
The fact that Docker is unsafe was one of the core motivations for Podman.
1 reply →
No, using AI tools not in an effective sandbox is inherently unsafe.
1 reply →
Yes, that's why they warn you about it.
That’s what rootless docker is for
2 replies →
This feels like using sudo is just inherently unsafe.
17 replies →
funily less is often more in security while ur devving. but its best to be aware rather than lucky :p
Well in 2026 most likely this step was also done by an agent with --dangerously-skip-permissions
And containers were supposed to make things safer ...
Huge design mistake if you ask me.
i don't see how it's a design mistake, linux allows more footguns in general to not decrease utility. Allowing you to manually give root prompt access (with warnings!) to a non-root user is one of them.
you can also just not run docker as root and not add normal users to the docker group
> And containers were supposed to make things safer ...
No. Containers are a slight improvement over the .tar.gz software distribution method we had a few decades ago.
(And I mean "slight" literally - a Docker container is just a .tar.gz with a bundled bash script that runs in a chroot.)
Containers were never a security boundary