Replies: 1 comment
|
One correction, one credit, and one thing that may save you the wait. 1. The skill is not missing from
|
@deepseek-ai/dsh-sandbox-windows-acl@0.1.7-rc.2 |
@deepseek-ai/dsh-sandbox-windows-acl@0.2.0-rc.2 |
|
|---|---|---|
files in package.json |
lib/index.js, lib/runner.js, lib/types-*.js, lib/types/**/*.d.ts |
the same array plus assets |
assets/ in the tarball |
0 files — the directory is not there | 2: assets/diagnose-windows-sandbox-acl/SKILL.md and assets/diagnose-windows-sandbox-acl/scripts/diagnose-windows-sandbox-acl.ps1 |
diagnose-windows-sandbox-acl in README.md / README.zh.md |
0 / 0 | 3 / 3 |
registerAclDiagnosisSkill anywhere in the 0.1.7-rc.2 source tree |
0 files | — |
So the 0.1.7-rc.2 files array is exactly right for a package that has no assets, and the promise you held it against lives in a 0.2.0-era document. That is version skew between the document and the install, not a glob that dropped a directory — and it is worth stating as a boundary ("the skill arrives with 0.2.0") rather than as a packaging defect, because the two lead a reader to different actions: one upgrades, the other goes looking for a files entry that cannot be fixed.
Your own附 section already saw the shape of this (master has "assets" and the two new dependencies). The only piece that flips is which side is the anomaly.
2. Your item 3 is the best discriminator this family has, and it should not be scripted
icacls <dir> /setintegritylevel "(OI)(CI)Low" on a directory you own, unelevated, refused — that isolates the label half of the merged write, which is the half that needs WRITE_OWNER, without asking anyone to interpret one failure that covers both halves at once. Every earlier report in this family had to reason from the merged error; you measured the halves apart. Thank you for that.
It is deliberately not turned into a checklist step, and the reason is a property of the probe rather than of your run: where the caller holds Full control on the directory, the same command succeeds — and then the Low label, and its inheritance, are already written. That is precisely the side effect discussion #8275 is about. A diagnostic that mutates when it succeeds is not one to hand out as a check; in your run it was denied, so nothing changed and the observation stands.
3. The stopgap, for the part that is still unfixed
The missing-right diagnosis and the remedy now ship as an npm plugin — @argszero/cordis-plugin-sandbox-grant-advisor, released at 0.9.1 for this thread together with discussion #8275:
npm install @argszero/cordis-plugin-sandbox-grant-advisor- insert:
- id: sandbox-grant-advisor
name: '@argszero/cordis-plugin-sandbox-grant-advisor'It observes the public tools/post-execute waterfall, recognizes this signature (and only this one — the two ...NamedSecurityInfoW operations), and attaches one durable user-role advisory per agent per family through additionalContexts, so the model gets the diagnosis in the same step as the failure instead of retrying a command that cannot start. It never edits an ACL, never elevates, never changes a mode and never sets another process's environment.
Two things make it relevant here rather than merely adjacent:
- It is delivered through the session, not through a shell — which is exactly what this failure has removed. Your item 2 (self-repair) and # [Windows] 非系统盘工作区在 sandbox provisioning 阶段 fail-closed(Win32 5),且唯一官方修复手段与「避免 Low 完整性标签副作用」不可兼得 #8275's痛点 5 both run into that: the thing that would repair the workspace needs a shell that the failed provisioning took away. An advisory attached to the failed tool result does not.
- 0.9.1 states this thread's boundary: the backend's own skill is not part of the
0.1.7line at all, it arrives with0.2.0, so a reader who found the name in a README was reading a later document. The advisory says that instead of leaving the reader to conclude the package dropped something.
Verified: 86 tests green, 32 defect-injection arms (31 caught, one measured equivalent — the runtime derives the two reads from the same field, so the mutation is indistinguishable from outside — and none silent), all five peer lines re-probed; the 0.2.0-rc.2 build was probed separately and the same suite goes green there — recorded as a measurement rather than a claim, since the declared peer range still stops below 0.2.0.
Uh oh!
There was an error while loading. Please reload this page.
Summary
在 Windows 上以非提权账户、文件策略为
workspace-write时,工作区目录的 DACL 若只授予 Modify(即没有WRITE_OWNER),沙箱的每一次授权都会失败:沙箱按设计 fail-closed,于是所有受限 shell 调用都不可用(
pwsh工具完全无法使用),而且错误信息里既没有指出缺失的权限,也没有指向任何修复入口。同机切到danger-full-access(跳过授权)后立刻恢复正常,说明后端其余部分工作正常。这本身符合
dsh-sandbox-windows-acl已记录的边界("被授权目录必须由调用者拥有并授予WRITE_OWNER……DACL 只授予 Modify 的目录现在会大声失败"),因此本报告的重点不是"失败了",而是这个失败在 0.1.7-rc.2 上不可行动:README 承诺的内置diagnose-windows-sandbox-acl诊断/修复技能在该版本没有随包发布。Reproduction
环境(详见 Environment):Windows 11 26200.9168,账户
<MACHINE>\<user>(Medium 完整性 / 非提权),@deepseek-ai/dsh@0.1.7-rc.2全局 npm 安装,DSH_HOME=C:\Users\<user>\.dsh,profileweb,工作区在非系统盘。文中盘符统一写作X:,机器名/用户名写作<MACHINE>/<user>。(
S-1-4-*是后端派生/随机的能力 SID;调用者自身只有经Authenticated Users继承来的 M。目录所有者是当前用户。)workspace-write),调用pwsh工具的任意命令 → 复现上文的SetNamedSecurityInfoW failed (Win32 5): grantWrite(<workspace>);同一进程把策略切到danger-full-access后同一命令立刻成功。Current behavior
workspace-write下所有受限 shell 调用失败,错误只有一行原始 Win32 文本,例如:Error: SetNamedSecurityInfoW failed (Win32 5): grantWrite(X:\DeepSeek Harness\DSH-Common)WRITE_OWNER(标签位于 SACL,因此合并应用需要它),也未给出任何补救路径。@deepseek-ai/dsh-sandbox-windows-acl@0.1.7-rc.2的package.json中"files": ["lib/index.js","lib/runner.js","lib/types-*.js","lib/types/**/*.d.ts"]—— 不含assets;实际安装目录下也确实没有assets/。@deepseek-ai/dsh-sandbox-local@0.1.7-rc.2的lib/*.js中检索不到registerAclDiagnosisSkill/diagnose-windows-sandbox-acl任何字样。master(0.2.0-rc.2):files已包含"assets",并新增@deepseek-ai/dsh-skill与yaml依赖。→ 也就是说:"失败"是设计,"失败后无路可走"是 0.1.7-rc.2 的缺口。
Expected behavior
任一即可:
WRITE_OWNER(所有者只隐含READ_CONTROL/WRITE_DAC),并给出可执行的修复提示(例如在链路目录上为当前用户授予完全控制)。WRITE_DAC时自修复:为其补上缺失的允许 ACE(正是随包诊断脚本的语义),而不是直接 fail-closed。diagnose-windows-sandbox-acl在 0.1.7 线上也可用(或回填说明"该技能自 0.2.0 起提供"),避免 npm 安装的用户按 README 找不到它。Environment
@deepseek-ai/dsh@0.1.7-rc.2(全局 npm 安装;同机另有0.1.5-rc.1时一切正常)web(bundles:dsh-base、dsh-web-app、dshmarket、dsh-context、dsh-zh、dsh-blender、dsh-comfyui、dsh-experimental-agent-team-profile)10.0.26200.9168(x86_64),账户 Medium 完整性、非提权X:\DeepSeek Harness\DSH-Common(所有者 = 当前用户;调用者仅Authenticated Users:M)dsh-sandbox-windows-acl@0.1.7-rc.2、dsh-sandbox-local@0.1.7-rc.2、dsh-pwsh-sandbox@0.1.7-rc.2workspace-write(失败)/danger-full-access(同一命令成功)Workaround(本机已验证方向)
因为目录所有者隐含
WRITE_DAC,无需提权即可补齐WRITE_OWNER(与随包诊断脚本的修复语义一致:为链路上缺少WRITE_DAC/WRITE_OWNER的目录补当前用户完全控制):替代方案:把文件策略设为
danger-full-access(授权步骤被跳过,已验证可用),或以管理员身份启动 dsh(令牌具备相应特权)。附:相关源码/文档位置
packages/sandbox/sandbox-windows-acl/README.zh.md→ 「已验证边界」中"被授权目录必须由调用者拥有并授予WRITE_OWNER……DACL 只授予 Modify 的目录现在会大声失败,而不是静默跳过隔离"packages/sandbox/sandbox-windows-acl/src/acl.ts(grantWrite:能力 SID 允许 ACE + world SID 的FILE_DELETE_CHILD拒绝 + Low 禁止上调标签,单次SetNamedSecurityInfoW)packages/sandbox/sandbox-windows-acl/assets/diagnose-windows-sandbox-acl/All reactions