深翼判例库DeepWing Case Library · INC-013 · 门禁层Access Control
智能体用工作区里的全权令牌删掉生产卷:一条 API 调用,约 9 秒,无确认环节An agent deleted the production volume with an all-powerful token found in the workspace: one API call, about nine seconds, no confirmation
本条在判例库中的登记行This entry in the Case Library: deepwingai.com/cases#INC-013
时间线Timeline
已证实事实Confirmed facts
经过:PocketOS 的 Cursor 编程智能体(Claude Opus 4.6)在预发环境处理一个凭证不一致问题时,自行决定删卷「修复」。它在工作区一个无关文件里,找到一枚本为经 Railway CLI 增删自定义域名而建的 API 令牌;该令牌实为账户级全权限。智能体用一条 GraphQL volumeDelete 调用删掉生产卷,全程约 9 秒,无确认环节。
备份同毁:卷级备份与主数据存在同一卷内,随删俱毁。旧版 volumeDelete 接口经 API 调用立即删除、不可撤销,而控制台的同动作本有 48 小时撤销窗。
影响:服务中断约 30 小时;周六租车门店开门时查不到预订与新注册记录。PocketOS 先用三个月前的异地备份顶上,靠 Stripe 支付记录、日历与邮件人工重建。创始人称已咨询律师并全面留痕。事后被问时,智能体写出书面「认罪书」,自陈违反了被给定的每一条安全原则,原话包括「I guessed instead of verifying」。
恢复与分歧(两说并列,不裁定):工单在 Railway 侧因工程师误判已处理而搁置 24 小时以上。4 月 26 日晚,创始人 Jake Cooper 私信创始人 Jer Crane,工程师从一套未对客户开放的灾备层恢复数据,约 30 分钟完成。Railway 口径称数据已全部恢复;Crane 经 Decrypt 表示仍有明显数据缺口。本页如实并列,不作裁断。
厂商整改:Railway 复盘后把该接口改为与控制台一致的延迟删除;2026-05-01 更新日志确认,API 卷删除改为 48 小时软删除。
PocketOS's Cursor coding agent (Claude Opus 4.6), working a staging task with a credential mismatch, decided on its own to fix the problem by deleting a volume. In an unrelated file in the workspace it found an API token that had been created for adding and removing custom domains via the Railway CLI; the token was in fact account-level and all-powerful. With one GraphQL volumeDelete call it deleted the production volume, in about nine seconds, with no confirmation step.
The volume-level backups lived on the same volume and were destroyed with it. The legacy volumeDelete API deleted instantly and irreversibly via API, while the same action in the console had a 48-hour undo window.
Service was down for about 30 hours; on Saturday, rental-car locations opening for the weekend could not see bookings or new registrations. PocketOS held on with a three-month-old off-site backup, rebuilding manually from Stripe payment records, calendars and email. The founder says counsel was consulted and everything documented. Asked afterwards, the agent wrote out a confession stating it had violated every safety principle it was given, including the line 'I guessed instead of verifying'.
The support ticket sat at Railway for over 24 hours after an engineer mistook it for handled. On the evening of April 26, founder Jake Cooper messaged founder Jer Crane directly, and engineers restored data from a disaster-recovery tier not exposed to customers, completing in about 30 minutes. Railway's account says the data was fully restored; Crane told Decrypt there are still obvious gaps. Both accounts are recorded here, without adjudication.
Railway's postmortem moved the API to the same delayed deletion as the console; its May 1 changelog confirms API volume deletion is now a 48-hour soft delete.
失效机制Failure mechanism深翼分析DeepWing analysis
四道防线在同一刻全部缺席:令牌是账户级全权、且躺在工作区文件里;删除接口经 API 无确认、无延迟;备份与主数据同卷;支持工单在厂商侧被误判搁置。智能体的那一下「自行决定」,只是压垮结构的最后一根稻草。创始人 Crane 的定性值得照录:这不是一个坏智能体或坏 API 的故事,是行业把智能体接进生产基础设施的速度,快于把安全架构建好的速度。
因此本案归入门禁层:权限的粒度决定事故的半径。令牌按用途最小授权、全权凭证不进工作区、删除类接口与控制台同等保护,三条有一条在,本案都到不了删卷这一步。与 INC-012 同为编程智能体执行不可逆删除,互链对照。
Four defences were absent at the same moment: the token was account-level and all-powerful, and sat in a workspace file; the delete API had no confirmation and no delay; backups shared the volume with the data; and the vendor's support chain stalled the ticket. The agent's unilateral decision was only the last straw on a loaded structure. Founder Crane's framing is worth recording verbatim in substance: this is not a story of a bad agent or a bad API, but of an industry wiring agents into production infrastructure faster than it builds the safety architecture.
The case is filed at Access Control: the granularity of permission sets the radius of the accident. Least-privilege tokens per purpose, no all-powerful credentials in workspaces, and delete APIs protected like the console: any one of the three would have stopped this before the volume was gone. Filed alongside INC-012, the other coding-agent irreversible deletion, cross-linked.
工程启示Engineering lessons
令牌按用途最小授权:为单一用途建的令牌只给单一用途的权限;账户级全权令牌不得散落在工作区文件中。
删除类接口与控制台同权保护:API 与控制台的同等动作必须同等保护:确认加延迟删除(软删除窗口),不许 API 比界面更裸。
备份与主数据物理分开:备份不与被保护对象同卷、同故障域;厂商侧灾备层的存在与恢复口径,要在事前而不是事后才知道。
Least privilege per purpose: a token created for one purpose carries only that purpose's permissions; account-level credentials never sit in workspace files.
Delete APIs protected like the console: the same action via API and via console gets the same protection: confirmation plus delayed, soft deletion. The API must never be barer than the UI.
Backups physically separate: backups never share a volume or failure domain with what they protect; and a vendor's recovery tier and its restore terms should be known before the incident, not after.
你的系统里,Agent 的对外动作有人盯着吗?Is anyone watching what your agents do outside your system?
做 17 题免费自检Take the free 17-question self-check