D

dsh-plugin-compare

github.com/yminghua/dsh-plugin-compare

v0.1.0 其他 可执行外部程序以 shell 执行命令R010 向其他插件注入

Controlled A/B comparisons and evidence-backed reports for DeepSeek Harness plugins and presets.

该插件尚未翻译,显示作者原文。

deepseek-harnessdshdsh-pluginevaluationcomparisona-b-testingbenchmarkagent-replay
分类
other
发布
2026-09-08
版本
v0.1.0

检测报告

关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
3高关注2需留意4一般15未命中
高关注需留意一般

能力清单

  • 可执行外部程序spawns-processes高关注3 处命中
    • lib/index.js:2import { execFile } from "node:child_process";
    • example/prepare.mjs:2import { execFileSync } from 'node:child_process'
    • scripts/smoke-dsh.mjs:1import { spawn } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注2 处命中
    • example/prepare.mjs:17const git = (args) => execFileSync('git', ['-c', 'core.hooksPath=/dev/null', '-C', sourceDir, ...args], { encoding: 'utf…
    • example/prepare.mjs:25try { compareCommit = execFileSync('git', ['-C', join(exampleRoot, '..'), 'rev-parse', 'HEAD'], { encoding: 'utf8', stdi…
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • R010 向其他插件注入plugin-tree-injection高关注1 处命中
    • dsh-plugin-compare
    • 看 patch 里 insert 的包是不是本项目自己的。插入第三方代码要格外留意。
  • 写入文件writes-files需留意3 处命中
    • example/prepare.mjs:10await mkdir(outputRoot, { recursive: true })
    • example/prepare.mjs:23await mkdir(captureDir, { recursive: true })
    • example/prepare.mjs:30await writeFile(join(captureDir, 'run-notes.md'), notes, { flag: 'wx' })
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意3 处命中
    • scripts/smoke-dsh.mjs:59const response = await fetch(endpoint(url, `/dsh-plugin-compare/${method}`), {
    • scripts/smoke-dsh.mjs:140const launch = await fetch(url, { redirect: 'manual' })
    • scripts/smoke-dsh.mjs:152const response = await fetch(url, cookie ? { headers: { cookie } } : undefined)
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 接触凭据或密钥credentials一般40 处命中
    • lib/client.js:32const SECRET_PATTERNS = [
    • lib/client.js:35["credential_url", /\b(?:https?|postgres(?:ql)?|mysql|mongodb(?:\+srv)?|redis):\/\/[^\s/:@]+:[^\s/@]+@[^\s"'<>]+/gi],
    • lib/client.js:41["google_api_key", /\bAIza[A-Za-z0-9_-]{35}\b/g],
    • lib/client.js:44["api_key", /\b(?:sk|pk)_(?:live|test)_[A-Za-z0-9]{12,}\b/g],
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般3 处命中
    • lib/index.js:17const text = await file.readFile("utf8");
    • example/prepare.mjs:14for (const entry of await readdir(fixtureDir)) {
    • example/prepare.mjs:26const notes = (await readFile(join(exampleRoot, 'run-notes.template.md'), 'utf8'))
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般2 处命中
    • scripts/smoke-dsh.mjs:25env: { ...process.env, DSH_HOME: dshHome },
    • scripts/smoke-dsh.mjs:92env: { ...process.env, ...extraEnv },
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 动态加载模块dynamic-import一般1 处命中
    • scripts/smoke-dsh.mjs:38;({ serverResponseSchema } = await import(pathToFileURL(schemaPath).href))
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注3
以 shell 执行命令shell-exec高关注2
R010 向其他插件注入plugin-tree-injection高关注1
写入文件writes-files需留意3
发起网络请求network需留意3
接触凭据或密钥credentials一般40
读取文件reads-files一般3
读取环境变量reads-env一般2
动态加载模块dynamic-import一般1

这份报告的口径

扫描读的是包里的源码,全程不执行第三方代码。 本次读了 22 个文件,扫描于 2026-10-15。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。

依赖安全公告

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

等级依赖包编号摘要
中yamlCVE-2023-2251Uncaught Exception in yaml
修复版本:2.2.2 详情 →
低yamlCVE-2026-33532yaml is vulnerable to Stack Overflow via deeply nested YAML collections
修复版本:1.10.3, 2.8.3 详情 →

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

← 返回全部插件