External sandboxes for coding agents
External sandboxes for coding agents
针对代码代理的外部沙盒我一直在探索新的方式,对代理执行的代码进行沙盒处理,重点是让尝试本地模型更加安全,而不用担心错误或提示注入攻击可能导致它们对机器造成损害。我与Prime Radiant合作完成了这个项目,Prime Radiant是Superpowers和其他项目的AI研究实验室。我在Prime Radiant的博客上发表的文章介绍了外部沙盒模式,其中代理执行的代码在专用沙盒中运行,而代理本身则位于该沙盒之外。为了演示这一模式,我们发布了三个沙盒服务器实现:external-sandbox-v86运行一个Node.js服务器,然后使用v86在WebAssembly中运行Alpine Linux。external-sandbox-container是一个Python Web服务器,在Apple Containers实例中运行Alpine Linux的沙盒。external-sandbox-quicksand是另一个Python Web服务器,这次使用了微软的Quicksand沙盒库,该库将QEMU和Alpine Linux打包在一个Python包中!这些实现都提供了相同的localhost API。然后你可以将Pi、Claude Code或Codex配置为向该沙盒发送API调用。
External sandboxes for coding agents I've been exploring new ways to sandbox code that is executed by agents, with a focus on making it safer to try out local models without worrying that a mistake or prompt injection attack might cause them to take damaging actions on a machine. I worked on this project with Prime Radiant , the AI research lab behind Superpowers and other projects . My post on the Prime Radiant blog introduces the external sandbox pattern, where code executed by the agent runs inside a dedicated sandbox while the agent itself lives outside of that sandbox. To demonstrate this pattern we've released three sandbox server implementations: external-sandbox-v86 runs a Node.js server which then uses v86 to run Alpine Linux inside WebAssembly. external-sandbox-container is a Python web server which runs the sandbox in Alpine Linux inside an Apple Containers instance. external-sandbox-quicksand is another Python web server, this time using Microsoft's Quicksand sandboxing library, which bundles QEMU and Alpine Linux in a Python package! Each of these implementations offers the same localhost API. You can then configure Pi, Claude Code, or Codex to send API calls to that s
应来源方要求,这里只提供摘要与原文入口。完整内容请阅读原文。
来源:Simon Willison · simonwillison.net