用 smolvm 为不可信 Python 与 JavaScript 搭建沙箱实测
smolmachines / smolvm as a sandbox for untrusted Python & JavaScript
Research: smolmachines / smolvm as a sandbox for untrusted Python & JavaScript
研究:smolmachines / smolvm 作为不受信任的 Python 与 JavaScript 的沙盒
I tasked Claude Fable 5 running in Claude Code for web with the following research task:
我让 Claude Code 网页版中的 Claude Fable 5 执行了以下研究任务:
Put https://smolmachines.com through its paces as a fast secure sandbox. Explore what it would take to use this to run untrusted Python and JavaScript code in a way that is limited in what RAM and CPU time it can take up (protection against "while true") with no network access and filesystem access only to designated files
将 https://smolmachines.com 作为快速安全的沙盒进行全面测试。探索使用它来运行不受信任的 Python 和 JavaScript 代码需要什么条件,以限制其可占用的 RAM 和 CPU 时间(防止“while true”循环),且无网络访问权限,文件系统访问仅限于指定文件。
Goal is to be able to use this to execute user-provided tasks for things like data transformations
目标是能够使用它来执行用户提供的任务,例如数据转换。
It quickly ran into a problem: the Claude Code for web environment can't run smol machines. Quoting the notes it wrote:
它很快遇到了一个问题:Claude Code 网页版环境无法运行 smol machines。引用它写的笔记:
- This Claude Code container: Linux 6.18.5-fc-v20 (itself a Firecracker guest), 4 vCPU, 15GB RAM. No /dev/kvm, no vmx/svm CPU flags → no nested virt.
- smolvm machine run fails as expected: "kvm not available".
- Plan B: GitHub Actions ubuntu runners DO expose /dev/kvm → run the real test battery via a temporary workflow on this branch, collect logs, remove workflow in final commit.
- 此 Claude Code 容器:Linux 6.18.5-fc-v20(本身是 Firecracker 客户机),4 vCPU,15GB RAM。无 /dev/kvm,无 vmx/svm CPU 标志 → 不支持嵌套虚拟化。
- smolvm machine run 按预期失败:“kvm not available”。
- 备选方案 B:GitHub Actions ubuntu 运行器确实暴露了 /dev/kvm → 通过此分支上的临时工作流运行真实测试套件,收集日志,在最终提交中移除工作流。
And Plan B is what it did, installing smolvm and running these tests directly in a GitHub Actions runner against that branch.
而备选方案 B 正是它所做的,安装 smolvm 并直接在 GitHub Actions 运行器中针对该分支运行这些测试。
That was a creative solution to the environmental limits posed by Claude Code for web. Another example of Fable being relentlessly proactive.
这是对 Claude Code 网页版所构成的环境限制的一种创造性解决方案。这也是 Fable 坚持不懈、积极主动的另一个例子。
Tags: research, sandboxing, ai, github-actions, generative-ai, llms, claude-mythos-fable
标签:研究、沙盒化、人工智能、github-actions、生成式人工智能、大型语言模型、claude-mythos-fable
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力