dsh-plugin-multi-root-workspace
github.com/cherrchen/dsh-plugin-multi-root-workspace
v0.1.6
开发与运行时
写入文件动态执行代码
DSH(DeepSeek Harness)的外部插件 bundle:把 Workspace 的可写范围从"一个 canonical 目录"扩展为"**一个主根 + N 个附加根**",且**不修改上游仓库任何包**。
作者原文(英文)
Multi-root Workspace for DeepSeek Harness: adds N additional roots to the workspace sandbox scope as an out-of-tree bundle
中文简介由 DeepSeek 模型翻译,仅供参考。
检测报告
有一定能力。命中了若干能力模式,大多是插件正常工作时会用到的。
2需留意4一般18未命中
高关注需留意一般
能力清单
- 写入文件
writes-files需留意2 处命中lib/registry-DySMbjgW.js:74mkdirSync(dirname(leasePath), {lib/windows-runner.js:49rmSync(temp, {- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 动态执行代码
dynamic-code需留意1 处命中lib/client.js:229new Function("");- 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
- 动态加载模块
dynamic-import一般10 处命中lib/compat-B6ZqbQBy.js:104const manifest = require(`${packageName}/package.json`);lib/instructions-DfzN-wVf.js:83* condition, say) leaves the verdict to the `import()` below, which is thelib/instructions-DfzN-wVf.js:111return adaptInstructionsModule(await import("@deepseek-ai/dsh-agent-instructions"));lib/instructions-DfzN-wVf.js:164const session = await import("@deepseek-ai/dsh-session");- 动态导入本身无害,但会让依赖关系难以静态审阅。
- 读取文件
reads-files一般5 处命中lib/registry-DySMbjgW.js:104current = statSync(leasePath, { bigint: true });lib/roots-DasWEBJk.js:151stats = statSync(canonical);lib/roots-DasWEBJk.js:227isDirectory = statSync(canonical).isDirectory();lib/scope.js:49if (!statSync(canonical).isDirectory()) continue;- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般4 处命中lib/compat-B6ZqbQBy.js:175function compatEnforcement(env = process.env) {lib/windows-runner.js:30process.env.TMP = temp;lib/windows-runner.js:31process.env.TEMP = temp;lib/windows-runner.js:33const control = process.env.DSH_SUBPROCESS_CONTROL === "pipe";- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 接触凭据或密钥
credentials一般3 处命中CHANGELOG.en.md:83- Installation and release: the `prepare` script is now self-contained (git installs build on the spot through pnpm, aft…CHANGELOG.en.md:109- **A cross-repository journey e2e** (`pnpm smoke:journey`): it drives a real agent turn in both the `web` and `headless…README.en.md:54- Running the smoke tests needs **no model credentials**: the e2e model turns are served by an inline scripted model end…- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 写入文件 | writes-files | 需留意 | 2 |
| 动态执行代码 | dynamic-code | 需留意 | 1 |
| 动态加载模块 | dynamic-import | 一般 | 10 |
| 读取文件 | reads-files | 一般 | 5 |
| 读取环境变量 | reads-env | 一般 | 4 |
| 接触凭据或密钥 | credentials | 一般 | 3 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 68 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。