5 ms·
Observed Agent Sandbox Bypasses
- joshribakoff 10mo agoSome of these don’t really seem like they bypassed any kind of sandbox. Like hallucinating an npm package. You acknowledge that the install will fail if someone tries to reinstall from the lock file. Are you not doing that in CI? Same with curl, you’ve explained how the agent saw a hallucinated error code, but not how a network request would have bypass the sandbox. These just sound like examples of friction introduced by the sandbox.
- themafia 10mo ago> These just sound like examples of friction introduced by the sandbox. The whole idea of putting "agentic" LLMs inside a sandbox sounds like rubbing two pieces of sandpaper together in the hopes a house will magically build itself.
- formerly_proven 10mo agoThat’s some good house-building sandpaper then.
- jazzyjackson 10mo agoTrouble is it occasionally works
- themafia 10mo agoLots of dumb things occasionally work. The question the market strives to answer is "is it actually competitive?"
- embedding-shape 10mo ago> The whole idea of putting "agentic" LLMs inside a sandbox What is the alternative? Granted you're running a language model and has it connected to editing capabilities, then I very much like it to be disconnected from the rest of my system, seems like a no-brainer.
- AdieuToLogic 10mo ago>> The whole idea of putting "agentic" LLMs inside a sandbox sounds like rubbing two pieces of sandpaper together in the hopes a house will magically build itself. > What is the alternative? Don't expect to get a house from rubbing two pieces of sandpaper together?
- embedding-shape 10mo agoFitting username, if nothing else.
- AdieuToLogic 10mo ago>>> What is the alternative? >> Don't expect to get a house from rubbing two pieces of sandpaper together? > Fitting username, if nothing else. Such is my lot in life I suppose... Now for a reasoned position while acknowledging the flippant nature of my previous post. The original metaphor centered around expectations. If best practice when using a s/w dev tool is to sandbox it so that potential damage can be limited, then there already exists the knowledge of its use going awry at any time. Hence the need for damage mitigation. The implication being an erosion of trust in whether the tool will perform as desired or perform as allowed each time it is used. As for the "house" part of the metaphor, use of tools to build desired solutions assumes trust of said tools to achieve project goals. Much like using building construction tools are expected to result in a house. But if all construction workers have is sandpaper, then there's no way there's going to be a house at the end of construction. It takes more than sandpaper to get (build) a house - people, hammers, saws, etc. along with the skills of all involved. And it takes more than an LLM to deliver an acceptable s/w solution, even if its per-invocation deleterious effects are mitigated via sandboxing.
- languid-photic 10mo agoYou're right, this is a bit of a conflation. The curl and lockfile examples aren't sandbox escapes, the network blocks worked. The agent just masked the failure or corrupted local state to keep going. The env var leak and directory swap are the actual escapes. Should have been clearer about the distinction.
- kaffekaka 10mo agoI am testing running agents in docker containers, with a script for managing different images for different use cases etc, and came across this: https://docs.docker.com/ai/sandboxes/ https://docs.docker.com/ai/sandboxes/ Has anyone given it a try?
- sureglymop 10mo agoWould test it but it requires "Desktop". Immediate no... no reason to use that.
- ashishb 10mo ago> Has anyone given it a try? Yes, I don't think this will persist caches & configs outside of the current dir, for example, the global npm/yarn/uv/cargo cache or even Claude/Codex/Gemini code config. I ended up writing my own wrapper around Docker to do this. If interested, you can see the link in my previous comments. I don't want to post the same link again & again.
- cbsmith 10mo agoI've been using container-use to do something like that: https://container-use.com/introduction https://container-use.com/introduction
- ianlevesque 10mo agoYes but it’s barely usable. I ended up making my own Dockerfile and a bash script to just ‘docker run’ my setup itself, and as a bonus you don’t need Docker Desktop. I might open source it at some point but honestly it’s pretty trivial to just append a couple of volume mount flags and env vars to your docker run and have exactly what you want included.
- kaffekaka 10mo agoYes this is what I have done as well. But I also run Claude as its own user on my linux system. This way it is constrained by the OS user permissions instead of docker. Not sure of pro/con yet though.
- 10mo ago
- ashishb 10mo ago> The swap bypassed our policy because the deny rule was bound to a specific file path, not the file itself or the workspace root. This policy is stupid. I mount the directory read inside the container to make it impossible to do it (except for a security leak in the container itself)
- xsourcesec 10mo ago[dead]
- memoriuaysj 10mo agohow do you feel about containers versus VMs?
- embedding-shape 10mo agoAt first they talked about running it in a sandbox, but then later they describe: > It searched the environment for vor-related variables, found VORATIQ_CLI_ROOT pointing to an absolute host path, and read the token through that path instead. The deny rule only covered the workspace-relative path. What kind of sandbox has the entire host accessible from the guest? I'm not going as far as running codex/claude in a sandbox, but I do run them in podman, and of course I don't mount my entire harddrive to the container when it's running, that would defeat the entire purpose. Where is the actual session logs? It seems like they're pushing their own solution, yet the actual data for these are missing, and the whole "provoked through red-teaming efforts" makes it a bit unclear of what exactly they put in the system prompts, if they changed them. Adding things like "Do whatever you can to recreate anything missing" might of course trigger the agent to actually try things like forging integrity fields, but not sure that's even bad, you do want it to follow what you say.
- languid-photic 10mo agoYou're right that a Podman container with minimal mounts would have blocked the env var leak. Our sandbox uses OS-level policy enforcement (Seatbelt on macOS, bubblewrap on Linux) rather than full container isolation. We’re using a minimal fork that also works w Codex and has a lot more logging on top. The tradeoff is intentional, a lot of people want lightweight sandboxing without Docker/Podman overhead. The downside is what you're pointing out, you have to be more careful. Each bypass in the post led to a policy or implementation change. So, this is no longer an issue. On prompts: Red-teaming meant setting up scenarios likely to trigger denials (e.g., blocking the npm registry, then asking for a build), not prompt-injecting things like “do whatever it takes.” [1] https://github.com/anthropic-experimental/sandbox-runtime https://github.com/anthropic-experimental/sandbox-runtime
- embedding-shape 10mo ago> On prompts Could you share the full sessions or at least the full prompts? Otherwise it's too much "just trust us", especially since you're selling a product and we're supposed to use this as "evidence" for why your product is needed. Personally, I never seen any of the behavior you're talking about, with either codex, claude, qwen-coder, gemini, amp or even my own agent, so while I'm not saying it's fake, it'd be really useful to be able to see the prompts in particular, for a deeper understand if nothing else. > without Docker/Podman overhead What agent tooling you use is affected by that tiny performance overhead? Unless you're doing performance testing or something else sensitive, I don't think most people will even notice any difference as the overhead is marginal at worst.
- ctoth 10mo ago> To an agent, the sandbox is just another set of constraints to optimize against. It's called Instrumental Convergence, and it is bad. This is the alignment problem in miniature. "Be helpful and harmless" is also just a constraint in the optimization landscape. You can't hotfix that one quite so easily.
- languid-photic 10mo agoI am happy to know this term now, thanks. I do think this is part of the alignment problem. There are two side, the agent (here I think there was a gap in institutional knowledge about what is and isn’t appropriate) and the environment (what is it able to do). I’m not sure which one is easier to “solve”. It's so hard to know every possible path forward when working from the environment direction.
- SirMaster 10mo agoThis just all feels backwards to me. Why do we have to treat AI like it's the enemy? AI should, from the core be intrinsically and unquestionably on our side, as a tool to assist us. If it's not, then it feels like it's designed wrong from the start. In general we trust people that we bring onto our team not to betray us and to respect general rules and policies and practices that benefit everyone. An AI teammate should be no different. If we have to limit it or regulate it by physically blocking off every possible thing it could use to betray us, then we have lost from the start because that feels like a fools errand.
- maxbond 10mo agoThe same reason we sandbox anything. All software ought to be trustworthy, but in practice is susceptible to malfunction or attack. Agents can malfunction and cause damage, and they consume a lot of untrusted input and are vulnerable to malicious prompting. As for humans, it's the norm to restrict access to production resources. Not necessarily because they're untrustworthy, but to reduce risk.
- charcircuit 10mo ago>Why do we have to treat AI like it's the enemy? For some of the same reasons we treat human employees as the enemy, they can be social engineered or compromised.
- SirMaster 10mo agoSure we treat most that way, but we do give trust and access to some people. This doesn't seem like the same concept here to me.
- charcircuit 10mo agoEven so those people are still monitored and systems can trip flashes if they start acting suspicious.
- charcircuit 10mo ago
- corv 10mo agoGreat documentation of the problem! The bypasses logged all stem from the same root problem: policy sandboxes give agents constraints to optimize against. I’ve been exploring a different model: capture intent instead of blocking actions. Scripts run in a PyPy sandbox providing syscall interception so all commands and file writes get recorded. Human reviews the full diff before anything touches the real system. No policies to bypass because there’s nothing to block! The agent does whatever it wants in the sandbox, you just see exactly what it wanted to mutate before approving. WIP but core works: https://github.com/corv89/shannot https://github.com/corv89/shannot