Repository navigation
Replies: 1 comment
更正:影响面不是"所有 Windows 用户",Low 标签也早于市场安装补充本机进一步排查的结果,修正上面 Summary 里的影响面描述。 1. profile 目录的 Low 标签不是市场安装造成的,也不是 DSH 的默认初始状态
2. 影响面需要收窄
3. 另一个对原生二进制插件普遍的风险(非 DSH 特有)
上面原来的修复建议(安装后归一化标签,或不要把 profile 树当作常驻 Low 的 workspace 根)仍然成立,只是请按"profile 被授权过"这个前提来评估优先级。 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
DSH Desktop(Windows)会把 profile 目录
%USERPROFILE%\.dsh\profiles\<profile>标成可继承的 Low 完整性标签(Mandatory Label\Low Mandatory Level:(OI)(CI))。市场安装插件时,pnpm 在这个目录下写出的所有文件都会继承 Low,包括插件依赖的原生二进制(如 Electron)。插件激活时启动这些二进制会直接失败(Chromium exit0x80000003),窗口/进程起不来。影响面:任何带原生二进制的市场插件,在所有 Windows 用户上都会中招,不是单个插件的问题。插件作者目前只能在运行时自行
icacls抬标签绕过(我们已在 dsh-agentic-pet 0.4.6 中这么做作为 workaround),但这不应由插件承担,也绕过了安装沙箱的一层 defense-in-depth。EN: On Windows, the desktop profile directory carries an inheritable Low integrity label, so everything pnpm installs from the market inherits it — including native binaries. Plugins that ship an executable cannot start it (Chromium exits 0x80000003).
Reproduction
desktop。dsh-agentic-pet@0.4.5(npm,依赖electron@^44.7.0,实际解析到 44.10.1)。...\node_modules\electron\dist\electron.exe <carrier>。carrier-spawn.log记录child exit code=2147483651(0x80000003),宠物窗口不出现。icacls证据:~\.dsh\electron-dist,Medium)→ 同一份二进制正常启动;icacls "<dist>" /setintegritylevel "(OI)(CI)M" /T(76 个文件)→ 同一份二进制正常启动。~\.dsh\whale598\pet-surface-url.json是 Medium),所以 Low 不是宿主令牌造成的,而是 profile 目录的继承标签。Current behavior
%APPDATA%的 userData,伴随拒绝访问 (0x5))。ensureElectronUsable()在 spawn 前检查icacls,发现 Low 就抬到 Medium(dsh-agentic-pet 0.4.6,commit 946778c)。这是对安装沙箱的绕过,不应是长期方案。Expected behavior
建议任选其一(宿主/市场侧):
node_modules里的可执行文件做一次完整性标签归一化。icacls。Environment
desktopicacls标 Medium;这次确认 profile 目录本身也会让市场安装的文件继承 Low。Additional context
DSH_PET_ELECTRON路径、失败只写日志。All reactions