Live data from Hacker News

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

twitter.com

271–280 of 330 posts

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

#271
This is why Claude's sandbox mode is also worse than having no sandbox feature at all. For almost any non-trivial software project you need Docker for development, either for the build pipeline, for integration testing or both.

I run Claude in a full VirtualBox VM managed by Vagrant. Claude by design has root access to the machine. Even with that, there are some risks due to it having full access to the internet, but it is still a lot better than the built-in sandbox.

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

#274
post #243

Earlier quoted context omitted.

You can run plain old CLI Docker ( not Docker Desktop) from within WSL.

You can. Would it surprise you to know that this, too, is often locked down?

That sounds terrible! Feels like your LLM agent probably has more control over your computer than you. Can't imagine being confined to a prison like that, but I suppose there are other aspects (monetary or otherwise) of the job that make up?

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

#275

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.

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.

It's why all of my agent run in a vm. I refuse to have it run on my own machine. Claude code once managed to render the vm unbootable, I was back in action 5 minutes later after regenerating the vm

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

#276

Earlier quoted context omitted.

There are lots of ways to get root on a typical Linux developer workstation, the point is that agents shouldn't be using any of them unprompted.

This. I am running Claude in its own QEMU VM, it has git access to my project only if I explicitly unlock the ssh key for it. The other day I realized it trying to push a change, it didn't have permission, so it went looking for "workarounds" and found I had a github cli session and tried to use that, luckily the creds for that was also read scoped. But the point is, if I did not give permission and it sees I did not…

> I am running Claude in its own QEMU VM

How much system resources does it need to work smoothly? I was also thinking about doing something similar.

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

#277

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.

If malicious AI has replaced the sudo binary, then it can already run arbitrary code as root. No need to "collect your password" then

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

#278

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.

If malicious AI has replaced the sudo binary, then it can already run arbitrary code as root. No need to "collect your password" then

It could just alias sudo on your ~/.bashrc. No need to replace the actual file on /usr/bin/sudo or wherever you have it. I would only need to be able to run arbitrary code as you.

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

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

[deleted]
Post reply on HN