Live data from Hacker News

Codex just found a "workaround" of not having sudo on my PC

twitter.com

261–270 of 330 posts

Re: Codex just found a "workaround" of not having sudo on my PC

#261

Earlier quoted context omitted.

If they can override sudo, they can override which.

if you use \which it'll always be a shell built-in ;) though someone can put a different shell in your .zshrc

`exec /tmp/fake-bash` in bashrc to intercept everything?

Re: Codex just found a "workaround" of not having sudo on my PC

#262
wait till you learn what the docker socket and the API can do and how container can get access to it. docker made bad design choices from the very beginning, mainly the API was designed coarse grained and they use a socket to do things, which is also easily exposed through the network you should not run docker on servers but rather use a better designed container runtime, docker rootless is a thing but it's been bolted on the bad design choice. podman, cri-o, containerd are all better options for servers hosting prod containers. it's kinda fine when you are using it on your dev machine, but I still rather take podman because I find it cleaner, buildah and skopeo are pretty useful as well.

Re: Codex just found a "workaround" of not having sudo on my PC

#263
post #95

Earlier quoted context omitted.

Most of us install Docker just to run a project locally, and is part of a long checklist of things to install. We can't expect everyone to be an expert on the hundreds of apps/tools/packages that get installed on a machine. It's like expected people to read, and understand, all the terms of service shoved in front of us on a daily basis.

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.

Well in 2026 most likely this step was also done by an agent with --dangerously-skip-permissions

Re: Codex just found a "workaround" of not having sudo on my PC

#264

Earlier quoted context omitted.

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.

I'm more worried about my `~/.aws` and `~/.ssh` folders. People who use IDE-based AI tooling with IDEs that support dev-containers have no excuse for not leveraging dev containers, both for preventing agents losing your data and defending against secrets-harvesting supply-chain attacks

Using containers as a security boundary is inexcusable.

Re: Codex just found a "workaround" of not having sudo on my PC

#265

Earlier quoted context omitted.

Podman has lots of underappreciated features, and it's fully open-source!

hmmm, care to tell us a few of them?

I would also add buildah and skopeo to the mix of things that podman does better. also, podman desktop has better licensing that docker desktop. podman is modular and as such they could easily change the way they do networking over time, for once it doesn't break iptables and firewall rules by design but rather works together with the security design around these tools.

Re: Codex just found a "workaround" of not having sudo on my PC

#266
post #192

Earlier quoted context omitted.

Is it really that much worse than using a package manager that drops a binary that you're not going to inspect anyways?

Yes, it is worse because using your package manager trusts your distribution (and the packages packager), doing curl bash trusts a random website. While in this case docker is not a random website, it's best to use the package manager when available

To just hammer that home:

each package is signed by the person who packages it. That means that if you are pulling from a random place, you can be reasonably sure its the same package because the keys verify.

As pointed out piping curl to bash is problematic. Sure you can go to a browser and check the output, but one of the more fun hacks is detecting if curl pipeing to bash server side and dynamically re-writing the script during serving.

tldr: So long as the package keys are verifiable, you can download a packge from a random mirror and be reasonably sure that it came from who it says it did.

Curl you have no hope, and its possible to infer during execution that you are piping to bash.

Re: Codex just found a "workaround" of not having sudo on my PC

#269
post #7

Every 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.

Most of us install Docker just to run a project locally, and is part of a long checklist of things to install. We can't expect everyone to be an expert on the hundreds of apps/tools/packages that get installed on a machine. It's like expected people to read, and understand, all the terms of service shoved in front of us on a daily basis.

Man no wonder ai wows a lot of HN posters. This can't be the default attitude of developers today.

Re: Codex just found a "workaround" of not having sudo on my PC

#270
post #77

Earlier quoted context omitted.

That's true, the majority of people probably install software without much thinking; but it's also true that it's always better to have at least some high level understanding how the specific piece of software works. What access the given software has, will it send something over the network or work locally; that kind of stuff. As for Docker, I would assume everyone who ever tried to bind-mount a volume for writing f…

Docker relies fundamentally on the Linux kernel. Since macOS does not have a Linux kernel, you have to run Linux in a VM first and then run Docker on top of that. So, you may get filesystem access inside the VM. Breaking out of the VM may be a different matter.

Precisely. There is nothing preventing you from doing the same in Linux: rather than installing docker, install docker on a Linux VM (ie. using KVM).

Conversely, docker containers don't actually exist on MacOs. Docker desktop is merely a way to emulate docker on apple hardware.

Post reply on HN