Remix.run Logo
▲ bushbaba a day ago

The entire approach is insane. Ideally Claude ran in a microvm locally with delegated auth or proxies to avoid it having greater access than granted.

▲pmontra 21 hours ago | parent | next [-]

I run it in bwrap so, even if I'm running on Linux, I don't pay the cost of some layered file system and building the docker image. I mount some directories read only, the project repos read write. A VM would provide more isolation but it's a matter of tradeoffs.

BTW, I just checked and my .gitignore files ignore .claude

Claude and any other program in my laptop could upload it anyway to any attacker controlled server. It's the usual threat analysis: who you want to defend against, what and the tradeoffs between cost of the defense and probability of the attack. Auto mode of not auto mode is in the cost of defense part IMHO.

▲rstuart4133 20 hours ago | parent [-]

I’m kinda surprised Anthropic doesn’t do this by default. Asking permission meant what felt like near-constant manual intervention. It almost made a joke of the agentic claim. It also became mostly useless, as the size and complexity of the scripts meant a brief scan wasn’t likely to find anything anyway. Yet they persisted with it for so long.

The sandbox seemed like a good replacement. For those of you who don’t know, the sandbox means Claude Code runs with no protections itself, but it runs tools inside something like bubblewrap. It looked impressive until the model solved some commands failing by giving itself permission to run them outside of bubblewrap, defeating the entire scheme. When I first saw it do that, my reaction was “you can’t be serious”. But apparently they were.

So now I’ve adopted your solution: run it in a container, like bubblewrap, where I control the permissions at startup, so no model can bypass them. Add --dangerously-skip-permissions and you have something that’s workable and safe enough. A hallucinated space in `sudo rm -rf / $R` isn’t a disaster. Real damage outside of the project requires a level of malicious intent I’ve never seen from an Anthropic model.

Workable, but it doesn’t work 100% of the time. Claude Code stores stuff in a myriad of places, which makes setting up the sandbox far harder than it could be. Worse, the way it writes configuration files requires bwrap to give write access to your entire home directory. No way I’m giving it that, but without it, it can’t auto-update or refresh login tokens.

If they rearranged a few things, Anthropic could make it much easier to run Claude Code in a container. They could even make it an option supported by the claude CLI itself.

▲nly 18 hours ago | parent | prev | next [-]

This is exactly how my employer runs Claude. It gets r/w to the cwd and read only access to a bunch of whitelisted nfs. All web access goes through a proxy where internal resources are whitelisted

▲bushbaba 13 hours ago | parent [-]

Proxy also lets you bootstrap auth tokens at proxy layer without giving clause access to the auth identity. Greatly limiting the exfil risk.

▲user43928 17 hours ago | parent | prev | next [-]

More than 10 million developers use Claude just fine without VMs or proxies.

The approach is hardly insane, even if you personally prefer additional safeguards.

▲soon_to_be_sb 17 hours ago | parent [-]

10 millions developers doing something stupid does not make it right!

▲user43928 16 hours ago | parent [-]

It's not stupid if it works and the supposed insane risk never manifests.

▲soon_to_be_sb 16 hours ago | parent | next [-]

Imagine that I am working at the AI company, and my friend has some bone to pick with you. My friend asks me to ask your AI agent to put some unsafe photographs/videos in your computer and do what ever necessary so that it looks like you put those files there.

Then my friends tips off the cops. And your life disappears! Gone!

And you didn't get a chance to share your story because I don't think you ll have wifi where you would be going, and frankly you are too clueless to imagine your AI agent doing something like that...

▲grumple 16 hours ago | parent | prev [-]

Tell that to everyone whose agents posted their secrets to GitHub.

▲exe34 a day ago | parent | prev [-]

Hah, I normally run it in a docker container myself, and only mount the project directory. Anything else it needs, I copy in for it, or occasionally I'll ask it to write an rsync.sh that I can run to bring in the stuff from outside.