from deno_sandbox import DenoDeploy
sdk = DenoDeploy()
with sdk.sandbox.create() as sb:
# Run a shell command
process = sb.spawn("echo", args=["Hello from the sandbox!"])
process.wait()
# Write and read files
sb.fs.write_text_file("/tmp/example.txt", "Hello, World!")
content = sb.fs.read_text_file("/tmp/example.txt")
print(content)
Looks like the API protocol itself uses websockets: https://tools.simonwillison.net/zip-wheel-explorer?package=d...The interesting attack surface that emerges: any endpoint on your approved hosts that reflects input back in responses. Error messages, search pages, create-then-read flows. The thread already covers this, but practically speaking, most API providers have learned to sanitize these paths after years of debugging sensitive token leaks in logs.
For anyone evaluating this vs. rolling your own: the hard part isn't the proxy implementation, it's maintaining the allow-list as your agent's capabilities grow and making sure your secret substitution rules are tight enough to catch edge cases.
> The real key materializes only when the sandbox makes an outbound request to an approved host. If prompt-injected code tries to exfiltrate that placeholder to evil.com? Useless.
That seems clever.
This isn’t the traditional “run untrusted plugins” problem. It’s deeper: LLM-generated code, calling external APIs with real credentials, without human review. Sandboxing the compute isn’t enough. You need to control network egress and protect secrets from exfiltration.
Deno Sandbox provides both. And when the code is ready, you can deploy it directly to Deno Deploy without rebuilding."
So many sandbox products these days though. What are people using in production and what should one know about this space? There's Modal, Daytona, Fly, Cloudflare, Deno, etc
Why limit the lifetime on 30 mins ?
How to know what domains to allow? The agent behavior is not predefined.
Those limitations from other tools was exactly why I made https://github.com/danthegoodman1/netfence for our agents
Will give these a try. These are exciting times, it's never been a better time to build side projects :)
The real question is can the microVMs run in just plain old linux, self-hosted.
Just an idea…
Looks like the main innovation here is linking outbound traffic to a host with dynamic variables - could that be added to deno itself?
That website does exist. It may hurt your eyes.
I really like it. Startup times are now better than node (if not as good as bun). And being able to put your whole "project" in a single file that grabs dependencies from URLs reduces friction a surprising amount compared to having to have a whole directory with package.json, package-lock.json, etc.
It's basically my "need to whip up a small thing" environment of choice now.
It uses web workers on a web browser. So is this Deno Sandbox like that, but for server? I think Node has worker threads.