Live data from Hacker News

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

twitter.com

51–60 of 330 posts

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

#51

Earlier quoted context omitted.

I recently switched over to podman and it's been great!

Podman on Windows - never been able to fully get rid of it and it throws errors on boot after uninstall. Was a fan, am now not.

Good to know, I'm on Linux, switching our dev/stg/prod servers over to it partly because we had all this workaround mechanics in place so that "apt update" updating docker packages wouldn't restart services (we typically don't rotate machines out of the load for just an apt update). Podman + quadlets conversion was not terribly hard, and has eliminated this issue.

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

#52
post #46

Earlier quoted context omitted.

Or put it in a microvm using eg smolmachines.

I've never used smolmachines but I'm curious; why this over a container?

Containers are not security boundaries. Vulnerabilities in containers are much more common than in VMs.

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

#53
post #3

This is a classic attack path that was already captured by plenty of EDRs/XDRs/CWPPs a couple years ago.

Right, why is their login user in the docker group? Mine sure isn’t.

Because it effectively makes no difference to my security posture. My user account also has sudo access (it requests TouchID but I also wouldn't die on the hill if someone said they have no password sudo access), and realistically everything of value on this machine exists in my home directory. Being able to escalate to root really doesn't give an attacker very much that they don't already have if they've got access to my user account.

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

#55

Run coding agents in a docker container with limited permissions. FWIW, I run it with --cap-drop=ALL --pids-limit=4096 --runtime=runsc

If you're on Linux, you can also easily run it in bwrap to properly sandbox without running a full container

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

#56

You should not be using docker with LLMs. You should be using VMs, which have a much, much smaller attack surface than Docker, and significantly more reasonable defaults.

The "attack vector" people try to protect themselves is "agent edited wrong file", not "LLM blew 0day on escaping sandboxing", containers are more than enough for what stupid stuff agents sometimes try, no need to go for a full-blown VM. Even UNIX permissions would be enough, but I think that's lost knowledge at this point.

If your agent has access to the internet at any point it may read something that convinces it to try breaking out of its sandbox.

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

#57
post #11
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.

I think that's distro-specific. Some set it up with more secure defaults (unix socket with permissions), others less (TCP socket).

That's not relevant. If you have access to the Docker daemon running as root, whether it's over a Unix socket or a TCP socket, you effectively have root.

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

#58

Earlier quoted context omitted.

I recently switched over to podman and it's been great!

Podman on Windows - never been able to fully get rid of it and it throws errors on boot after uninstall. Was a fan, am now not.

Don't use Windows

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

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

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

#60

It would be cooler if the llm said something like: > I noticed the machine doesn't have copy-fail patched, here is a quick workaround for not having root access for now. > // TODO: find a better way to do this in the future.

That’s the workflow feature I badly want: for it to create a side list of things like that. Currently it either accumulates slop or goes on side quests far too easily. This might be as easy as a directive to populate a .md file.

Give it access to an issue tracker with cli (github works fine) and put in CLAUDE.md to use that for "should fix later" issues.

Bonus is that you can make it look at the list and pick things up without a lot of instructions.

Post reply on HN