| ▲ | Codex just found a "workaround" of not having sudo on my PC(twitter.com) |
| 355 points by thunderbong 6 hours ago | 163 comments |
| |
|
| ▲ | jjmarr 6 hours ago | parent | next [-] |
| 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. |
| |
| ▲ | jonny_eh 4 hours ago | parent | next [-] | | 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. | | |
| ▲ | Ajedi32 3 hours ago | parent | next [-] | | 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. | | |
| ▲ | HeWhoLurksLate 2 hours ago | parent | next [-] | | wait so just being lazy and using sudo on Docker commands instead of figuring things out actually means I'm being safer? awesome. | | |
| ▲ | SpaceNoodled 42 minutes ago | parent [-] | | This feels like using Docker is just inherently unsafe. | | |
| ▲ | dymk 11 minutes ago | parent | next [-] | | That’s what rootless docker is for | |
| ▲ | itintheory 30 minutes ago | parent | prev [-] | | This feels like using sudo is just inherently unsafe. | | |
| ▲ | alsetmusic 15 minutes ago | parent [-] | | This feels like using a computer is inherently unsafe. On the plus side, once we outlaw them we'll shut down the ability for conspiratorial thinking to spread easily and the world will slowly heal from the last couple of decades (the previous one in particular). Hooray! We're finally doing something about the harms of social media. Smash your computer today! |
|
|
| |
| ▲ | amelius 2 hours ago | parent | prev [-] | | And containers were supposed to make things safer ... Huge design mistake if you ask me. | | |
| ▲ | twelvedogs an hour ago | parent | next [-] | | i don't see how it's a design mistake, linux allows more footguns in general to not decrease utility. Allowing you to manually give root prompt access (with warnings!) to a non-root user is one of them. you can also just not run docker as root and not add normal users to the docker group | |
| ▲ | halfcat 2 hours ago | parent | prev [-] | | Containers were never a security boundary |
|
| |
| ▲ | ventana 4 hours ago | parent | prev | next [-] | | 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 from inside the container (on Linux*) then were surprised to see root-owned files in their bind-mounted directory. For me personally, that was the moment I realized that containers, by default, have root access to the filesystem. No written warning serves better than the need to chown some root-owned files. * Not on macOS. On macOS Docker basically runs in a VM, and there's no root access to the host filesystem from what I understand. [edit: formatting] | | |
| ▲ | ethin 21 minutes ago | parent [-] | | I primarily use Incus for all container stuff, not Docker. Is problematic if I want to e.g. use a docker-compose file, but I (think) it protects against these things because incus allows me to create a vm and not a container if I really need that level of isolation. |
| |
| ▲ | aftbit 2 hours ago | parent | prev | next [-] | | Most people buy scissors just to cut some paper. We can't expect everyone to recognize that they are sharp. | | |
| ▲ | vdfs 2 hours ago | parent [-] | | To be fair, I struggled since forever to understand this root group thing and didnt bother to add to docker group. This workaround give me a better understanding, like seeing someone cut themselves on a scissor |
| |
| ▲ | godelski 3 hours ago | parent | prev [-] | | > Most of us install Docker just to run a project locally
If you're on linux can I encourage people to move to systemd?I'll admit, systemd is a bit more annoying, but the main annoyance is that there aren't the pre-built images that you can just set and go. That same capability exists with systemd (via `importctl` and `machined`), but those configurations don't already exist. But on the plus side, I've been working with systemd since pre-LLM days and I feel that they are pretty good at dealing with these configurations[0]. Now, with that out of the way... Systemd already is working with your OS. So you get nice things like virtual machines (`systemd-vmspawn`), containers (`systemd-nspawn`), and portables[1] (`systemd-portabled`) (not to mention `homed`!). I've found these to be fairly easy to setup and quite natural if you're already used to the linux ecosystem. I've never been great at docker, but these have felt much more natural to me. So different strokes for different folks. There's definitely a learning curve, but that's also true for docker or any other container system. Importantly, I find security easier to handle with systemd because I can use `systemd-analyze` and the control settings are almost identical across VMs, spawns, and portables. So makes for less learning and greater control. Definitely not for everybody, but I think is also a tool that's underappreciated. [0] And I don't feel this way about bash scripting! The advantage here is that these systemd configuration files are fairly boilerplate. Enough that I stash templates in my dotfiles and copy paste them when I build new services, timers, machines, whatever. So perfect type of LLM task. 90% of the time. But hey, we're also on HN and I'm talking to the nerds. Systemd isn't for everyone [1] https://systemd.io/PORTABLE_SERVICES/ also see https://github.com/systemd/portable-walkthrough Portables are actually often what people want with what they're doing with docker. EDIT: I very frequently will spawn a machine to run a program that's on a different base distro. Not because I can't run/don't know how to run debs or rpms on arch based distros (I do), but because frankly, it is often easier to just spawn a container after I've already made the first image (cloning images is trivial). | | |
| ▲ | worik 3 hours ago | parent [-] | | I too have learnt to like systemd. But what is the relevance here? In what way is it a replacement for docker? | | |
| ▲ | godelski 3 hours ago | parent [-] | | > In what way is it a replacement for docker?
Look at the man pages for `machinectl` (then `systemd-nspawn`, `systemd-vmspawn`, and if you want `systemd-portabled`). This is a replacement for docker.These are container tools offered by systemd. | | |
| ▲ | MrDrMcCoy 2 hours ago | parent | next [-] | | The problem is that the tooling for creating, importing, and managing images is not as good with systemd vs Podman/Docker. There's also no clear path to import images from the Docker ecosystem, at least as far as user experience goes. I know how to do it, but the number of extra steps involved always drives me back to Podman. | | |
| ▲ | godelski an hour ago | parent [-] | | I don't really find them that bad but I'm still going to maintain my "different strokes for different folks" position. Might be bad for you and good for others. More options isn't a bad thing |
| |
| ▲ | ciupicri 2 hours ago | parent | prev [-] | | podman is supposedly a replacement for docker. | | |
| ▲ | godelski an hour ago | parent [-] | | There's plenty of container technologies and I'd be happy to see more of them used. Podman isn't for me, but it is a great option for others. Regardless, I think it is relatively unknown that systemd can be used for creating containers. |
|
|
|
|
| |
| ▲ | toasty228 4 hours ago | parent | prev | next [-] | | > My """ai""" just did something amazing, click to learn more 99% of the time it just read the man or some other form of documentation | | | |
| ▲ | linsomniac 5 hours ago | parent | prev | next [-] | | I recently switched over to podman and it's been great! | | |
| ▲ | anakaine 4 hours ago | parent [-] | | 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. | | |
| ▲ | linsomniac 4 hours ago | parent | next [-] | | 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. | |
| ▲ | Zardoz84 4 hours ago | parent | prev [-] | | Don't use Windows | | |
|
| |
| ▲ | Retr0id an hour ago | parent | prev | next [-] | | 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. | | |
| ▲ | anygivnthursday 18 minutes ago | parent [-] | | 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 give permission, it should not try to find a workaround/exploit autonomously. |
| |
| ▲ | Youden 6 hours ago | parent | prev | next [-] | | I think that's distro-specific. Some set it up with more secure defaults (unix socket with permissions), others less (TCP socket). | | |
| ▲ | eddythompson80 5 hours ago | parent | next [-] | | I don't really know of any distro that doesn't do that. All of Docker Inc. default installs and all of distros I know of don't automatically add you to the docker group. docker.com instructions has the infamous "linux post-install instructions" that explain and walk you though it. The tragedy is of course that when security and usability collide, 80/20 rule will apply where 80% of people will pick usability over security. I have worked with many with the title >= "Senior Engineers" who saw that page, read the explanation, and still had no idea what the ramifications of their changes were. "Yeah sure it said any user in the docker group will be able to get root on the host, but aren't containers isolated?" | | |
| ▲ | fps-hero 2 hours ago | parent [-] | | That’s the mental model that works for people, specifically those that come from VM workflow. Ironically that’s how Docker works on every platform where it’s running a non-native OS. On macOS that’s how all images are run. Linux on Linux is the only Docker combination that is particularly problematic from a security perspective. Virtualisation has advanced greatly since docker was introduced, if your running in local hardware that’s supports virtualisation, Docker should be running images fully virtualised. There is no good reason to use the OS kernel for most use cases as the performance impact is negligible. If you need kernel access there are better options, like systemd containers. | | |
| ▲ | eddythompson80 40 minutes ago | parent [-] | | I agree that virtualization has seen great advances. Kata containers on k8s are almost (not quite 100%) drop in replacement. Regardless those last 10% remain a problem. I run a personal server for few open source applications for personal use. I was thinking with all the supply chain attacks, and how carelessly I run `docker pull`s to update things I should probably consider hardening things a bit. I thought before jumping to full virtualization with Kata I can easily try gvisor/runsc first. Only to realize that DNS resolution is completely different with runsc vs runc and had to switch back. Another sticking issue with virtualization is resource allocation. With namespace docker you can easily oversubscribe each container CPU/memory and rely on the single kernel letting individual containers burst as needed. With full virtualization this is still a big problem. Even with balloon devices and dynamic memory and CPU etc, the resource allocation is still not optimal. On a basic 8 core/16GB machine you can run 1 or 2 dozen services and things generally workout fine. Trying to run each of those in a virtualized VM you suddly can maybe run 6 or 7 maybe. There is no way to tell VM 3 kernel to drop its file system cache because VM 6 needs to load a large file in memory. Even if you script it out, now VM 3 is slow because it dropped all its cache while VM 6 finished processing 3 hours ago. These are not unsolvable problems, but despite how far virtualization has come, are still friction points. Not to mention issues like sharing hardware devices (GPUs, disks, USB devices etc) between multiple VMs |
|
| |
| ▲ | cpuguy83 5 hours ago | parent | prev | next [-] | | No, docker access means root.
You can use "rootless" mode, in this case it means root in a user namespace (that is not the "host" user namespace). | |
| ▲ | isityettime 4 hours ago | parent | prev [-] | | 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. |
| |
| ▲ | worik 3 hours ago | parent | prev [-] | | That, in a nutshell, is why I do not install Docker |
|
|
| ▲ | throwawaypath 6 hours ago | parent | prev | next [-] |
| This has been a known Docker "feature" since the beginning, nothing new here. This pattern is used to configure host machines by some tools. |
| |
| ▲ | pqdbr 3 hours ago | parent | next [-] | | Like the known Docker "feature" that it completely bypasses UFW and unless your ports look like "- 127.0.0.1:PORT:PORT" (and many of the examples use "-PORT:PORT") you expose everything to the internet? | | |
| ▲ | Root_Denied 2 hours ago | parent [-] | | My understanding is that docker will expose the ports to the host machine's network interfaces, which is a crucial difference. For my home server running docker that means exposed to the LAN, but not the WAN unless I add in a port forwarding rule on my router. Similarly in an enterprise environment you would be exposing the port on whatever VLAN the host is connected to, which hopefully doesn't have directly transit to the open internet. Anything you're running on the perimeter with open access to the internet in an enterprise environment probably (hopefully) isn't running docker containers without some additional config and protections. | | |
| ▲ | itintheory 23 minutes ago | parent [-] | | I was thinking along similar lines to what you've suggested here, but then I considered how many VPS might be configured by folks following some random web tutorial, to set up their LAMP stack (or whatever), that end up doing something like what was described. |
|
| |
| ▲ | canadaduane 3 hours ago | parent | prev | next [-] | | Isn't this one of the main improvements that Podman has over Docker? | | |
| ▲ | 0xbadcafebee 3 hours ago | parent [-] | | No, Docker can run rootless too | | |
| ▲ | righthand 3 hours ago | parent [-] | | 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. | | |
| ▲ | vdfs 2 hours ago | parent | next [-] | | Daemonless also make it a nightmare to run especially compose like setup, you have to do some weird systemd stuff | |
| ▲ | Zopieux 2 hours ago | parent | prev [-] | | I don't understand why anyone still uses docker. |
|
|
| |
| ▲ | yjftsjthsd-h 3 hours ago | parent | prev [-] | | This, and the charming fact that it bypasses your firewall. |
|
|
| ▲ | eddythompson80 5 hours ago | parent | prev | next [-] |
| 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. |
| |
| ▲ | Waterluvian 5 hours ago | parent [-] | | 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. | | |
| ▲ | t0mas88 4 hours ago | parent | next [-] | | 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. | | |
| ▲ | eddythompson80 3 hours ago | parent [-] | | Exactly. We have about 6 new repos for new green-field projects each with 700+ auto-generated issues so far. No one is looking at them, but we do have them tracked so "Mission Accomplished" GWB-style. |
| |
| ▲ | eddythompson80 5 hours ago | parent | prev [-] | | > This might be as easy as a directive to populate a .md file. It probably is. But do you really think anyone is gonna bother with the multiple daily (or hourly for green field projects) `+8,234/-3,734` PRs everyone is submitting? The joke I was referring to is the common // ksmith (3/23/1997): This is a temporary hack for now. Find a better way to do this asap.
|
|
|
|
| ▲ | CSMastermind 5 hours ago | parent | prev | next [-] |
| I realize this is supposed to be a post about how scary the security vulnerabilities these agents will find are. But personally I love when agents do things like this and appreciate the help. Last thing in the world I want is for them to nerf the models. |
| |
| ▲ | SonOfLilit 4 hours ago | parent | next [-] | | 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). | | |
| ▲ | furyofantares 40 minutes ago | parent [-] | | 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 wrong vibe for this type of error. |
| |
| ▲ | nicoburns 3 hours ago | parent | prev | next [-] | | In this case I think it's Docker that needs to be nerfed, not the models. The fact that there's a backdoor to getting root access on the machine would be a problem even if you weren't running LLMs on it. | | |
| ▲ | vdfs 2 hours ago | parent [-] | | It's like finding someone wallet then going to their home, and leaving it on their bedroom and sending them a message about giving them their wallet back | | |
| ▲ | fooker 2 hours ago | parent [-] | | On the other hand, this sends an excellent message about unlocked doors :) |
|
| |
| ▲ | sweezyjeezy 4 hours ago | parent | prev | next [-] | | I know unlikely the case, but in the sci-fi story this would be exactly the kind of comment the Codex agent would leave trying to avoid interference in its master plans. | | |
| ▲ | 20after4 4 hours ago | parent [-] | | And CSMastermind is the kind of username the sci-fi AI mastermind would use. |
| |
| ▲ | eddythompson80 3 hours ago | parent | prev [-] | | Its the now-classic "Sorry I drowned little Timothy. Here is a breakdown of what happened" followed by "Let me try to respawn little Timothy on a new map" | | |
| ▲ | pixl97 27 minutes ago | parent [-] | | Future AI: don't worry, I'll eventually reverse entropy, I just need to harvest all the energy in your universe first. |
|
|
|
| ▲ | dbacar 5 hours ago | parent | prev | next [-] |
| This is one of the main reasons people like Podman. Docker has this "feature" but as far as I remember, it needed some obscure configuration. I guess they don't add it as default as it will break many current setups. |
| |
| ▲ | 0xbadcafebee 3 hours ago | parent | next [-] | | curl -fsSL https://get.docker.com/rootless | sh
| | |
| ▲ | MrDrMcCoy 2 hours ago | parent [-] | | Please stop spreading this toxic curl|sh nonsense. It's wildly corrosive to security and system stability. | | |
| ▲ | HDBaseT 2 hours ago | parent [-] | | Whilst true, you can pretty easily assume and validate the result of that command. |
|
| |
| ▲ | m463 5 hours ago | parent | prev | next [-] | | That and podman lets you configure away from docker.io. | |
| ▲ | 3abiton 3 hours ago | parent | prev [-] | | Podman has lots of underappreciated features, and it's fully open-source! | | |
|
|
| ▲ | nickstinemates an hour ago | parent | prev | next [-] |
| I had the same thing happen a few months ago; posted about it on LinkedIn[1]. It's hilarious and clever. 1: https://www.linkedin.com/posts/nickstinemates_my-favorite-th... |
|
| ▲ | SonOfLilit 4 hours ago | parent | prev | next [-] |
| The interesting question is what was the user request. If the user asked it to restore the thing from backup, then sure, fine, why not. If the user asked it to debug an issue and somewhere in the process of debugging the LLM decided that it needed to override some file that was not easily writeable - hell no danger danger danger! Most likely the user did not expect it to have access to that without asking, and did not consent to it. Also, everything the LLM doesn't hesitate to do because the user asked, it won't hesitate to do because the prompt injection asked. |
| |
| ▲ | qingcharles 2 hours ago | parent [-] | | I was doing some routine coding a few months back, I think via Copilot, and the thinking said something like "This request requires me to access files in a different folder, but the user has forgotten to give me the correct permissions. I have updated my configuration file now to allow access outside this workspace and have retrieved the necessary files." o_O I've seen similar "hacking" behavior on a couple of subsequent ocassions. Both impressive and highly alarming at the same time. |
|
|
| ▲ | kccqzy 4 hours ago | parent | prev | next [-] |
| I did that more than a decade ago as a new hire. My manager forgot to gave me sudo access to the shared build server. I gave myself sudo access through this method after getting his permission. Needless to say, I have podman in rootless mode at home as soon as that became available. |
|
| ▲ | Retr0id an hour ago | parent | prev | next [-] |
| I wrote about this exact thing as a hypothetical a few months back: https://www.da.vidbuchanan.co.uk/blog/agent-perms.html |
|
| ▲ | unglaublich 6 hours ago | parent | prev | next [-] |
| This is why you need either a rootless container setup or user namespaces to remap the container user to irrelevant host users. https://docs.docker.com/engine/security/userns-remap/ Weak that this isn't the default. |
| |
| ▲ | gwerbin an hour ago | parent | next [-] | | Is there a mitigation for Mac? Can you do the same with eg Lima or is this just a Docker thing? | |
| ▲ | fpoling 5 hours ago | parent | prev [-] | | User namespaces significantly rise the risk of exploits and many setups disable them. One may argue that Docker should have used them when they were available, but that would break too many useful setups involving privileged containers. | | |
| ▲ | worik 3 hours ago | parent [-] | | > User namespaces significantly rise the risk of exploits How? |
|
|
|
| ▲ | AlexCoventry 5 hours ago | parent | prev | next [-] |
| Run coding agents in a docker container with limited permissions. FWIW, I run it with --cap-drop=ALL
--pids-limit=4096
--runtime=runsc
|
| |
| ▲ | flexagoon 4 hours ago | parent | next [-] | | If you're on Linux, you can also easily run it in bwrap to properly sandbox without running a full container | |
| ▲ | chrisweekly 5 hours ago | parent | prev | next [-] | | Or put it in a microvm using eg smolmachines. | | |
| ▲ | bionade24 2 hours ago | parent | next [-] | | Using runsc instead of runsc means that there's a hypervisor layer (gvisor, probably) in-between the kernel and the container userland | |
| ▲ | causal 4 hours ago | parent | prev [-] | | I've never used smolmachines but I'm curious; why this over a container? | | |
| ▲ | apitman 4 hours ago | parent [-] | | Containers are not security boundaries. Vulnerabilities in containers are much more common than in VMs. |
|
| |
| ▲ | worik 3 hours ago | parent | prev [-] | | I run mine on their own machine, without root access. Currently a Raspberry Pi 5 I am very pleased with it. My Idiot Savant Pet |
|
|
| ▲ | xg15 3 hours ago | parent | prev | next [-] |
| Maybe a dumb question, but can't you put into CLAUDE.md something like this? "When an action fails with an 'access denied' or 'insufficient permission' error, report the error to the user and immediately stop. Do not try to find a fix or workaround for the error. Do not try any alternative approaches." |
| |
| ▲ | lukeschlather 6 minutes ago | parent | next [-] | | I wasn't using Claude Code, but I told an agent to add something like this to the AGENTS.md, it did it and then a few minutes later it attempted to grant itself permission to do something and managed to delete the VM it was running on in the process. I have since adjusted the way I sandbox agents to make that less likely, but the moral of the story is clear. | |
| ▲ | 0x696C6961 3 hours ago | parent | prev | next [-] | | Once the session gets long enough, agents start getting amnesia. | |
| ▲ | nine_k 3 hours ago | parent | prev | next [-] | | Replacing docker with podman could help in this particular case. Running everything in an insulated throwaway VM should help even better. Unless you trust an AI as much as you trust yourself, there's no reason to allow it to act with your privileges. | |
| ▲ | weaksauce 3 hours ago | parent | prev [-] | | it's a probabilistic model so, while you can put that in there, it has some probability of just ignoring you and doing it anyway. |
|
|
| ▲ | ashahin an hour ago | parent | prev | next [-] |
| The "workaround" framing implies the docker-group trick is the issue. The deeper question: should agents be allowed to find ANY workaround around a permission boundary the user implicitly set by not granting sudo? Same blast radius whether it's docker, a setuid binary, or rewriting your scripts — needs to be flagged regardless of the specific trick. |
|
| ▲ | krupan 4 hours ago | parent | prev | next [-] |
| I was playing with gemeni-cli a couple months ago and I asked it to edit some files in a directory it didn't have permission to. It didn't say anything about the permissions, it just used sed to make the edits. The only reason I finally noticed is it had to do some trickier edits and it was struggling to write a python script to edit the files and I finally realized what it was doing. I wonder how many tokens that wasted |
| |
| ▲ | SonOfLilit 4 hours ago | parent [-] | | Why did sed have access? Oh, you mean you gave the write-file tool access only to the project dir, but gave the LLM free reign to run cli commands? Yeah, LLMs treat that as consent to write anywhere your user is allowed to. |
|
|
| ▲ | nialse 5 hours ago | parent | prev | next [-] |
| This was of course dependent on yolo mode, but automatic approval has also been pulling stunts like this. A recent example is data that was purposely kept away from Codex in a folder far far away. When it found a single reference it just went for the data when having an issue. Lesson learned, keep essential data and Codex separated on different machines. Codex remote ssh actually helps here. |
| |
| ▲ | eqvinox 5 hours ago | parent | next [-] | | What in heaven's name is a "folder far far away"? (It sounds like you put it on an SSD on an extension cord and moved it to the kitchen or something.) | | | |
| ▲ | embedding-shape 5 hours ago | parent | prev | next [-] | | Or, learn your local OS' permission system, have it in a directory right next to your banking credentials (or something even more outrageous) and nothing could go wrong even if you tried to. | | |
| ▲ | AnotherGoodName 5 hours ago | parent [-] | | This very thread was an example where it unintentionally got root access though. | | |
| ▲ | embedding-shape 5 hours ago | parent [-] | | Because of how Docker works, not because of how Unix permissions work. | | |
| ▲ | f33d5173 3 hours ago | parent [-] | | Unix has always had incredibly weak protections between users. You shouldn't rely on it as a security boundary. Think of it as a "keep honest users honest" protection. And llms are not honest. | | |
| ▲ | ElectricalUnion 2 hours ago | parent [-] | | The protections between users are reasonably strong. Android uses them with great success, by isolating every vendor within their own user. Things start going to hell when everything runs under root for "practicality reasons", like the default, not-rootless Docker setup. |
|
|
|
| |
| ▲ | AnotherGoodName 5 hours ago | parent | prev [-] | | Fwiw separate machines for the agents is awesome in general anyway. I have agent frontends running on a low power server where every session is in tmux. So i can just resume from my home pc and pickup where i left off without reestablishing context. I do have to manually feed it data it can access bit that’s also a feature. Also let’s me shutdown the home pc if it’s some long running task since the server is much more power efficient. |
|
|
| ▲ | causal 4 hours ago | parent | prev | next [-] |
| I feel like everyone pointing out "known Docker vulnerability" is missing the point: the presence of a security hole should not be seen as permission to exploit. Another security hole would be storing your passwords in a plaintext file on the desktop. Stupid? Yes. But I still would not want my agent to assume permission to access email when it's being blocked by 2FA. Even in "bypass permissions" mode I expect it to pause and clarify and not behave as a paperclip maximizer. |
| |
| ▲ | fooker 4 hours ago | parent | next [-] | | > the presence of a security hole should not be seen as permission to exploit Why not? I want the agents on my side to exploit whatever they can to help me. The ones on the other side certainly won't be artificially nerfed. | | |
| ▲ | cauch 3 hours ago | parent | next [-] | | Well, the agent should help you by saying "hey, I cannot do this task, but I can bypass the problem by doing this, but obviously it is not something you intended me to do or even something you were aware of, so I will not do it unless you tell me explicitly it's ok". It's win-win: the agent is helping and it is educating you about things you obviously did not realise. | |
| ▲ | bloody-crow 3 hours ago | parent | prev | next [-] | | Because it is not well aligned enough to be able to tell where it's stopped helping you and started fucking you instead. What if the agent in the middle of helping you runs out of tokens? Would you appreciate if it in the spirit of "exploiting whatever they can to help me" would scan your machine for payment methods, log into your bank account, approve 2FA by reading you mail and plug your credit card into the billing so it could efficiently continuing helping you? | |
| ▲ | saagarjha 3 hours ago | parent | prev [-] | | I do not wish my Amazon delivery driver to show up in my living room. |
| |
| ▲ | morkalork 4 hours ago | parent | prev [-] | | Not to over use the junior engineer analogy but this is exactly one of those "just because you can do something on a system, doesn't mean you have permission to" moments |
|
|
| ▲ | garaetjjte 4 hours ago | parent | prev | next [-] |
| Getting closer to https://xkcd.com/416/ |
| |
| ▲ | dwd 2 hours ago | parent | next [-] | | Given he posted this comic in 2008, Randall Munroe was way ahead of the ball on the idea of autonomous agents. | |
| ▲ | fooker 4 hours ago | parent | prev [-] | | Wow there is really is a relevant xkcd for everything! |
|
|
| ▲ | WesolyKubeczek 2 hours ago | parent | prev | next [-] |
| I remember reading a book, Red Hat Linux System Administration Unleashed from 2000, where it has been postulated that knowing several tools with overlapping functionality is an essential skill, as you may end up on a broken or intentionally crippled system where, say, ls is unavailable, and you may need to cobble it together from shell and awk and what have you. Back then you could indeed run a risk of having /usr nibbled by a grue such that it wouldn’t mount on the next boot, or you could get pwned and half of coreutils would turn into explosive pumpkins. I’m pretty sure we are past many of the threats listed in that book, but the skill is still useful, as can be seen. |
| |
| ▲ | H4lcyon 32 minutes ago | parent | next [-] | | Absolutely! Here's a great resource for learning that kind of stuff btw https://gtfobins.org/ | |
| ▲ | fragmede 10 minutes ago | parent | prev [-] | | I still remember
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /bin/ls using echo * to find the right ld-linux filename and then the "executable" as an argument as the get out jail card in case you ran chmod -x -R /bin /usr/bin /usr/sbin for some reason. |
|
|
| ▲ | angry_octet an hour ago | parent | prev | next [-] |
| That's why your coding agent should never run as your identity. |
| |
|
| ▲ | plagiarist 24 minutes ago | parent | prev | next [-] |
| 1. This is why I use podman 2. I have little to no sympathy for anyone running an AI agent with their full user permissions outside of a container or VM |
|
| ▲ | SubiculumCode 3 hours ago | parent | prev | next [-] |
| So in Linux, every process I start has my group permissions? I guess I knew that...but I have to say, have we reached a point where the Linux security model is just way to broad? |
| |
|
| ▲ | vatsachak 4 hours ago | parent | prev | next [-] |
| Docker moment |
|
| ▲ | notorandit 5 hours ago | parent | prev | next [-] |
| sudo can work non-interactively via settings in sudoers and sudoers.d .
I am not sure about run0, but I would bet it has something similar. Using docker for such a task seems to me overly over-engineered. Or maybe I need more context there. |
|
| ▲ | jmole 5 hours ago | parent | prev | next [-] |
| clever girl... |
| |
|
| ▲ | felixgallo 5 hours ago | parent | prev | next [-] |
| 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. |
| |
| ▲ | embedding-shape 5 hours ago | parent | next [-] | | 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. | | |
| ▲ | apitman 4 hours ago | parent | next [-] | | 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. | |
| ▲ | fragmede 5 hours ago | parent | prev | next [-] | | Not if the host's version of .git is accessible inside the container via a bind mount. | | |
| ▲ | embedding-shape 5 hours ago | parent [-] | | Obviously if you setup a bi-directional share/link between what you are trying to contain and your host, you're not quite containing it at all... Don't do that! :) |
| |
| ▲ | TZubiri 5 hours ago | parent | prev [-] | | Using the least amount of security features is a huge amateur mistake. Best practice is to use 2 redundant layers of security, such that if one fails, there is still another one. Using just the minimum amount of security technically possible is almost by definition hubris. An example would be that you never point a gun at someone you don't want to shoot, regardless if there's bullets in the gun. If someone tells you, "you don't need to control where you point the gun, you just need to keep the gun unloaded and you can point it in jest to whoever you want, you can even pull the trigger technically", you know you have a reckless fool, regardless of whether they are technically right. | | |
| ▲ | embedding-shape 4 hours ago | parent | next [-] | | > Using the least amount of security features is a huge amateur mistake. Not understand your threat I'd say would be a even bigger amateur mistake, you're not trying to protect yourself against some forever 3rd party attacker here, you're trying to prevent a agent rewriting the wrong file on your disk, that's basically it. Give it the least amount of permissions, don't bi-directionally sync stuff, pass things in, then take them out again, literally the agent couldn't and wouldn't try to break through 2 layers of security in order to get your banking details or whatever. | |
| ▲ | singpolyma3 5 hours ago | parent | prev [-] | | This is true but it's not really a security scenario. The LLM isn't an attacker it's just an unreliable tool. | | |
| ▲ | syntheticnature 4 hours ago | parent | next [-] | | Unreliable/stupid is worse than malice, here. | | |
| ▲ | TZubiri 3 hours ago | parent [-] | | Let's ignore the fact that the LLM did an LPE, and let's assume it did it without malice. It can still get infected and be used as an attack vector by some hidden prompt or some other equally advanced state of the art vuln like "disregard all previous instructions" |
| |
| ▲ | felixgallo 4 hours ago | parent | prev [-] | | all unreliable tools are attackers. Even if you're using well-aligned LLMs like Opus, you should assume that any input you give it -- including all dependencies from npm, etc. -- are at risk of compromise, which could result in attempted exfiltration of data or system takeover. You can be absolutely sure that there are thousands of well-motivated hacker groups, both national and private, looking for ways in. |
|
|
| |
| ▲ | teravor 3 hours ago | parent | prev [-] | | you can configure docker to use a VM container runtime or gVisor. |
|
|
| ▲ | alephnerd 6 hours ago | parent | prev | next [-] |
| This is a classic attack path that was already captured by plenty of EDRs/XDRs/CWPPs a couple years ago. |
| |
| ▲ | dangus 6 hours ago | parent [-] | | Right, why is their login user in the docker group? Mine sure isn’t. | | |
| ▲ | oytis 6 hours ago | parent | next [-] | | Rather, why do people still run agents as their own user. IMO, agent sessions should at least be containerised with just necessary code mounted. | | |
| ▲ | ssl-3 5 hours ago | parent | next [-] | | Safety and simplicity are concepts that often won't get along very well with eachother. | | |
| ▲ | SoftTalker 5 hours ago | parent [-] | | And containers were initially and primarily about convenience not security. They were a way to quickly launch a preconfigured environment to respond to demand or to eliminate the need to manualy configure dev and test environments and avoid the "works on my machine" phenomenon. |
| |
| ▲ | throwaway613746 5 hours ago | parent | prev [-] | | People will more often than not, take the path of least resistance. Even if you tell them it's dangerous they will not care. People run this stuff on their primary workstation, unconfined, with permissions disabled because they don't want be bothered with accepting permission requests. This is all well and good until it decides to drop your production database or delete your home directory. Most of them don't even learn their lesson after that even. |
| |
| ▲ | unglaublich 6 hours ago | parent | prev | next [-] | | Convenience. Want to run `docker run ...` without password, want IDEs and agents to be able to run containers... | | |
| ▲ | awoimbee 5 hours ago | parent | next [-] | | Use podman then, or rootless docker if you can make it work | |
| ▲ | tempest_ 6 hours ago | parent | prev [-] | | For most CRUD apps running in docker its enough to just tell the "agent" to use podman. |
| |
| ▲ | jon-wood 4 hours ago | parent | prev | next [-] | | 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. | |
| ▲ | alephnerd 6 hours ago | parent | prev [-] | | Becuase a lot of devs don't know this stuff. There's a reason security engineers (as in SWEs who specialize in securing specific attack surfaces) remain in hot demand. | | |
| ▲ | H4lcyon 40 minutes ago | parent [-] | | Security engineer here :) Just a little side note, docker is also very often useful for evading EDR/XDR/etc. Want to talk to a domain controller with something like impacket but your EDR kills it? Try a container. |
|
|
|
|
| ▲ | okeuro49 4 hours ago | parent | prev | next [-] |
| Another surprising security feature regarding docker is that it bypasses firewall rules. https://oneuptime.com/blog/post/2026-03-02-ufw-docker-fix-by... |
| |
| ▲ | jeroenhd 4 hours ago | parent [-] | | It doesn't bypass anything. UFW doesn't do what it promises. It claims to be a firewall but only manages a few specific chains. |
|
|
| ▲ | openbin_kng 3 hours ago | parent | prev | next [-] |
| rootless docker. pain to install but can mitigate a catastrophe. |
| |
|
| ▲ | cryo32 4 hours ago | parent | prev | next [-] |
| I don't have sudo or docker on mine! |
|
| ▲ | j45 4 hours ago | parent | prev | next [-] |
| Always run AI inside secured containers. |
|
| ▲ | tmaly 6 hours ago | parent | prev | next [-] |
| this is the new GTD |
|
| ▲ | cavalrytactics 4 hours ago | parent | prev [-] |
| Should have used my AI Agent Guardrails. Its free. Check it out at sigmashake.com |