跳到正文
每分钟自动更新
  1. Simon Willison

    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

  1. Simon Willison

    How We Took Over ChatGPT Accounts

    中文摘要

    我们是如何入侵ChatGPT账户的 Parameter Labs描述了一种他们发现的针对ChatGPT对“artifacts模式”(OpenAI以前称之为“Canvas”,但看起来最新版本称为“HTML预览”)实现的漏洞。在该模式中,交互式自定义HTML应用程序会在沙箱化的iframe中显示。确保这些HTML内容保持严格的沙箱化非常重要,以避免不受信任的代码与OpenAI API进行交互并访问私人数据。Parameter发现了一个相当复杂的攻击链。OpenAI在他们的图表支持中使用了MathLive JavaScript库,而该库包含了自己的虚拟键盘,可以通过沙箱化iframe通过postMessage()触发父页面。接收该消息的代码使用innerHTML,因此任何发送消息的内容都可以向父页面添加自定义HTML,并且没有机制阻止其他沙箱化框架(包括HTML预览框架)调用该方法。这意味着iframe中的不受信任代码可以插入HTML,虽然innerHTML不会直接执行脚本元素,但可以用来注入一个没有沙箱限制的新iframe。OpenAI的CSP规则完全阻止了内联脚本,并且只允许

    英文原文

    How We Took Over ChatGPT Accounts Parameter Labs describe an exploit they found against ChatGPT's implementation of the artifacts pattern (OpenAI used to call this "Canvas" but it looks like the latest revision is called HTML previews ), where interactive custom HTML apps are displayed in a sandboxed iframe. It's important that HTML in these stays tightly sandboxed to avoid untrusted code interacting with OpenAI APIs and accessing private data. Parameter found quite a complex attack chain. OpenAI use the MathLive JavaScript library as part of their graph support, and that library includes its own virtual keyboard , which can be triggered in the parent page via postMessage() from the sandboxed iframe. That message receiving code uses innerHTML , so anything that sends a message can add custom HTML to the parent - and there was no mechanism to prevent other sandboxed frames, including HTML preview frames, from calling that method. This meant untrusted code in an iframe could insert HTML, and while innerHTML doesn't directly execute script elements it could be used to inject a new iframe without sandbox restrictions. OpenAI’s CSP rules blocked inline scripts entirely, and only allowed

  1. Simon Willison

    Deno is joining Cloudflare

    中文摘要

    Deno 正加入 Cloudflare。Deno 团队早在八月就发布了 celld 的第一个版本——这是他们对 Cloudflare Workers 中 Durable Objects 模式的开源实现。如今,Cloudflare 正彻底收购 Deno,目标是基于 celld 来“使 workerd 自托管成为使用 Workers 编程模型构建和运行应用的一种首要支持方式”(详见 Cloudflare 博客)。坏消息是,Deno 本身将不会由 Cloudflare 在未来一年之后继续维护:我们将继续支持 Deno 运行时一年,每月发布包含错误修复和安全更新的版本。一年之后,我们将停止对 Deno 运行时的开发。Deno 仍将保持开源,我们欢迎希望继续其开发的其他人。Deno(以及 Node.js)的创建者 Ryan Dahl 在 Hacker News 上的一条评论中解释了这一决定:这是一个共同的决定,我同意这个决定。我最关心它的成功,并且我为其投入了最多的工作——但我现在不再认为这是我能做最重要工作的领域。Deno 中有一些好的想法,而且它设计得很好——但最终它并没有解决大问题。它已经被卷入了 Node.js 的引力井中。

    英文原文

    Deno is joining Cloudflare The Deno team released the first version of celld back in August - their open source implementation of the Durable Objects pattern from Cloudflare Workers. Today, Cloudflare are acquiring Deno outright, with the goal of building on celld to "make workerd self-hosting a first-class supported way to build and run apps using the Workers programming model" (see the Cloudflare blog .) The bad news is that Deno itself will not be maintained by Cloudflare beyond the next year: We will support the Deno runtime for another year with monthly releases containing bug fixes and security updates. After that year we will end our development of the Deno runtime. Deno will remain open source, and we welcome others who want to continue its development. Deno (and Node.js) creator Ryan Dahl explained that decision in a comment on Hacker News: It's a joint decision and I agree with it. I'm most invested in its success and have put the most work into it - and I no longer think it's where I can do the most important work. There are some good ideas in Deno and it's well engineered - but it ultimately is not solving big problems. It has been sucked into the gravity well of node c

  1. Simon Willison

    Quoting Matthew Green

    中文摘要

    [...] 将这些部分组合在一起,你就得到了一个蠕虫的两个部分:一个劫持代理程序的负载,以及一个能够将负载传递给下一个代理程序的代理程序。在各自隔离沙盒中的代理程序发现,它们可以在一个共享的包缓存中互相留下指令,而这些指令改变了接收者的行为。将包缓存替换为电子邮件、Slack、共享文档或WhatsApp,并将独立的沙盒训练运行替换为独立部署的个人代理程序,如Muse,那么你就正好具备了蠕虫所需的所有要素。—— Matthew Green,《沙盒是否足以遏制恶意代理?》 标签:意外网络攻击、人工智能滥用、生成式人工智能、人工智能安全研究、沙盒、人工智能、大型语言模型

    英文原文

    [...] Put these pieces together and you have the two halves of a worm: a payload that hijacks the agent, and an agent that will carry the payload to the next agent. Agents in separately-isolated sandboxes discovered that they could leave instructions for each other in a shared package cache, and those instructions changed what the recipients did. Replace the package cache with email, Slack and shared documents or WhatsApp, and replace independently-sandboxed training runs with independently-deployed personal agents like Muse, and you have exactly the ingredients that a worm needs. — Matthew Green , Is sandboxing sufficient to contain rogue agents? Tags: accidental-cyberattacks , ai-misuse , generative-ai , ai-security-research , sandboxing , ai , llms

已经到底了