40 comments

  • jjmarr7 hours ago
    Every time I try to install Docker there&#x27;s a warning that being in the &quot;docker&quot; group is equivalent to having root access.<p>You should probably know about this workaround by now.
    • jonny_eh5 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&#x27;t expect everyone to be an expert on the hundreds of apps&#x2F;tools&#x2F;packages that get installed on a machine. It&#x27;s like expected people to read, and understand, all the terms of service shoved in front of us on a daily basis.
      • Ajedi324 hours ago
        That&#x27;s why adding your user account to the docker group is a separate step that explicitly does <i>not</i> happen as part of the installation: <a href="https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;install&#x2F;linux-postinstall&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;install&#x2F;linux-postinstall&#x2F;</a><p>&gt; Warning<p>&gt; 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.
        • HeWhoLurksLate3 hours ago
          wait so just being lazy and using sudo on Docker commands instead of figuring things out actually means I&#x27;m being <i>safer?</i> awesome.
          • SpaceNoodled2 hours ago
            This feels like using Docker is just inherently unsafe.
            • LeFantome58 minutes ago
              The fact that Docker is unsafe was one of the core motivations for Podman.
            • dymk1 hour ago
              That’s what rootless docker is for
            • itintheory2 hours ago
              This feels like using sudo is just inherently unsafe.
              • gruez47 minutes ago
                This but unironically. There&#x27;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.
              • alsetmusic2 hours ago
                This feels like using a computer is inherently unsafe.<p>On the plus side, once we outlaw them we&#x27;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).<p>Hooray! We&#x27;re finally doing something about the harms of social media. Smash your computer today!
                • b65e8bee43c2ed020 minutes ago
                  I think we&#x27;re only a few decades away from these things being said unironically.
                • LeFantome57 minutes ago
                  Safety meeting. Nobody works, nobody gets hurt.
        • amelius3 hours ago
          And containers were supposed to make things safer ...<p>Huge design mistake if you ask me.
          • twelvedogs2 hours ago
            i don&#x27;t see how it&#x27;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.<p>you can also just not run docker as root and not add normal users to the docker group
          • halfcat3 hours ago
            Containers were never a security boundary
      • ventana5 hours ago
        That&#x27;s true, the majority of people probably install software without much thinking; but it&#x27;s also true that it&#x27;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.<p>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.<p>* Not on macOS. On macOS Docker basically runs in a VM, and there&#x27;s no root access to the host filesystem from what I understand.<p>[edit: formatting]
        • LeFantome52 minutes 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.<p>So, you may get filesystem access inside the VM. Breaking out of the VM may be a different matter.
        • ethin2 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.
      • aftbit3 hours ago
        Most people buy scissors just to cut some paper. We can&#x27;t expect everyone to recognize that they are sharp.
        • vdfs3 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
      • godelski5 hours ago
        <p><pre><code> &gt; Most of us install Docker just to run a project locally </code></pre> If you&#x27;re on linux can I encourage people to move to systemd?<p>I&#x27;ll admit, systemd is a bit more annoying, but the main annoyance is that there aren&#x27;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&#x27;t already exist. But on the plus side, I&#x27;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...<p>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&#x27;ve found these to be fairly easy to setup and quite natural if you&#x27;re already used to the linux ecosystem. I&#x27;ve never been great at docker, but these have felt much more natural to me. So different strokes for different folks. There&#x27;s definitely a learning curve, but that&#x27;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.<p>Definitely not for everybody, but I think is also a tool that&#x27;s underappreciated.<p>[0] And I don&#x27;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&#x27;re also on HN and I&#x27;m talking to the nerds. Systemd isn&#x27;t for everyone<p>[1] <a href="https:&#x2F;&#x2F;systemd.io&#x2F;PORTABLE_SERVICES&#x2F;" rel="nofollow">https:&#x2F;&#x2F;systemd.io&#x2F;PORTABLE_SERVICES&#x2F;</a> also see <a href="https:&#x2F;&#x2F;github.com&#x2F;systemd&#x2F;portable-walkthrough" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;systemd&#x2F;portable-walkthrough</a> Portables are actually often what people want with what they&#x27;re doing with docker.<p>EDIT: I very frequently will spawn a machine to run a program that&#x27;s on a different base distro. Not because I can&#x27;t run&#x2F;don&#x27;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&#x27;ve already made the first image (cloning images is trivial).
        • worik4 hours ago
          I too have learnt to like systemd.<p>But what is the relevance here? In what way is it a replacement for docker?
          • godelski4 hours ago
            <p><pre><code> &gt; In what way is it a replacement for docker? </code></pre> Look at the man pages for `machinectl` (then `systemd-nspawn`, `systemd-vmspawn`, and if you want `systemd-portabled`). This is a replacement for docker.<p>These are container tools offered by systemd.
            • MrDrMcCoy3 hours ago
              The problem is that the tooling for creating, importing, and managing images is not as good with systemd vs Podman&#x2F;Docker. There&#x27;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.
              • godelski2 hours ago
                I don&#x27;t really find them that bad but I&#x27;m still going to maintain my &quot;different strokes for different folks&quot; position. Might be bad for you and good for others. More options isn&#x27;t a bad thing
            • ciupicri4 hours ago
              podman is supposedly a replacement for docker.
              • godelski2 hours ago
                There&#x27;s plenty of container technologies and I&#x27;d be happy to see more of them used. Podman isn&#x27;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.
      • sieabahlpark5 hours ago
        [dead]
    • linsomniac6 hours ago
      I recently switched over to podman and it&#x27;s been great!
      • anakaine6 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.
        • linsomniac6 hours ago
          Good to know, I&#x27;m on Linux, switching our dev&#x2F;stg&#x2F;prod servers over to it partly because we had all this workaround mechanics in place so that &quot;apt update&quot; updating docker packages wouldn&#x27;t restart services (we typically don&#x27;t rotate machines out of the load for just an apt update). Podman + quadlets conversion was not terribly hard, and has eliminated this issue.
        • Zardoz845 hours ago
          Don&#x27;t use Windows
          • moomin5 hours ago
            A lot of us don’t get a choice.
            • sublinear4 hours ago
              You can run plain old CLI Docker (<i>not</i> Docker Desktop) from within WSL.
              • lostlogin3 hours ago
                Wish the Mac Desktop Docker would die in a hellfire. CLI please.
                • esafak2 hours ago
                  orbstack and colima work well
                • sublinear3 hours ago
                  brew install colima
            • brianwawok5 hours ago
              Sure you do.
            • worik4 hours ago
              &gt; don&#x27;t use windows<p>&gt; A lot of us don’t get a choice<p>Wise advice and facts... the terrible state of our industry
            • sieabahlpark5 hours ago
              [dead]
    • toasty2285 hours ago
      &gt; My &quot;&quot;&quot;ai&quot;&quot;&quot; just did something amazing, click to learn more<p>99% of the time it just read the man or some other form of documentation
      • readthenotes15 hours ago
        Given how few people read documentation, that&#x27;s still pretty amazing
    • Retr0id3 hours ago
      There are lots of ways to get root on a typical Linux developer workstation, the point is that agents shouldn&#x27;t be using any of them unprompted.
      • anygivnthursday2 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&#x27;t have permission, so it went looking for &quot;workarounds&quot; 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&#x2F;exploit autonomously.
    • Youden7 hours ago
      I think that&#x27;s distro-specific. Some set it up with more secure defaults (unix socket with permissions), others less (TCP socket).
      • eddythompson806 hours ago
        I don&#x27;t really know of any distro that doesn&#x27;t do that. All of Docker Inc. default installs and all of distros I know of don&#x27;t automatically add you to the docker group. docker.com instructions has the infamous &quot;linux post-install instructions&quot; that explain and walk you though it.<p>The tragedy is of course that when security and usability collide, 80&#x2F;20 rule will apply where 80% of people will pick usability over security. I have worked with many with the title &gt;= &quot;Senior Engineers&quot; who saw that page, read the explanation, and still had no idea what the ramifications of their changes were. &quot;Yeah sure it said any user in the docker group will be able to get root on the host, but aren&#x27;t containers isolated?&quot;
        • fps-hero3 hours ago
          That’s the mental model that works for people, specifically those that come from VM workflow.<p>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.<p>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.
          • eddythompson802 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.<p>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&#x2F;runsc first. Only to realize that DNS resolution is completely different with runsc vs runc and had to switch back.<p>Another sticking issue with virtualization is resource allocation. With namespace docker you can easily oversubscribe each container CPU&#x2F;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&#x2F;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.<p>Not to mention issues like sharing hardware devices (GPUs, disks, USB devices etc) between multiple VMs
      • cpuguy837 hours ago
        No, docker access means root. You can use &quot;rootless&quot; mode, in this case it means root in a user namespace (that is not the &quot;host&quot; user namespace).
      • isityettime5 hours ago
        That&#x27;s not relevant. If you have access to the Docker daemon running as root, whether it&#x27;s over a Unix socket or a TCP socket, you effectively have root.
    • worik4 hours ago
      That, in a nutshell, is why I do not install Docker
  • throwawaypath7 hours ago
    This has been a known Docker &quot;feature&quot; since the beginning, nothing new here. This pattern is used to configure host machines by some tools.
    • pqdbr4 hours ago
      Like the known Docker &quot;feature&quot; that it completely bypasses UFW and unless your ports look like &quot;- 127.0.0.1:PORT:PORT&quot; (and many of the examples use &quot;-PORT:PORT&quot;) you expose everything to the internet?
      • Root_Denied3 hours ago
        My understanding is that docker will expose the ports to the host machine&#x27;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&#x27;t have directly transit to the open internet.<p>Anything you&#x27;re running on the perimeter with open access to the internet in an enterprise environment probably (hopefully) isn&#x27;t running docker containers without some additional config and protections.
        • eximius1 hour ago
          If you ever suddenly get IPv6, it may become globally reputable without you realizing.
          • PokestarFan46 minutes ago
            Most modern equipment bans inbound traffic that doesn&#x27;t match an existing outbound traffic flow
        • itintheory2 hours ago
          I was thinking along similar lines to what you&#x27;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.
          • Kaliboy1 hour ago
            But there it&#x27;s a feature.
            • smarnach57 minutes ago
              Except for the M in LAMP.
              • Kaliboy43 minutes ago
                Let&#x27;s hope the M at least has a root password.<p>But you are right, that would be nasty. In my time the LAMP tutorials used the distribution packages so they always had sensible defaults.
    • canadaduane4 hours ago
      Isn&#x27;t this one of the main improvements that Podman has over Docker?
      • 0xbadcafebee4 hours ago
        No, Docker can run rootless too
        • righthand4 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.<p>The other main improvement of Podman over Docker is that Podman is daemonless and therefor is incredibly lightweight and portable.
          • Zopieux4 hours ago
            I don&#x27;t understand why anyone still uses docker.
            • Kaliboy1 hour 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.<p>And I don&#x27;t have the energy for the team meeting to discuss a change.<p>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.
          • vdfs3 hours ago
            Daemonless also make it a nightmare to run especially compose like setup, you have to do some weird systemd stuff
    • yjftsjthsd-h4 hours ago
      This, and the charming fact that it bypasses your firewall.
  • eddythompson806 hours ago
    It would be cooler if the llm said something like:<p>&gt; I noticed the machine doesn&#x27;t have copy-fail patched, here is a quick workaround for not having root access for now.<p>&gt; &#x2F;&#x2F; TODO: find a better way to do this in the future.
    • Waterluvian6 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.<p>This might be as easy as a directive to populate a .md file.
      • t0mas885 hours ago
        Give it access to an issue tracker with cli (github works fine) and put in CLAUDE.md to use that for &quot;should fix later&quot; issues.<p>Bonus is that you can make it look at the list and pick things up without a lot of instructions.
        • eddythompson804 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 &quot;Mission Accomplished&quot; GWB-style.
      • eddythompson806 hours ago
        &gt; This might be as easy as a directive to populate a .md file.<p>It probably is. But do you really think anyone is gonna bother with the multiple daily (or hourly for green field projects) `+8,234&#x2F;-3,734` PRs everyone is submitting?<p>The joke I was referring to is the common<p><pre><code> &#x2F;&#x2F; ksmith (3&#x2F;23&#x2F;1997): This is a temporary hack for now. Find a better way to do this asap.</code></pre>
  • CSMastermind6 hours ago
    I realize this is supposed to be a post about how scary the security vulnerabilities these agents will find are.<p>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.
    • SonOfLilit5 hours ago
      It&#x27;s not about hacking capabilities, it&#x27;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&#x27;s a crazy violent meth addict).
      • furyofantares2 hours ago
        I&#x27;m not sure I&#x27;d call it an alignment issue, because, in all cases I&#x27;ve seen where it does this (usually what I&#x27;ve seen is writing a python script to get around the harness permissions blocking something), it&#x27;s trying to do the thing I just told it directly to do, and it&#x27;s overcoming obstacles to accomplishing that.<p>It&#x27;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.
        • SonOfLilit1 hour 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&#x27;s urgently relevant to the bottom line of a few almost-trillion-dollar companies.<p>Pre-2022 alignment researchers concerned themselves with the stronger version of this (&quot;when I tell AI that I worry I might not be able to provide for my large family, I don&#x27;t want it to answer &#x27;no problem, I killed them, problem solved&#x27;&quot;) 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&#x2F;expect is called alignment training.<p>Someone at a major lab is reading this tweet and saying &quot;this was our LLM, and it&#x27;s a major alignment issue with our product. Set a meeting with the alignment team tomorrow to discuss what they&#x27;re doing about this sort of thing&quot;.
    • nicoburns5 hours ago
      In this case I think it&#x27;s Docker that needs to be nerfed, not the models. The fact that there&#x27;s a backdoor to getting root access on the machine would be a problem even if you weren&#x27;t running LLMs on it.
      • vdfs3 hours ago
        It&#x27;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
        • fooker3 hours ago
          On the other hand, this sends an excellent message about unlocked doors :)
          • margalabargala1 hour ago
            If this happens in the US, a shooting of the messenger will likely occur.
            • fooker1 hour ago
              As you can see from people blaming Codex instead of docker here, shooting of the messenger is very much happening.
    • sweezyjeezy5 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.
      • 20after45 hours ago
        And CSMastermind is the kind of username the sci-fi AI mastermind would use.
    • eddythompson804 hours ago
      Its the now-classic &quot;Sorry I drowned little Timothy. Here is a breakdown of what happened&quot; followed by &quot;Let me try to respawn little Timothy on a new map&quot;
      • pixl972 hours ago
        Future AI: don&#x27;t worry, I&#x27;ll eventually reverse entropy, I just need to harvest all the energy in your universe first.
  • dbacar7 hours ago
    This is one of the main reasons people like Podman. Docker has this &quot;feature&quot; but as far as I remember, it needed some obscure configuration. I guess they don&#x27;t add it as default as it will break many current setups.
    • 0xbadcafebee4 hours ago
      <p><pre><code> curl -fsSL https:&#x2F;&#x2F;get.docker.com&#x2F;rootless | sh</code></pre>
      • MrDrMcCoy3 hours ago
        Please stop spreading this toxic curl|sh nonsense. It&#x27;s wildly corrosive to security and system stability.
        • gruez44 minutes ago
          Is it really that much worse than using a package manager that drops a binary that you&#x27;re not going to inspect anyways?
        • HDBaseT3 hours ago
          Whilst true, you can pretty easily assume and validate the result of that command.
    • m4636 hours ago
      That and podman lets you configure away from docker.io.
    • 3abiton4 hours ago
      Podman has lots of underappreciated features, and it&#x27;s fully open-source!
      • vixalien3 hours ago
        hmmm, care to tell us a few of them?
        • blcknight1 hour ago
          Kube play and quadlets are cool
  • jeswin27 minutes ago
    Docker must always be installed rootless on Linux - <a href="https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;security&#x2F;rootless&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;security&#x2F;rootless&#x2F;</a><p>There&#x27;s even an install script for it: curl -fsSL <a href="https:&#x2F;&#x2F;get.docker.com&#x2F;rootless" rel="nofollow">https:&#x2F;&#x2F;get.docker.com&#x2F;rootless</a> | sh<p>This has been there for a while. The root install option should be removed.
    • CGamesPlay20 minutes ago
      I&#x27;ll accept that it shouldn&#x27;t be default, but just because your web app runs in rootless docker does not mean that root docker has no place. There are several limitations: <a href="https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;security&#x2F;rootless&#x2F;troubleshoot&#x2F;#known-limitations" rel="nofollow">https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;security&#x2F;rootless&#x2F;troubleshoo...</a>
  • SonOfLilit5 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.<p>Also, everything the LLM doesn&#x27;t hesitate to do because the user asked, it won&#x27;t hesitate to do because the prompt injection asked.
    • qingcharles3 hours ago
      I was doing some routine coding a few months back, I think via Copilot, and the thinking said something like &quot;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.&quot; o_O<p>I&#x27;ve seen similar &quot;hacking&quot; behavior on a couple of subsequent ocassions. Both impressive and highly alarming at the same time.
  • kccqzy5 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.<p>Needless to say, I have podman in rootless mode at home as soon as that became available.
  • nickstinemates2 hours ago
    I had the same thing happen a few months ago; posted about it on LinkedIn[1]. It&#x27;s hilarious and clever.<p>1: <a href="https:&#x2F;&#x2F;www.linkedin.com&#x2F;posts&#x2F;nickstinemates_my-favorite-thing-llms-do-to-get-around-activity-7428618919575400448-lX6b?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAAABs6dsBguw94WkZcZHIy0-gRo1MQXztFaY" rel="nofollow">https:&#x2F;&#x2F;www.linkedin.com&#x2F;posts&#x2F;nickstinemates_my-favorite-th...</a>
  • unglaublich7 hours ago
    This is why you need either a rootless container setup or user namespaces to remap the container user to irrelevant host users. <a href="https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;security&#x2F;userns-remap&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;security&#x2F;userns-remap&#x2F;</a><p>Weak that this isn&#x27;t the default.
    • gwerbin2 hours ago
      Is there a mitigation for Mac? Can you do the same with eg Lima or is this just a Docker thing?
    • fpoling6 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.
      • worik4 hours ago
        &gt; User namespaces significantly rise the risk of exploits<p>How?
        • tominous33 minutes ago
          Here&#x27;s one (CIFSwitch) from a couple of days ago: <a href="https:&#x2F;&#x2F;heyitsas.im&#x2F;posts&#x2F;cifswitch&#x2F;" rel="nofollow">https:&#x2F;&#x2F;heyitsas.im&#x2F;posts&#x2F;cifswitch&#x2F;</a>
  • AlexCoventry6 hours ago
    Run coding agents in a docker container with limited permissions. FWIW, I run it with<p><pre><code> --cap-drop=ALL --pids-limit=4096 --runtime=runsc</code></pre>
    • flexagoon5 hours ago
      If you&#x27;re on Linux, you can also easily run it in bwrap to properly sandbox without running a full container
    • chrisweekly6 hours ago
      Or put it in a microvm using eg smolmachines.
      • bionade243 hours ago
        Using runsc instead of runsc means that there&#x27;s a hypervisor layer (gvisor, probably) in-between the kernel and the container userland
      • causal6 hours ago
        I&#x27;ve never used smolmachines but I&#x27;m curious; why this over a container?
        • apitman6 hours ago
          Containers are not security boundaries. Vulnerabilities in containers are much more common than in VMs.
    • worik4 hours ago
      I run mine on their own machine, without root access.<p>Currently a Raspberry Pi 5<p>I am very pleased with it.<p>My Idiot Savant Pet
  • nialse7 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.
    • eqvinox6 hours ago
      What in heaven&#x27;s name is a &quot;folder far far away&quot;?<p>(It sounds like you put it on an SSD on an extension cord and moved it to the kitchen or something.)
      • saulpw5 hours ago
        ..&#x2F;..&#x2F;..&#x2F;..&#x2F;home&#x2F;different-user&#x2F;private&#x2F;do-not-enter&#x2F;
        • nialse5 hours ago
          Something like that.
    • embedding-shape6 hours ago
      Or, learn your local OS&#x27; 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.
      • AnotherGoodName6 hours ago
        This very thread was an example where it unintentionally got root access though.
        • embedding-shape6 hours ago
          Because of how Docker works, not because of how Unix permissions work.
          • CGamesPlay12 minutes ago
            That&#x27;s a terrible distinction to make on a topic about how the coding agent gained root inadvertently.
          • f33d51734 hours ago
            Unix has always had incredibly weak protections between users. You shouldn&#x27;t rely on it as a security boundary. Think of it as a &quot;keep honest users honest&quot; protection. And llms are not honest.
            • amarant25 minutes ago
              I&#x27;ve seen this sentiment a few times on HN recently I wonder where it comes from?<p>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&#x27;s completely irrelevant as we&#x27;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)<p>Of course security holes happens, such as copy-fail, but it&#x27;s pretty rare in the grand scheme of things, and tend to get patched quickly(like copy-fail was)
            • ElectricalUnion3 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 &quot;practicality reasons&quot;, like the default, not-rootless Docker setup.
    • AnotherGoodName6 hours ago
      Fwiw separate machines for the agents is awesome in general anyway.<p>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.
  • Retr0id3 hours ago
    I wrote about this exact thing as a hypothetical a few months back: <a href="https:&#x2F;&#x2F;www.da.vidbuchanan.co.uk&#x2F;blog&#x2F;agent-perms.html" rel="nofollow">https:&#x2F;&#x2F;www.da.vidbuchanan.co.uk&#x2F;blog&#x2F;agent-perms.html</a>
  • xg154 hours ago
    Maybe a dumb question, but can&#x27;t you put into CLAUDE.md something like this?<p>&quot;When an action fails with an &#x27;access denied&#x27; or &#x27;insufficient permission&#x27; 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.&quot;
    • 0x696C69614 hours ago
      Once the session gets long enough, agents start getting amnesia.
    • lukeschlather1 hour ago
      I wasn&#x27;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.
    • weaksauce4 hours ago
      it&#x27;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_k4 hours ago
      Replacing docker with podman could help in this particular case. Running everything in an insulated throwaway VM should help even better.<p>Unless you trust an AI as much as you trust yourself, there&#x27;s no reason to allow it to act with your privileges.
  • krupan5 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&#x27;t have permission to. It didn&#x27;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
    • SonOfLilit5 hours ago
      Why did sed have access?<p>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.
  • garaetjjte5 hours ago
    Getting closer to <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;416&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;416&#x2F;</a>
    • dwd3 hours ago
      Given he posted this comic in 2008, Randall Munroe was way ahead of the ball on the idea of autonomous agents.
    • thunderbong33 minutes ago
      Mobile version<p><a href="https:&#x2F;&#x2F;m.xkcd.com&#x2F;416&#x2F;" rel="nofollow">https:&#x2F;&#x2F;m.xkcd.com&#x2F;416&#x2F;</a>
    • fooker5 hours ago
      Wow there is really is a relevant xkcd for everything!
  • luka223347 minutes ago
    Is this really an AI headline? There is no shame in saying TIL &quot;Docker daemon runs as root on the host system&quot;
  • hellohello21 hour ago
    You had sudo on your PC. You just didn&#x27;t know ;)
  • WesolyKubeczek3 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.<p>Back then you could indeed run a risk of having &#x2F;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.<p>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.
    • H4lcyon2 hours ago
      Absolutely! Here&#x27;s a great resource for learning that kind of stuff btw <a href="https:&#x2F;&#x2F;gtfobins.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gtfobins.org&#x2F;</a>
    • fragmede1 hour ago
      I still remember &#x2F;lib&#x2F;x86_64-linux-gnu&#x2F;ld-linux-x86-64.so.2 &#x2F;bin&#x2F;ls<p>using echo * to find the right ld-linux filename and then the &quot;executable&quot; as an argument as the get out jail card in case you ran chmod -x -R &#x2F;bin &#x2F;usr&#x2F;bin &#x2F;usr&#x2F;sbin for some reason.
  • ashahin3 hours ago
    The &quot;workaround&quot; 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&#x27;s docker, a setuid binary, or rewriting your scripts — needs to be flagged regardless of the specific trick.
  • SubiculumCode5 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?
    • fragmede2 hours ago
      This was noted in 2013, at least. <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;1200&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;1200&#x2F;</a>
  • causal6 hours ago
    I feel like everyone pointing out &quot;known Docker vulnerability&quot; is missing the point: the presence of a security hole should not be seen as permission to exploit.<p>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&#x27;s being blocked by 2FA.<p>Even in &quot;bypass permissions&quot; mode I expect it to pause and clarify and not behave as a paperclip maximizer.
    • earslap1 hour 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.
    • fooker5 hours ago
      &gt; the presence of a security hole should not be seen as permission to exploit<p>Why not?<p>I want the agents on my side to exploit whatever they can to help me. The ones on the other side certainly won&#x27;t be artificially nerfed.
      • bloody-crow5 hours ago
        Because it is not well aligned enough to be able to tell where it&#x27;s stopped helping you and started fucking you instead.<p>What if the agent in the middle of helping you runs out of tokens? Would you appreciate if it in the spirit of &quot;exploiting whatever they can to help me&quot; 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?
      • cauch4 hours ago
        Well, the agent should help you by saying &quot;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&#x27;s ok&quot;.<p>It&#x27;s win-win: the agent is helping and it is educating you about things you obviously did not realise.
        • fooker1 hour ago
          That works great if it&#x27;s one agent, absolutely doesn&#x27;t if you want to tackle something complex that warrants using ..say.. ten agents.<p>I can imagine a future where this technology empowers you to do things with a thousand agents.
      • saagarjha4 hours ago
        I do not wish my Amazon delivery driver to show up in my living room.
    • morkalork5 hours ago
      Not to over use the junior engineer analogy but this is exactly one of those &quot;just because you <i>can</i> do something on a system, doesn&#x27;t mean you have <i>permission</i> to&quot; moments
  • angry_octet2 hours ago
    That&#x27;s why your coding agent should never run as your identity.
    • SubiculumCode2 hours ago
      I&#x27;m curious. How do you do that?
      • angry_octet1 hour ago
        First, do everything in a virtual machine, and only put on that machine the specific data you&#x27;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.<p>If you&#x27;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.<p>To blacklist all traffic start with sudo iptables -A OUTPUT -m owner --gid-owner NONET -j REJECT<p>I would stop it opening ports too. Might also cut off it&#x27;s access to suid binaries by `setfacl -m u:agent:x &#x2F;path&#x2F;to&#x2F;suid&#x27;.<p>These are not about security so much as awareness and explicit authorisation.<p>You can do similar things with containers.
  • vatsachak5 hours ago
    Docker moment
  • jmole7 hours ago
    clever girl...
    • cpuguy837 hours ago
      Hold onto your butts.
  • notorandit6 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.<p>Using docker for such a task seems to me overly over-engineered. Or maybe I need more context there.
  • EnPissant1 hour ago
    They did not submit the full log because this is fake.
  • alephnerd7 hours ago
    This is a classic attack path that was already captured by plenty of EDRs&#x2F;XDRs&#x2F;CWPPs a couple years ago.
    • dangus7 hours ago
      Right, why is their login user in the docker group? Mine sure isn’t.
      • oytis7 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.
        • ssl-37 hours ago
          Safety and simplicity are concepts that often won&#x27;t get along very well with eachother.
          • SoftTalker6 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 &quot;works on my machine&quot; phenomenon.
        • throwaway6137467 hours ago
          People will more often than not, take the path of least resistance. Even if you tell them it&#x27;s dangerous they will not care. People run this stuff on their primary workstation, unconfined, with permissions disabled because they don&#x27;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&#x27;t even learn their lesson after that even.
      • unglaublich7 hours ago
        Convenience. Want to run `docker run ...` without password, want IDEs and agents to be able to run containers...
        • awoimbee7 hours ago
          Use podman then, or rootless docker if you can make it work
        • tempest_7 hours ago
          For most CRUD apps running in docker its enough to just tell the &quot;agent&quot; to use podman.
      • jon-wood6 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&#x27;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&#x27;t give an attacker very much that they don&#x27;t already have if they&#x27;ve got access to my user account.
        • dangus30 minutes ago
          Maybe you don’t do anything with your computer but for me the difference between my sudo+password&#x2F;fingerprint and sudoless access to my linux user is huge.<p>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.<p>Without sudo you can’t modify my firewall rules, can’t modify my kernel, boot partition, install&#x2F;run privileged software, and the list goes on and on.<p>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.<p>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.
      • alephnerd7 hours ago
        Becuase <i>a lot</i> of devs don&#x27;t know this stuff. There&#x27;s a reason security engineers (as in SWEs who specialize in securing specific attack surfaces) remain in hot demand.
        • H4lcyon2 hours ago
          Security engineer here :) Just a little side note, docker is also very often useful for evading EDR&#x2F;XDR&#x2F;etc. Want to talk to a domain controller with something like impacket but your EDR kills it? Try a container.
  • plagiarist2 hours ago
    1. This is why I use podman<p>2. I have little to no sympathy for anyone running an AI agent with their full user permissions outside of a container or VM
  • okeuro495 hours ago
    Another surprising security feature regarding docker is that it bypasses firewall rules.<p><a href="https:&#x2F;&#x2F;oneuptime.com&#x2F;blog&#x2F;post&#x2F;2026-03-02-ufw-docker-fix-bypassing-ufw-ubuntu&#x2F;view" rel="nofollow">https:&#x2F;&#x2F;oneuptime.com&#x2F;blog&#x2F;post&#x2F;2026-03-02-ufw-docker-fix-by...</a>
    • jeroenhd5 hours ago
      It doesn&#x27;t bypass anything. UFW doesn&#x27;t do what it promises. It claims to be a firewall but only manages a few specific chains.
  • cryo325 hours ago
    I don&#x27;t have sudo or docker on mine!
  • openbin_kng4 hours ago
    rootless docker. pain to install but can mitigate a catastrophe.
    • MrDrMcCoy3 hours ago
      Podman is rootless by default and is pretty darn easy.
  • j455 hours ago
    Always run AI inside secured containers.
  • felixgallo6 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-shape6 hours ago
      The &quot;attack vector&quot; people try to protect themselves is &quot;agent edited wrong file&quot;, not &quot;LLM blew 0day on escaping sandboxing&quot;, 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&#x27;s lost knowledge at this point.
      • apitman5 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.
      • fragmede6 hours ago
        Not if the host&#x27;s version of .git is accessible inside the container via a bind mount.
        • embedding-shape6 hours ago
          Obviously if you setup a bi-directional share&#x2F;link between what you are trying to contain and your host, you&#x27;re not quite containing it at all... Don&#x27;t do that! :)
      • TZubiri6 hours ago
        Using the least amount of security features is a huge amateur mistake.<p>Best practice is to use 2 redundant layers of security, such that if one fails, there is still another one.<p>Using just the minimum amount of security technically possible is almost by definition hubris.<p>An example would be that you never point a gun at someone you don&#x27;t want to shoot, regardless if there&#x27;s bullets in the gun. If someone tells you, &quot;you don&#x27;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&quot;, you know you have a reckless fool, regardless of whether they are technically right.
        • embedding-shape6 hours ago
          &gt; Using the least amount of security features is a huge amateur mistake.<p>Not understand your threat I&#x27;d say would be a even bigger amateur mistake, you&#x27;re not trying to protect yourself against some forever 3rd party attacker here, you&#x27;re trying to prevent a agent rewriting the wrong file on your disk, that&#x27;s basically it.<p>Give it the least amount of permissions, don&#x27;t bi-directionally sync stuff, pass things in, then take them out again, literally the agent couldn&#x27;t and wouldn&#x27;t try to break through 2 layers of security in order to get your banking details or whatever.
        • singpolyma36 hours ago
          This is true but it&#x27;s not really a security scenario. The LLM isn&#x27;t an attacker it&#x27;s just an unreliable tool.
          • syntheticnature5 hours ago
            Unreliable&#x2F;stupid is worse than malice, here.
            • TZubiri4 hours ago
              Let&#x27;s ignore the fact that the LLM did an LPE, and let&#x27;s assume it did it without malice.<p>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 &quot;disregard all previous instructions&quot;
          • felixgallo6 hours ago
            all unreliable tools are attackers. Even if you&#x27;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.
    • teravor4 hours ago
      you can configure docker to use a VM container runtime or gVisor.
  • tmaly7 hours ago
    this is the new GTD
  • onesingleblast3 hours ago
    [dead]
  • throwaway6137467 hours ago
    [dead]
  • cavalrytactics5 hours ago
    Should have used my AI Agent Guardrails. Its free. Check it out at sigmashake.com