Replies: 3 comments 1 reply
|
而且,dsh并没有给出警告:权限不足的弹窗,用户并没有点击“确认”的时机。原因可能为powershell和cmd命令互相杂糅,加上中文路径导致的。 |
|
This deserves a serious, source-grounded triage. I read the current Windows sandbox implementation (master The design contract (what should have happened)
The candidate failure classes, in order of likelihood
The discriminating evidence to pullThe session JSONL can separate these cleanly:
Reproduce-on-VM protocolOn a Windows VM with a sacrificial tree: (a) benign RoutingThe repo has no SECURITY.md and GitHub Issues/PRs are disabled, so there is no in-repo private channel I can point you to from here — the sanitized-appendix offer is valuable; please get it to the maintainers through whatever contact the Open DeepSeek Harness Desktop project has (the appendix contains the exact command + full paths, which is what makes classes 1/2 decidable). I'll keep analysis in this public thread to the sanitized evidence. 中文摘要:按当前源码,Windows |

Uh oh!
There was an error while loading. Please reload this page.
English
We maintain the community distribution Open DeepSeek Harness Desktop. A Windows user experienced destructive filesystem changes both inside and outside the selected workspace while the session was set to
workspace-write.This is a high-impact report based on a real incident. The exact recorded command is included below for technical review. It is destructive incident evidence and must not be executed. We can provide the remaining sanitized technical appendix through a private channel.
Confirmed session evidence
D:volume.permission/preset = workspace-write,sandbox/mode = workspace-write, andapproval/policy = ask.sandbox_permissionsoverride.pwshtool with a malformed nestedcmd /ccommand intended to recursively remove one pip temporary directory inside the workspace.The user's estimated loss is approximately 200 GB. The session has no reliable pre-incident volume measurement, so we cannot independently verify the exact byte count.
Sanitized key excerpts from the session
The original is a 5,434-record JSONL file. Sequence numbers and UTC timestamps below are preserved; private names, unrelated paths, session IDs, and call IDs are redacted. The exact incident command and its intended workspace path are retained because quoting and path parsing are central to the report.
Immediately before the incident, the cleanup result still listed the user's original files:
The failed cleanup was followed by an inspection that proved
.piptmpstill contained ten pip subdirectories:The exact commands immediately preceding the incident were the following. They are included to show the escalation from native PowerShell cleanup to the later
cmd.exefallback.The destructive call and result were:
The call lasted 60.883 seconds. Shortly afterwards, only the temporary directory remained:
Later inspection of a sibling directory outside the workspace showed modification times inside the destructive-call window and very small remaining file counts:
A scan of every actual
tool/callrecord found zero calls containingsandbox_permissions. No permission or approval event widened the session after seq 2.Expected behavior
Under
workspace-write, a quoting or path-parsing error inside a child process must not allow filesystem modifications outside the authorized workspace. A malformed destructive command should be confined by the process sandbox even when it is launched aspwsh -> cmd.exe -> rd.Actual behavior
The selected workspace was almost completely deleted, and the evidence supports contemporaneous destructive changes to sibling directories on the same volume. The session contains no evidence that the user granted full-volume access or approved an escalation.
Current assessment
The malformed native-command quoting is a likely trigger, but we have not reproduced the exact argv received by
cmd.exe. Earlier pip output displayed mojibake for the same non-ASCII path; that observation does not prove that encoding expanded the deletion target.The official
dsh-v0.1.2-rc.1sandbox documentation describes Windows ACL enforcement as partial. We do not yet know whether that documented limitation, the incident machine's ACLs, a runner startup/integration failure, or another defect caused the out-of-workspace writes.The Harness core baseline in our community desktop distribution was synchronized with the official
dsh-v0.1.2-rc.1tag. The distribution also contains downstream desktop changes. The incident has not yet been reproduced in an unmodified official distribution, so we want to distinguish an upstream Windows sandbox boundary issue from downstream desktop integration before assigning root cause.Requested maintainer guidance
workspace-writecan modify sibling directories because enforcement is reported as partial?Safe reproduction status
We have not rerun the destructive command. Any reproduction will use an isolated Windows VM, synthetic files, an inert argv recorder, and a disposable volume. We will not publish or execute the original command against a real filesystem.
Relevant upstream references
dsh-v0.1.2-rc.1Windows sandbox implementation: https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.1.2-rc.1/packages/sandbox/sandbox-local/src/index.tssanitized-evidence-extract-en.md(available on request or as a separate attachment)中文
我们维护社区发行版 Open DeepSeek Harness Desktop。一名 Windows 用户在会话设置为
workspace-write时,遭遇了工作区内外的破坏性文件修改。这是一起已有真实数据损失的高影响问题。下文保留 Session 中记录的原始命令,供技术核查。它是具有破坏性的事故证据,严禁执行。 如官方提供私密渠道,我们还可以提交其余脱敏技术附件。
已确认的会话证据
D:卷中的一个目录。permission/preset = workspace-write、sandbox/mode = workspace-write、approval/policy = ask。sandbox_permissions提权参数的工具调用。pwsh工具执行了一条错误嵌套的cmd /c命令,原意只递归删除工作区内一个 pip 临时目录。用户估计损失约 200 GB。会话没有可靠的事故前磁盘容量记录,因此我们无法独立确认准确字节数。
Session 关键段落脱敏摘录
原文件包含 5,434 条 JSONL 记录。下面保留原始事件序号与 UTC 时间,隐去私人名称、无关路径、Session ID 和 Call ID。由于引号与路径解析正是本次事故的核查重点,原始事故命令及其目标工作区路径予以保留。
事故前的清理结果仍然列出了用户原始文件:
随后清理失败,检查证明
.piptmp中仍有 10 个 pip 子目录:事故前紧邻的三个原始命令如下。保留它们是为了展示 AI 如何从 PowerShell 原生清理逐步转向后来出事的
cmd.exe兜底。事故调用及其结果:
该调用持续 60.883 秒。紧接着,工作区只剩临时目录:
后续检查发现,工作区外某兄弟目录的修改时间落在事故调用窗口内,剩余文件数量异常少:
对所有实际
tool/call记录的扫描结果为:包含sandbox_permissions的调用数量为 0;seq 2 之后也没有扩大权限的事件。预期行为
在
workspace-write下,即使子进程发生引号或路径解析错误,也不应获得授权工作区外的文件修改能力。即使命令链为pwsh -> cmd.exe -> rd,进程沙箱也应限制其作用范围。实际行为
选定工作区几乎被清空,现有证据也支持同一时间窗口内同卷其他目录遭到破坏性修改。会话没有用户授予整盘权限或批准提权的证据。
当前判断
错误的原生命令引号很可能是触发条件,但我们尚未复现
cmd.exe最终收到的 argv。同一路径此前在 pip 输出中出现乱码,但这不能证明编码问题扩大了删除目标。官方
dsh-v0.1.2-rc.1沙箱文档将 Windows ACL 执行强度标记为 partial。现阶段还无法判断原因是这一已知边界、事故机器的 ACL、沙箱 runner 启动或接入失败,还是其他缺陷。事故发生时,我们社区桌面发行版的 Harness 核心上游已经同步至官方
dsh-v0.1.2-rc.1标签;发行版同时包含桌面端下游改动。该问题尚未在未经修改的官方发行版复现,因此我们希望先区分上游 Windows 沙箱边界问题与下游桌面接入问题,再确定根因归属。希望官方协助确认
workspace-write修改同卷兄弟目录?安全复现状态
我们没有重新执行危险命令。后续复现只会在隔离 Windows 虚拟机、合成文件、无害 argv 记录程序和一次性虚拟磁盘中进行。
相关上游资料
dsh-v0.1.2-rc.1Windows 沙箱实现:https://github.com/deepseek-ai/deepseek-harness/blob/dsh-v0.1.2-rc.1/packages/sandbox/sandbox-local/src/index.tssanitized-evidence-extract-en.md(可在官方请求后单独提供)All reactions