dsh-plugin-install
github.com/qinyre/dsh-plugin-install
v0.4.5
市场与管理
可执行外部程序以 shell 执行命令写入文件
Install any dsh plugin by npm spec — right inside Settings. · 在设置页里按包名安装任意 dsh 插件(不经过插件市场)。
该插件尚未翻译,显示作者原文。
deepseekharnessdshdsh-pluginplugin-managerinstall
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注6需留意3一般13未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注9 处命中lib/index.js:7417import { spawn } from "node:child_process";lib/index.js:8367import { spawn as spawn2 } from "node:child_process";lib/index.js:8386const { spawn } = require('node:child_process')src/cli.ts:8import { spawn } from 'node:child_process'- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 以 shell 执行命令
shell-exec高关注1 处命中src/cli.test.ts:79expect(result).toMatchObject({ file: 'dsh', viaShell: true })- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 写入文件
writes-files需留意90 处命中lib/index.js:7894writeFileSync(file, content, "utf8");lib/index.js:7985if (/^hot-\d+\.yml$/.test(name2)) rmSync(join4(dir, name2), { force: true });lib/index.js:7994mkdirSync(dir, { recursive: true });lib/index.js:8388const trace = (m) => { if (dbg) { try { require('node:fs').appendFileSync(dbg, Date.now() + ' ' + m + '\\n') } catch {} …- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意21 处命中lib/client.js:70const response = await fetch(`/dsh-plugin-install/updates${force ? "?force=1" : ""}`);lib/client.js:81const response = await fetch("/dsh-plugin-install/update", {lib/client.js:108const readBoot = () => fetch("/dsh-plugin-install/status").then((response) => response.json()).then((status) => status.b…lib/client.js:112const response = await fetch("/dsh-plugin-install/restart", { method: "POST" });- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 运行时改写自身配置
modifies-own-manifest需留意21 处命中src/hot.test.ts:56writeFileSync(join(pkgDir, 'cordis.patch.yml'), patchText)src/hot.test.ts:215writeFileSync(join(groupDir, 'cordis.patch.yml'), `- insert:\n - group: g\n id: fixture-g\n`)src/mounts.test.ts:36writeFileSync(join(dir, 'package.json'), JSON.stringify({src/mounts.test.ts:42writeFileSync(join(dir, 'cordis.patch.yml'), patch, 'utf8')- 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
- 可终止进程
kills-processes需留意6 处命中lib/index.js:7483process.kill(-child.pid, signal);lib/index.js:8467try { process.kill(parent, 0) } catch (error) { alive = error.code !== 'ESRCH' }lib/index.js:8501try { process.kill(parent, 0) } catch (error) { alive = error.code !== 'ESRCH' }src/cli.ts:106try { process.kill(-child.pid, signal) } catch {- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 启动伪终端
spawns-pty需留意2 处命中lib/index.js:8433const h = spawn('conhost.exe', ['--headless', 'powershell.exe', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', ps1…src/restart.ts:126const h = spawn('conhost.exe', ['--headless', 'powershell.exe', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', ps1…- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- R013 清单可疑
manifest-obfuscation需留意1 处命中- 安装脚本: prepare
- 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
- 读取环境变量
reads-env一般75 处命中lib/index.js:5223if (node_process.env.LOG_STREAM)lib/index.js:6474if (node_process.env.LOG_TOKENS)lib/index.js:7427return process.env.DSH_DESKTOP === "1";lib/index.js:7504var INSTALL_TIMEOUT_MS = Number(process.env.DSH_INSTALL_TIMEOUT_MS) || 15 * 60 * 1e3;- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 读取文件
reads-files一般73 处命中lib/index.js:7607const parsed = JSON.parse(readFileSync(manifest, "utf8"));lib/index.js:7622const parsed = JSON.parse(readFileSync(manifest, "utf8"));lib/index.js:7638readFileSync(join2(profileDirPath, "node_modules", name2, "package.json"), "utf8")lib/index.js:7664readFileSync(join2(profileDirPath, "node_modules", name2, "package.json"), "utf8")- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 动态加载模块
dynamic-import一般7 处命中lib/index.js:7938const mod = await import(specifier);src/hot.ts:39const mod = (await import(specifier)) as {src/hot.ts:40Include?: new (...args: never[]) => { write(): void; import(name: string, getOuterStack?: () => string[]): unknown }src/hot.ts:115const TreeClass = await loadHotTreeClass() as (new (files: string[], options: unknown) => { import(name: string): unknow…- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 9 |
| 以 shell 执行命令 | shell-exec | 高关注 | 1 |
| 写入文件 | writes-files | 需留意 | 90 |
| 发起网络请求 | network | 需留意 | 21 |
| 运行时改写自身配置 | modifies-own-manifest | 需留意 | 21 |
| 可终止进程 | kills-processes | 需留意 | 6 |
| 启动伪终端 | spawns-pty | 需留意 | 2 |
| R013 清单可疑 | manifest-obfuscation | 需留意 | 1 |
| 读取环境变量 | reads-env | 一般 | 75 |
| 读取文件 | reads-files | 一般 | 73 |
| 动态加载模块 | dynamic-import | 一般 | 7 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 37 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 2 条已公开的安全公告 (最高等级:中):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 中 | yaml | CVE-2023-2251 | Uncaught Exception in yaml 修复版本:2.2.2 详情 → |
| 低 | yaml | CVE-2026-33532 | yaml is vulnerable to Stack Overflow via deeply nested YAML collections 修复版本:1.10.3, 2.8.3 详情 → |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。