D

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 模型翻译,仅供参考。

分类
dev
发布
2026-10-11
版本
v0.1.6

检测报告

有一定能力。命中了若干能力模式,大多是插件正常工作时会用到的。
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 the
    • lib/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 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

依赖安全公告

这个插件声明的依赖中,有 1 条已公开的安全公告 (最高等级:低):

等级依赖包编号摘要
低zodCVE-2023-4316Zod denial of service vulnerability
修复版本:3.22.3 详情 →

查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0), 不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响—— 所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自 OSV.dev。

← 返回全部插件