Live data from Hacker News

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

twitter.com

211–220 of 330 posts

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

#211
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.

This is why I have never really liked docker, apparently Podman is drop-in capable for docker without the root requirements on the other hand.

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

#212

Earlier quoted context omitted.

It's not about hacking capabilities, it's about misalignment. More like the golem myth (told it to fetch some water, drowned a city) then the gollum myth (used ring, ring hacked his brain, now he's a crazy violent meth addict).

I'm not sure I'd call it an alignment issue, because, in all cases I've seen where it does this (usually what I've seen is writing a python script to get around the harness permissions blocking something), it's trying to do the thing I just told it directly to do, and it's overcoming obstacles to accomplishing that. It's definitely doing the wrong thing, and you could call it misalignment, but I think that gives the…

The obstacle is supposed to be there and is supposed to be respected as an implicit order. Getting around it without extremely explicit instructions is an alignment problem.

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

#215

Earlier quoted context omitted.

I'm curious. How do you do that?

First, do everything in a virtual machine, and only put on that machine the specific data you're using. Give the agent another user account and put both you and it in a common group. Chgrp g+rX your origin data directory, chgrp g+rwX a working directory. If you're cautious you might also want to just block all network traffic for that user and allow it in a whitelist basis. It is fairly quick to converge on a set of…

thank you. I probably have been playing a little loose. I did not realize that they could use my docker group to fuck around with everything. Well, I AM using codex as a vs code plugin. I dont know if that gives me any protection or not.

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

#216

Earlier quoted context omitted.

I'm curious. How do you do that?

For some very basic level protection use devcontainers and install the agent into 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).

thank you. this article freaked me out a bit because I hadn't realized the docker loop hole.

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

#217

Earlier quoted context omitted.

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.

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.

As always. XKCD: https://xkcd.com/1200/

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

#218
post #192

Earlier 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?

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

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

#219

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

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.
Post reply on HN