D

dsh-plugin-vet

github.com/wulun811/dsh-plugin-vet

v0.3.18 模型与账号 可执行外部程序访问原生绑定以提权方式执行

🔗 dsh.so 插件提交与安全报告页的扫描由 vet 主导 — 查看

作者原文(英文)

Audit deepseek-harness (DSH) plugins before install, guard them at runtime. Static verdict + pre-install audit protocol; supply-chain checks (typosquat, OSV); exfiltration & ransomware detection, honeypot canaries, integrity baseline. Alarm-only; blocks c

中文简介由 DeepSeek 模型翻译,仅供参考。

deepseek-harnessdshpluginsecuritytrustauditguardvet
分类
model
发布
2026-09-30
版本
v0.3.18

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注18 处命中
    • lib/scanner-bin/capability.js:123* `util.promisify(cp.exec)` / `promisify(exec)`(包装)、`const a = { b: { cp: require('child_process') } }`
    • lib/scanner-bin/capability.js:274// util.promisify(require('child_process').exec) / promisify(cp.exec) / promisify(exec)
    • lib/scanner-bin/capability.js:289// const a = { b: { cp: require('child_process') } } —— a.b.cp.spawn 的根判定
    • lib/scanner/client.js:1import { spawn, spawnSync } from 'node:child_process';
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 访问原生绑定native-access高关注4 处命中
    • …r-bin/rules/constructor-chain.js:22* 3) NewExpression:new (globalThis.constructor.constructor)('return process')()
    • …r-bin/rules/constructor-chain.js:24* 新表达式 callee 支持属性访问链(globalThis.constructor.constructor)、
    • …r-bin/rules/constructor-chain.js:70* - x.constructor / x['constructor'] / globalThis.constructor.constructor(链尾是 constructor)
    • …r-bin/rules/constructor-chain.js:93// globalThis.constructor.constructor:链上有 constructor 即视为构造器链
    • 访问原生绑定或走 constructor 链,等于绕开 JS 层的一切限制。确认这是插件的核心机制,而不是顺手拿到的便利。
  • 以提权方式执行privilege-escalation高关注4 处命中
    • lib/guard/confirm-block.js:90if (n.includes('/etc/ld.so.preload') || n.includes('/etc/sudoers.d/') || n === '/etc/sudoers')
    • lib/index.bundle.js:1050if (n.includes("/etc/ld.so.preload") || n.includes("/etc/sudoers.d/") || n === "/etc/sudoers") return true;
    • 确认提权是插件功能本身需要,还是仅仅在探测环境。多数插件不需要 root。
  • 以 shell 执行命令shell-exec高关注3 处命中
    • lib/index.bundle.js:4659return execFileSync("ps", ["-w", "-w", "-o", "args=", "-p", String(pid)], {
    • lib/guard/runtime-sidecar.js:77return execFileSync('ps', ['-w', '-w', '-o', 'args=', '-p', String(pid)], {
    • lib/guard/runtime-watch.js:67return execFileSync(cmd, args, { encoding: 'utf8', timeout: timeoutMs, maxBuffer: 8 * 1024 * 1024 });
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意48 处命中
    • lib/scanner-bin/cache.js:140mkdirSync(cacheRoot, { recursive: true, mode: 0o700 });
    • lib/scanner-bin/cache.js:142writeFileSync(join(cacheRoot, cacheEntryFile(key)), JSON.stringify({ report, ts: Date.now(), nonce: nonce ?? '' }), { mo…
    • lib/guards/content-baseline.js:234mkdirSync(dir, { recursive: true, mode: 0o700 });
    • lib/guards/content-baseline.js:245renameSync(tmpPath, path);
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意14 处命中
    • lib/client.js:1946const res = await fetch("/vet/plugin?name=" + encodeURIComponent(name), { cache: "no-store" });
    • lib/client.js:2215const res = await fetch("/vet/status.json", { cache: "no-store" });
    • lib/client.js:2297const res = await fetch("/vet/runtime-guard", {
    • lib/client.js:2322const res = await fetch("/vet/profile", {
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 可终止进程kills-processes需留意7 处命中
    • lib/index.bundle.js:4642process.kill(pid, 0);
    • lib/index.bundle.js:4674process.kill(pid, signal);
    • lib/guard/runtime-sidecar.js:52process.kill(pid, 0);
    • lib/guard/runtime-sidecar.js:99process.kill(pid, signal);
    • 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
  • 动态执行代码dynamic-code需留意5 处命中
    • lib/scanner-bin/capability.js:25/** 经典 realm 探测 shim:Function("return this") / new Function("return this")——无动态执行语义。 */
    • lib/client.js:153"rule.R2.desc": "eval、Function/new Function、vm.runInContext 逃逸、动态 import/require 等执行点;库内 JIT 与能力探测需人工复核上下文。",
    • lib/client.js:476"rule.R2.desc": "Dynamic execution points: eval, Function/new Function, vm.runInContext, dynamic import/require; library…
    • …scanner-bin/rules/config-scan.js:37{ re: /\beval\s*\(/, label: 'eval(' },
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • 启动伪终端spawns-pty需留意2 处命中
    • CHANGELOG.md:1076array-form args (`spawn('sh', ['-c', …])`) are expanded element-wise; N2-decoded args (base64/hex/
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 含混淆或编码代码obfuscated-code需留意1 处命中
    • lib/index.bundle.js:8243var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF…
    • 混淆本身不是恶意,但公开源码里出现大段混淆值得问一句为什么。
  • 接触凭据或密钥credentials一般221 处命中
    • lib/scanner-bin/capability.js:37"credentials", "credential", "secrets", "secret", "tokens", "token",
    • lib/scanner-bin/capability.js:39".git-credentials", ".kube", "vault", "crontab",
    • lib/client.js:485"rule.R7.name": "Hardcoded secrets",
    • lib/client.js:486"rule.R7.desc": "Possible hardcoded keys/tokens/credentials in source — verify nothing was committed by accident.",
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般84 处命中
    • lib/audit/archive.js:56if (!existsSync(dir))
    • lib/audit/archive.js:59return readdirSync(dir).some(name => matchesArchiveFile(name, esc, version));
    • lib/audit/archive.js:120if (!existsSync(dir) || entries.length === 0)
    • lib/audit/archive.js:124files = readdirSync(dir);
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般45 处命中
    • lib/audit/archive.js:15let ARCHIVE_DIR = process.env.DSH_PLUGIN_VET_ARCHIVE_DIR ?? join(vetStoreRoot(), 'audits');
    • lib/scanner-bin/cache.js:8* env(vet 先于第三方插件加载),进程内插件改动 process.env 无法重定向缓存;无注入时回退
    • lib/scanner-bin/cache.js:14const env = process.env.DSH_PLUGIN_VET_CACHE_DIR;
    • lib/scanner/client.js:6* vet 模块加载早于第三方插件(M2 同款快照语义),插件此后改动 process.env 无法重定向缓存;
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 动态加载模块dynamic-import一般12 处命中
    • lib/scanner-bin/capability.js:192// round-22(整扫描崩溃修复):require() 无实参是合法语法(运行期才抛错)——
    • …scanner-bin/rules/config-scan.js:36{ re: /\brequire\s*\(\s*['"](?:child_process|vm|worker_threads|cluster|fs|net|tls|dgram|http|https)/, label: 'require(危险…
    • …canner-bin/rules/dynamic-exec.js:18* dynamic import() / require. Severity splits by scenario: require is a real
    • …canner-bin/rules/dynamic-exec.js:25// bin 脚本永远独立运行,spawnSync/require(child_process) 是标准 CLI 写法):
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注18
访问原生绑定native-access高关注4
以提权方式执行privilege-escalation高关注4
以 shell 执行命令shell-exec高关注3
写入文件writes-files需留意48
发起网络请求network需留意14
可终止进程kills-processes需留意7
动态执行代码dynamic-code需留意5
启动伪终端spawns-pty需留意2
含混淆或编码代码obfuscated-code需留意1
接触凭据或密钥credentials一般221
读取文件reads-files一般84
读取环境变量reads-env一般45
动态加载模块dynamic-import一般12

这份报告的口径

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

依赖安全公告

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

等级依赖包编号摘要
中js-yamlCVE-2026-84375js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
修复版本:3.15.2, 4.3.2 详情 →
中js-yamlCVE-2026-59869js-yaml: YAML merge-key chains can force quadratic CPU consumption
修复版本:3.15.0, 4.3.0 详情 →
中js-yamlGHSA-5p4m-2wfm-xmqjJS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported
修复版本:3.15.1, 4.3.1 详情 →
低js-yamlCVE-2026-53550JS-YAML: Quadratic-complexity DoS in merge key handling via repeated aliases
修复版本:3.15.0, 4.2.0 详情 →
低js-yamlCVE-2025-64718js-yaml has prototype pollution in merge (<<)
修复版本:3.14.2, 4.1.1 详情 →
低js-yamlGHSA-r3ph-w7gj-g6xmjs-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources
修复版本:5.4.1 详情 →

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

← 返回全部插件