dsh-sandbox-windows-acl
github.com/deepseek-ai/deepseek-harness
v0.0.1-rc.1
开发与运行时
启动伪终端写入文件
harness sandbox seam 的 Windows 写入限制沙箱后端:把 huoyaoyuan/windows-acl-restrict-poc(`10e4dfb`,即固定修订版)中的机制移植到 Node.js/koffi,作为 `@deepseek-ai/dsh-sandbox-local` 链的 win32 层级挂载(`workspace-write` / `read-only` 模式);同一个包也承载 Linux/mac
作者原文(英文)
Windows ACL write-restriction sandbox backend (restricted-token spawn with orphan-SID write allowlist) for the DeepSeek Harness sandbox seam
中文简介由 DeepSeek 模型翻译,仅供参考。
检测报告
有一定能力。命中了若干能力模式,大多是插件正常工作时会用到的。
2需留意3一般19未命中
高关注需留意一般
能力清单
- 启动伪终端
spawns-pty需留意2 处命中README.md:24const child = sandbox.spawn({ command: 'pwsh', args: ['-NoProfile', '-Command', '...'], cwd: workspaceRoot })README.zh.md:24const child = sandbox.spawn({ command: 'pwsh', args: ['-NoProfile', '-Command', '...'], cwd: workspaceRoot })- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- 写入文件
writes-files需留意1 处命中lib/types-Br60qOzH.js:581mkdirSync(dirname(lockPath), { recursive: true });- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 读取文件
reads-files一般8 处命中lib/runner.js:108if (!existsSync(path) || !statSync(path).isDirectory()) fail(`${label} is not an existing directory: ${path}`);lib/types-Br60qOzH.js:881if (api.readFile(handle, chunk, chunk.length, readSlot, null) === 0) throwLastError(api, "ReadFile", `drain failure afte…lib/types-Br60qOzH.js:1376if (!existsSync(absolute) || !statSync(absolute).isDirectory()) throw new Error(`AclSandbox writable dir does not exist …lib/types-Br60qOzH.js:1404if (!existsSync(tempDir) || !statSync(tempDir).isDirectory()) throw new Error(`AclSandbox temp dir does not exist or is …- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般4 处命中README.md:68- **The temp grant follows `GetTempPathW`** — pass `tempDir` explicitly whenever possible. `GetTempPathW` reads the NATI…README.zh.md:70- **临时授权跟随 `GetTempPathW`**——尽可能显式传 `tempDir`。`GetTempPathW` 读取**原生**环境块,而通过 worker 池管理 `process.env` 的宿主运行时可能没有与之保持同步(v…- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 动态加载模块
dynamic-import一般2 处命中lib/types/ffi.d.ts:85export declare const STARTUPINFOW: import("koffi").TypeObject;lib/types/ffi.d.ts:87export declare const PROCESS_INFORMATION: import("koffi").TypeObject;- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 启动伪终端 | spawns-pty | 需留意 | 2 |
| 写入文件 | writes-files | 需留意 | 1 |
| 读取文件 | reads-files | 一般 | 8 |
| 读取环境变量 | reads-env | 一般 | 4 |
| 动态加载模块 | dynamic-import | 一般 | 2 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 19 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)