Repository navigation
Replies: 1 comment 1 reply
|
Your control experiment — one file, three label states, Three parts of the report need adjusting. The remove path you conclude does not exist does exist in the module; what is missing is a front door onto it, and the repository already records that as undecided work. Your 1. The module can remove the label; only the revocable half is wired to it
mergeAndApply(
api, path, buildExplicitAccess(sidPtr, abi.REVOKE_ACCESS, 0), oldAcl,
hasForeignGrant(oldAcl, sidPtr) ? { kind: 'keep' } : { kind: 'clear' },
descriptor, 'revokeWrite',
)( It is reachable through the public class: So ask #1 is not "provide a restore entry": the mechanism exists one layer down, documented and tested. What does not exist is a command, a menu item or a diagnostic operation that calls it on the standing workspace half. The repository names that gap itself — 2. Your
|
Uh oh!
There was an error while loading. Please reload this page.
环境
@deepseek-ai/dsh0.2.1-rc.2(npm dist-tags 当前next;latest=0.2.0-rc.2、alpha=0.2.1-alpha.5,即已是最新next)web(dsh web,http://127.0.0.1:3080)@deepseek-ai/dsh-sandbox-windows-aclC:\Users\ZHQ\Desktop\dshweb(另有 4 个 DSH 登记过的工作区同样复现)摘要
DSH 在 Windows 上以 workspace-write 模式首次供给工作区时,会按设计(见仓库 agent note
.agents/notes/implemented/feature/2026-09-19-windows-acl-mandatory-integrity-confinement.zh.md)给工作区根目录写入一条可继承、持久的强制完整性标签:
(SID
S-1-16-4096,SYSTEM_MANDATORY_LABEL_NO_WRITE_UP)。该标签被工作区内所有文件和子目录继承,并且在会话结束、切换到 danger-full-access、甚至完全关闭 DSH、重启系统之后仍然存在。
副作用:Windows 会把带 Low 标签的脚本/可执行内容视为不可信,于是:
.ps1/.cmd→ 弹出「打开文件 - 安全警告 / 无法验证发布者」;LocalMachine=RemoteSigned)→ 报无法加载文件 ... 未对文件 ... 进行数字签名。无法在当前系统上运行该脚本。(
PSSecurityException/UnauthorizedAccess)。用户只能手工执行
icacls <工作区> /setintegritylevel Medium /T才能恢复;DSH 自带的
diagnose-windows-sandbox-acl技能在 README 中明确说明“诊断保留完整性标签”,无法修复“Low 标签的可执行文件影响用户在 DSH 外启动程序”的问题。
复现步骤
workspace-write;C:\Users\ZHQ\Desktop\dshweb),让 agent 执行任意命令(触发首次 ACL/标签供给);.ps1(或使用已有脚本),然后在 DSH 之外:powershell -NoProfile -ExecutionPolicy RemoteSigned -File .\x.ps1→ 报“未对文件进行数字签名”;danger-full-access、停止 DSH、重启系统后标签仍在;手工恢复后脚本才可运行。对照实验(排除误判):
.ps1复制到无标签目录 → 在RemoteSigned下正常执行;icacls /setintegritylevel Low→ 立刻变成“未对文件进行数字签名”;/setintegritylevel Medium→ 恢复正常。说明问题来自完整性标签,而非文件内容、签名或执行策略配置。
期望行为
实际行为
影响
.ps1/.cmd在资源管理器双击或 PowerShellRemoteSigned下都会被 Windows 拒绝;建议修复方向(按优先级)
dsh sandbox unlabel <workspace>(或 GUI「清理工作区完整性标签」),内部调用
icacls /setintegritylevel Medium /T或等价 Win32 API;诊断技能增加可选的“修复标签”。dispose()/ 会话结束 / 切到danger-full-access时提供显式 opt-in 的标签回收(设计 note 指出按会话回收成本高,可作为可选 cleanup 而非默认)。
并提供恢复方法。
dsh status或日志检测到工作区带 Low 标签时给出提示。临时规避(用户侧,已在本机验证)
danger-full-access(~/.dsh/profiles/web/cordis.patch.yml的defaultPreset,或 GUI 设置中的权限默认值)——不再启用该沙箱,也就不会打标签;
%USERPROFILE%\.dsh\storages\workspace.json登记的工作区,检测
Mandatory Label\Low并递归恢复为 Medium(无需管理员权限);All reactions