Earlier quoted context omitted.
This very thread was an example where it unintentionally got root access though.
Because of how Docker works, not because of how Unix permissions work.
Codex just found a "workaround" of not having sudo on my PC
201–210 of 330 posts
Re: Codex just found a "workaround" of not having sudo on my PC
#202That's why your coding agent should never run as your identity.
I'm curious. How do you do that?
A better approach is to use the Docker Sandboxes feature. Locks things way down so that the agent only has access to the files you give it and you can lock down its network access too. Also does things like keep any credentials outside of the container (microvm actually).
Re: Codex just found a "workaround" of not having sudo on my PC
#203Earlier quoted context omitted.
Please stop spreading this toxic curl|sh nonsense. It's wildly corrosive to security and system stability.
Is it really that much worse than using a package manager that drops a binary that you're not going to inspect anyways?
Re: Codex just found a "workaround" of not having sudo on my PC
#204Earlier quoted context omitted.
This was not always true and running rootless has been a benefit of Podman for a long time. Docker also does not run rootless by default afaik, thus making the attack surface greater by default. The other main improvement of Podman over Docker is that Podman is daemonless and therefor is incredibly lightweight and portable.
I don't understand why anyone still uses docker.
Re: Codex just found a "workaround" of not having sudo on my PC
#205Earlier quoted context omitted.
No, Docker can run rootless too
This was not always true and running rootless has been a benefit of Podman for a long time. Docker also does not run rootless by default afaik, thus making the attack surface greater by default. The other main improvement of Podman over Docker is that Podman is daemonless and therefor is incredibly lightweight and portable.
Re: Codex just found a "workaround" of not having sudo on my PC
#206Earlier quoted context omitted.
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.
Re: Codex just found a "workaround" of not having sudo on my PC
#207Earlier quoted context omitted.
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.
Re: Codex just found a "workaround" of not having sudo on my PC
#208Re: Codex just found a "workaround" of not having sudo on my PC
#209Every time I try to install Docker there's a warning that being in the "docker" group is equivalent to having root access. You should probably know about this workaround by now.
[1]: https://du.nkel.dev/blog/2023-12-12_mastodon-docker-rootless...