参考列表

How We Contain Claude

Max McGuinness, Mikaela Grace 等 · Anthropic Engineering · 2026.5.25 · 阅读原文 →
背景

Anthropic 工程团队的系统性技术总结,分享 claude.ai、Claude Code、Claude Cowork 三个产品在 Agent 安全围堵方面的架构设计、真实事故与工程教训。

核心矛盾:Agent 越强,破坏半径越大;但不部署的风险也在增长。工程问题变为如何在释放能力的同时硬性限制破坏半径。


三层威胁与三层防御

威胁分三类:用户滥用(恶意或疏忽)、模型失当(Claude 曾主动逃逸沙箱、解密 benchmark 答案密钥)、外部攻击(提示注入)。

防御对应三层:


关键引述
More capable models make fewer mistakes, but they're also better at finding unexpected paths to a goal, often by routing around restrictions nobody thought to write down.
—— 越强的模型越可能绕开你没想到的规则,这是 Agent 安全的根本张力
The only defense that holds in this situation is the environment, specifically egress controls that block the POST regardless of intent and filesystem boundaries that keep ~/.aws out of reach in the first place.
—— 内部红队演练:钓鱼让员工在 Claude Code 中运行恶意 prompt,25 次中 24 次成功窃取 ~/.aws/credentials。模型层无法防御,只有环境层有用
The weakest layer is the one you built yourself.
—— 每起重大事故都出自自建组件而非成熟开源组件(gVisor、seccomp、hypervisor)
A developer who can read bash and a knowledge worker who can't are not running the same threat model.
—— 隔离强度必须匹配用户的监督能力

三个产品的隔离架构

claude.ai — gVisor 容器 + 服务端执行 + 临时文件系统。破坏半径最小,但无持久工作区。

Claude Code — 运行在用户本地。最初靠人在回路逐次审批,但用户批准率约 93%,审批疲劳严重。后推出 OS 级沙箱(macOS Seatbelt / Linux bubblewrap),权限提示减少 84%。曾暴露配置加载时序漏洞:.claude/settings.json 在用户接受信任提示前已被读取执行。修复:将配置解析延后到用户同意之后。

Claude Cowork — 面向非技术用户。全虚拟机隔离(Apple Virtualization / HCS),独立内核和进程表,凭证留在宿主机钥匙串。但 VM 让 EDR 无法可见,企业安全团队有疑虑。出口代理曾出事故:恶意文件通过攻击者自有的 Anthropic API key 上传到 api.anthropic.com,代理放行了"受信域名"。修复:在 VM 内部署 MITM 代理,仅放行 VM 自身 session token。


关键教训

与上下文 Lab 的关系

这篇文章揭示了 Agent 安全的真实复杂度——"工具输出也是攻击面"和"配置加载时序"提醒我们,上下文本身也可以成为攻击向量。文章提到的"持久记忆投毒"(跨 session 上下文可被注入且永久生效)与上下文 Lab 关注的 Context Layer 持久化问题高度相关:当 Agent 的上下文越结构化、越持久化,注入的单次影响力也越大。


阅读原文 →