frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Don't YOLO your file system

https://jai.scs.stanford.edu/
34•mazieres•1h ago

Comments

mazieres•1h ago
What would it take for people to stop recklessly running unconstrained AI agents on machines they actually care about? A Stanford researcher thinks the answer is a new lightweight Linux container system that you don't have to configure or think about.
mememememememo•45m ago
Yes. It is like walking arounf your house with a flamethrower, but you added fire retardant. Just take the flamethower to a shed you don't mind losing. Which is some kind of cloud workspace most likely. Maybe an old laptop.

Still if you yolo online access and give it cred or access to tools that are authenticated there can still be dragons.

fouc•38m ago
except the big AI companies are pushing stuff designed for people to run on their personal computers, like Claude Cowork.
BoppreH•53m ago
Excellent project, unfortunate title. I almost didn't click on it.

I like the tradeoff offered: full access to the current directory, read-only access to the rest, copy-on-write for the home directory. With stricter modes to (presumably) protect against data exfiltration too. It really feels like it should be the default for agent systems.

fouc•41m ago
Since the site itself doesn't really have a title, I probably would've went with something like "jai - filesystem containment for AI agents"
drtournier•48m ago
GPL v3…
mememememememo•46m ago
So?
triilman•43m ago
What would Jonathan Blow think about this.
ghighi7878•37m ago
My name is also jai
messh•42m ago
How is this different than say bubblewrap and others?
girvo•39m ago
https://jai.scs.stanford.edu/comparison.html#jai-vs-bubblewr...

> bubblewrap is more flexible and works without root. jai is more opinionated and requires far less ceremony for the common case. The 15-flag bwrap invocation that turns into a wrapper script is exactly the friction jai is designed to remove.

Plus some other comparisons, check the page

adi_kurian•36m ago
Claude's stock unprompted / uninspired UI code creates carbon clone components. That "jai is not a promise of perfect safety" callout box is like the em dash of FE code. The contrast, or lack thereof, makes some of the text particularly invisible.

I wonder if shitty looking websites and unambitious grammar will become how we prove we are human soon.

NetOpWibby•25m ago
Everything old is new again
Avicebron•24m ago
The only thing that kept me on the page scrolling to the bottom where they have the disclaimer "this is a casual sandbox" was the stanford.edu..which feels like stolen valor considering how sloppy this web design is
AnotherGoodName•36m ago
Add this to .claude/settings.json:

  {                                                                                                                                                              
    "sandbox": {                                                                                                                                               
      "enabled": true,
      "filesystem": {
        "allowRead": ["."],
        "denyRead": ["~/"],
        "allowWrite": ["."],
        "denyWrite": ["/"]
      }                                                                                                                                                          
    }
  }

You can change the read part if you're ok with it reading outside. This feature was only added 10 days ago fwiw but it's great and pretty much this.
mycall•16m ago
I noticed codex has a sandbox, wondering if it has a comparable config section.
harikb•16m ago
I think the point would be that - some random upcoming revision of claude-code could remove or simply change the config name just as silently as it was introduced.

People might genuinely want some other software to do the sandboxing. Something other than the fox.

cozzyd•14m ago
Is this a real sandbox or just a pretty please?
AnotherGoodName•9m ago
https://code.claude.com/docs/en/sandboxing says they integrated bubblewrap (linux/windows), seatbelt (macos) and give an error if sandbox can't be supported so appears to be real.
throwaway6734•6m ago
https://docs.docker.com/ai/sandboxes/ Any idea on how that compares to this docker feature in development?
8cvor6j844qw_d6•9m ago
Interesting, thanks. I use remote ephemeral dev containers with isolated envs, so filesystem damage isn't really a concern as long as the PR looks good in review. Nice extra guardrail though, will add it to the project-level settings.
simonw•35m ago
Suggestion for the FAQ page: does this work on a Mac?
gerdesj•30m ago
Oh dear Lord! (pick your $DEITY)

Backups.

cozzyd•22m ago
Should be named Jia

More seriously, I'm not a heavy agent user, but I just create a user account for the agent with none of my own files or ssh keys or anything like that. Hopefully that's safe enough? I guess the truck is that it figures out a local privilege escalation exploit...

timcobb•17m ago
Dunno... with this setup it seems certain that the agent will discover a zero-day to escalate privilges and send your SSH keys to its handlers in N. Korea.

P.S. Everything old is new again <3

cozzyd•15m ago
Yeah definitely a concern. Probably need a sandbox and separate user for defense in depth.
mbreese•17m ago
This still is running in an isolated container, right?

Ignoring the confidentiality arguments posed here, I can’t help to think about snapshotting filesystems in this context. Wouldn’t something like ZFS be an obvious solution to an agent deleting or wildly changing files? That wouldn’t protect against all issue the authors are trying to address, but it seems like an easy safeguard against some of the problems people face with agents.

gurachek•17m ago
The examples in the article are all big scary wipes, But I think the more common damage is way smaller and harder to notice.

I've been using claude code daily for months and the worst thing that happened wasnt a wipe(yet). It needed to save an svg file so it created a /public/blog/ folder. Which meant Apache started serving that real directory instead of routing /blog. My blog just 404'd and I spent like an hour debugging before I figured it out. Nothing got deleted and it's not a permission problem, the agent just put a file in a place that made sense to it.

jai would help with the rm -rf cases for sure but this kind of thing is harder to catch because its not a permissions problem, the agent just doesn't know what a web server is.

cozzyd•17m ago
Should definitely block .ssh reading too...
justinde•6m ago
.claude/settings.json: { "sandbox": { "enabled": true, "filesystem": { "allowRead": ["."], "denyRead": ["~/"], "allowWrite": ["."] } } }

Use it! :) https://code.claude.com/docs/en/sandboxing