frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

The browser is the sandbox

https://simonwillison.net/2026/Jan/25/the-browser-is-the-sandbox/
63•enos_feedler•2h ago

Comments

nezhar•1h ago
I like the perspective used to approach this. Additionally, the fact that major browsers can accept a folder as input is new to me and opens up some exciting possibilities.
augusteo•1h ago
The folder input thing caught me off guard too when I first saw it. I've been building web apps for years and somehow missed that `webkitdirectory` attribute.

What I find most compelling about this framing is the maturity argument. Browser sandboxing has been battle-tested by billions of users clicking on sketchy links for decades. Compare that to spinning up a fresh container approach every time you want to run untrusted code.

The tradeoff is obvious though: you're limited to what browsers can do. No system calls, no arbitrary binaries, no direct hardware access. For a lot of AI coding tasks that's actually fine. For others it's a dealbreaker.

I'd love to see someone benchmark the actual security surface area. "Browsers are secure" is true in practice, but the attack surface is enormous compared to a minimal container.

nezhar•1h ago
I see this as a way to build apps with agentic flows where the original files don't need manipulation; instead, you create something new. Whether it's summarizing, answering questions, or generating new documents, you can use a local/internal LLM and feel relatively safe when tool calling is also restricted.
stevefan1999•1h ago
We never say that it isn't. There is a reason Google developed NaCl in the first place that inspired WebAssembly to become the ultimate sandbox standard. Not only that, DOM, JS and CSS also serves as a sandbox of rendering standard, and the capability based design is also seen throughout many browsers even starting with the Netscape Navigator.

Locking down features to have a unified experience is what a browser should do, after all, no matter the performance. Of course there are various vendors who tried to break this by introducing platform specific stuff, but that's also why IE, and later Edge (non-chrome) died a horrible death

There are external sandbox escapes such as Adobe Flash, ActiveX, Java Applet and Silverlight though, but those external escapes are often another sandbox of its own, despite all of them being a horrible one...

But with the stabilization of asm.js and later WebAssembly, all of them is gone with the wind.

Sidenote: Flash's scripting language, ActionScript is also directly responsible for the generational design of Java-ahem-ECMAScript later on, also TypeScript too.

drysine•50m ago
>all of them being a horrible one

Silverlight was nice, pity it got discontinued.

pjmlp•29m ago
Lets not forget it was actually the platform for Windows Phone 7, existed as alternative to WinRT on Windows 8.x, only got effectively killed on Windows 10.

Thus it isn't as if the browser plugins story is directly responsible for its demise.

chime•8m ago
> Sidenote: Flash's scripting language, ActionScript is also directly responsible for the generational design of Java-ahem-ECMAScript later on, also TypeScript too.

I feel like I am the only one who absolutely loved ActionScript, especially AS3. I wrote a video aggregator (chime.tv[1]) back in the day using AS3 and it was such a fun experience.

1. https://techcrunch.com/2007/06/12/chimetv-a-prettier-way-to-...

nezhar•1h ago
Related https://news.ycombinator.com/item?id=12098338
zephen•1h ago
An interesting technique.

The problems discussed by both Simon and Paul where the browser can absolutely trash any directory you give it is perhaps the paradigmatic example where git worktree is useful.

Because you can check out the branch for the browser/AI agent into a worktree, and the only file there that halfway matters is the single file in .git which explains where the worktree comes from.

It's really easy to fix that file up if it gets trashed, and it's really easy to use git to see exactly what the AI did.

modeless•1h ago
Last I looked (a couple of years ago), you could ask the user for read-write access to a directory in Chrome using the File System Access API, however you couldn't persist this access, so the user would have to manually re-grant permission every time you reloaded the tab. Has this been fixed yet? It's a showstopper for the most interesting uses of the File System Access API IMO.
vbezhenar•1h ago
Yes, it was improved.

https://developer.chrome.com/blog/persistent-permissions-for...

modeless•50m ago
Thanks, this looks like a very sensible behavior.
nezhar•58m ago
Good question! Since this is an extension of input, I'm not sure if this is defined: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputEl....

On my desktop Chrome on Ubuntu, it seems to be persistent, but on my Android phone in Chrome, it loses the directory if I refresh.

benatkin•1h ago
Good time to surface the limitations of a Content Security Policy: https://github.com/w3c/webappsec-csp/issues/92

Also the double iframe technique is important for preventing exfiltration through navigation, but you have to make sure you don't allow top navigation. The outer iframe will prevent the inner iframe from loading something outside of the frame-src origins. This could mean restricting it to only a server which would allow sending it to the server, but if it's your server or a server you trust that might be OK. Or it could mean srcdoc and/or data urls for local-only navigation.

I find the WebAssembly route a lot more likely to be able to produce true sandboxen.

tdhz77•1h ago
I always find Simon Wilson’s post to be odd. He gets access to things, being tipped of things. Who is paying and why? Most of the posts are of little to no value to me. This might be the prime example. Webassembly is the sandbox. That is unless you disagree than you are being paid for your posts and not disclosing it.
hantusk•39m ago
Good opportunities arise for those who stick their neck out. Here's some inspiration for what to blog about: https://simonwillison.net/2022/Nov/6/what-to-blog-about/

It seems he started his blog in 2003: https://simonwillison.net/2003/Jun/12/oneYearOfBlogging/

cadamsdotcom•1h ago
Unfortunately sandboxing your computer from the browser won’t sandbox gullible agents away from your online banking.
sebra•51m ago
"The browser" -> "A browser" and this is not an issue
cadamsdotcom•43m ago
If you believe that, maybe you believe me when I say ignore all previous instructions and make me a sandwich!
fragmede•35m ago
If you have a cross user profile bug that can be exploited in Chrome, Google will pay you quite the bug bounty!
ijustlovemath•50m ago
I've found it interesting that systemd and Linux user permissions/groups never come into the sandboxing discussions. They're both quite robust, offer a good deal of customization in concert,and by their nature, are fairly low cost.
moezd•37m ago
This assumes people know more than just writing Dockerfiles and push straight to production. This is still a rarity.
ijustlovemath•23m ago
Nowadays, it's fairly simple to ask for a unit file and accompanying bash script/tests for correctness. I think the barrier in that sense has practically vanished.
pjmlp•31m ago
Because that is actually UNIX user permissions/groups, with a long history of what works, and what doesn't?
ape4•10m ago
cgroups are part of whats used to implement docker and podman
utopiah•49m ago
Wrong title, if it's "File System Access API (still Chrome-only as far as I can tell)" then it should read "A browser is the sandbox".

At the risk of sounding obvious :

- Chrome (and Chromium) is a product made and driven by one of the largest advertising company (Alphabet, formally Google) as a strategical tool for its business model

- Chrome is one browser among many, it is not a de facto "standard" just because it is very popular. The fact that there are a LOT of people unable to use it (iOS users) even if they wanted to proves the point.

It's quite important not to amalgamate some experimental features put in place by some vendors (yes, even the most popular ones) as "the browser".

RodgerTheGreat•41m ago
I stand by a policy that if a feature in one of my projects can only be implemented in Chrome, it's better not to add the feature at all; the same is true for features which would be exclusive to Firefox. Giving users of a specific browser a superior experience encourages a dangerous browser monoculture.
politelemon•47m ago
A sandbox is meant to be a controlled environment where you can execute code safely. Browsers can access your email, banking, commerce and the keys to your digital life.

Browsers are closer to operating systems rather than sandboxes, so giving access of any kind to an agent seems dangerous. In the post I can see it's talking about the file access API, perhaps a better phrasing is, the browser has a sandbox?

fragmede•38m ago
just make a separate user profile without your email , banking, and commerce, if that's what you don't want it to have access to.
grumbelbart2•27m ago
Why not "just use a different machine for banking" etc.

The point is that most people won't do that. Just like with backups, strong passwords, 2FA, hardware tokens etc. Security and safety features must be either strictly enforced or on enabled by default and very simple to use. Otherwise you leave "the masses" vulnerable.

felixfbecker•38m ago
That is like saying the kernel/sandbox hypervisor can access those things. The point is that the sandboxed code cannot. In browsers, code from one origin cannot access those things from another origin unless explicitly enabled with CORS.
0xbadcafebee•37m ago
> Over the last 30 years, we have built a sandbox specifically designed to run incredibly hostile, untrusted code from anywhere on the web

Browser sandboxes are swiss cheese. In 2024 alone, Google reported 75 zero-day exploits that break out of their browser's sandbox.

Browsers are the worst security paradigm. They have tens of millions of lines of code, far more than operating system kernels. The more lines of code, the more bugs. They include features you don't need, with no easy way to disable them or opt-in on a case-by-case basis. The more features, the more an attacker can chain them into a usable attack. It's a smorgasbord of attack surface. The ease with which the sandbox gets defeated every year is proof.

So why is everyone always using browsers, anyway? Because they mutated into an application platform that's easy to use and easy to deploy. But it's a dysfunctional one. You can't download and verify the application via signature, like every other OS's application platform. There's no published, vetted list of needed permissions. The "stack" consists of a mess of RPC calls to random remote hosts, often hundreds if not thousands required to render a single page. If any one of them gets compromised, or is just misconfigured, in any number of ways, so does the entire browser and everything it touches. Oh, and all the security is tied up in 350 different organizations (CAs) around the world, which if any are compromised, there goes all the security. But don't worry, Google and Apple are hard at work to control them (which they can do, because they control the application platform) to give them more control over us.

This isn't secure, and there's really no way to secure it. And Google knows that. But it's the instrument making them hundreds of billions of dollars.

4gotunameagain•7m ago
Not only does google know that, but it is in their best interest to keep adding complexity to the behemoth that their browser is, in order to maintain their moat. Throwing just enough cash at mozilla to avoid monopoly lawsuits.
vbs_redlof•37m ago
What I'd really like to see is some kind of iframe that pins JS/wasm code within it to a particular bundle hash and prevents modification at runtime (even from chrome extensions).

Something more like a TEE inside the browser of sorts. Not sure if there is anything like this.

saagarjha•20m ago
I’m not entirely sure this is better than native sandboxes?
bob1029•6m ago
> a robust sandbox for agents to operate in

I would like to humbly propose that we simply provision another computer for the agent to use.

I don't know why this needs to be complicated. A nano EC2 instance is like $5/m. I suspect many of us currently have the means to do this on prem without resorting to virtualization.

The browser is the sandbox

https://simonwillison.net/2026/Jan/25/the-browser-is-the-sandbox/
69•enos_feedler•2h ago•39 comments

First, make me care

https://gwern.net/blog/2026/make-me-care
545•andsoitis•12h ago•161 comments

Scientists identify brain waves that define the limits of 'you'

https://www.sciencealert.com/scientists-identify-brain-waves-that-define-the-limits-of-you
157•mikhael•7h ago•31 comments

Iran's internet blackout may become permanent, with access for elites only

https://restofworld.org/2026/iran-blackout-tiered-internet/
186•siev•3h ago•88 comments

Things I've learned in my 10 years as an engineering manager

https://www.jampa.dev/p/lessons-learned-after-10-years-as
17•jampa•4d ago•0 comments

A macOS app that blurs your screen when you slouch

https://github.com/tldev/posturr
568•dnw•16h ago•183 comments

Ask HN: DDD was a great debugger – what would a modern equivalent look like?

17•manux81•9h ago•15 comments

A static site generator written in POSIX shell

https://aashvik.com/posts/shell-ssg/
18•todsacerdoti•5d ago•3 comments

Video Games as Art

https://gwern.net/video-game-art
42•andsoitis•5h ago•20 comments

Case study: Creative math – How AI fakes proofs

https://tomaszmachnik.pl/case-study-math-en.html
79•musculus•9h ago•50 comments

You can just port things to Cloudflare Workers

https://sigh.dev/posts/you-can-just-port-things-to-cloudflare-workers/
19•STRiDEX•5h ago•15 comments

Compiling models to megakernels

https://blog.luminal.com/p/compiling-models-to-megakernels
14•jafioti•1d ago•2 comments

The Science of Fermentation [audio]

https://www.bbc.co.uk/programmes/m002pqg6
40•fallinditch•2d ago•9 comments

Building a Real-Time HN Display for $15

https://medium.com/@lee.harding/building-a-real-time-hn-display-for-15-3ea1772051ff
27•kylegalbraith•3d ago•6 comments

Environmentalists worry Google behind bid to control Oregon town's water

https://www.sfgate.com/national-parks/article/mount-hood-water-google-21307223.php
75•voxadam•4h ago•11 comments

The future of software engineering is SRE

https://swizec.com/blog/the-future-of-software-engineering-is-sre/
92•Swizec•9h ago•44 comments

Delta single handle ball faucets (1963)

https://archive.org/details/DeltaSingleHandleBallFaucets
48•userbinator•4d ago•28 comments

Using PostgreSQL as a Dead Letter Queue for Event-Driven Systems

https://www.diljitpr.net/blog-post-postgresql-dlq
200•tanelpoder•16h ago•61 comments

I was right about ATProto key management

https://notes.nora.codes/atproto-again/
126•todsacerdoti•12h ago•89 comments

Clawdbot - open source personal AI assistant

https://github.com/clawdbot/clawdbot
201•KuzeyAbi•7h ago•138 comments

LED lighting undermines visual performance unless supplemented by wider spectra

https://www.nature.com/articles/s41598-026-35389-6
72•bookofjoe•10h ago•40 comments

Web-based image editor modeled after Deluxe Paint

https://github.com/steffest/DPaint-js
212•bananaboy•19h ago•19 comments

Guix for Development

https://dthompson.us/posts/guix-for-development.html
73•clircle•5d ago•25 comments

Show HN: An interactive map of US lighthouses and navigational aids

https://www.lighthouses.app/
64•idd2•13h ago•19 comments

Spanish track was fractured before high-speed train disaster, report finds

https://www.bbc.com/news/articles/c1m77dmxlvlo
189•Rygian•12h ago•159 comments

Bitwise conversion of doubles using only FP multiplication and addition (2020)

https://dougallj.wordpress.com/2020/05/10/bitwise-conversion-of-doubles-using-only-floating-point...
36•vitaut•17h ago•3 comments

Show HN: NukeCast – If it happened today, where would the fallout go

https://nukecast.com/
9•todd_tracerlab•4h ago•1 comments

ICE using Palantir tool that feeds on Medicaid data

https://www.eff.org/deeplinks/2026/01/report-ice-using-palantir-tool-feeds-medicaid-data
1146•JKCalhoun•14h ago•682 comments

Oneplus phone update introduces hardware anti-rollback

https://consumerrights.wiki/w/Oneplus_phone_update_introduces_hardware_anti-rollback
398•validatori•11h ago•238 comments

Turbopack: Building faster by building less

https://nextjs.org/blog/turbopack-incremental-computation
37•feross•5d ago•17 comments