dsh-plugin-mall
github.com/1e0zj/dsh-plugin-mall
v0.4.17
市场与管理
以 shell 执行命令可执行外部程序R012 改写用户 profile
dsh 插件市场:搜索 GitHub dsh-plugin 话题下的插件仓库,一键安装到本地 dsh profile(agent 工具 + 设置页插件市场 tab)
该插件尚未翻译,显示作者原文。
dshdsh-plugindeepseek-harnessplugin-marketplacemarketplace
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
3高关注6需留意4一般11未命中
高关注需留意一般
能力清单
- 以 shell 执行命令
shell-exec高关注6 处命中src/cli.js:340* closed, with no shell:true or unguarded fallback — when no verified entrysrc/guard.js:1748if (cmd === undefined) return { command: "pnpm", shell: true, treeKill: true };src/guard.js:1750// is Node's default install layout). Under shell:true Node joins command andsrc/guard.js:1757return { command: `"${cmd}"`, shell: true, treeKill: true };- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 可执行外部程序
spawns-processes高关注4 处命中src/cli.js:27import { spawn } from "node:child_process";src/guard.js:9import { spawn, spawnSync } from "node:child_process";src/index.js:21import { spawn } from "node:child_process";src/installer.js:9import { spawn, spawnSync } from "node:child_process";- 看它调用哪些程序。调用本机已有的工具是常见做法。
- R012 改写用户 profile
profile-tamper高关注4 处命中- cli.js, guard.js
- 看它改的是自己那一段还是别人的。改用户 profile 通常应由用户手动做。
- 写入文件
writes-files需留意575 处命中src/cli.js:572rmSync(snapshot.dir, { recursive: true, force: true });src/cli.js:789mkdirSync(dirname(logPath), { recursive: true });src/cli.js:1209try { unlinkSync(planFile); } catch { /* nonce-named residue is inert */ }src/cli.js:1316try { unlinkSync(`${plan.readyFile}.cancel`); } catch { /* best effort */ }- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 运行时改写自身配置
modifies-own-manifest需留意277 处命中src/cli.js:1730writeFileSync(join(p, "package.json"), JSON.stringify({ dependencies: {} }));src/cli.js:1731writeFileSync(join(p, "cordis.patch.yml"), "[]\n");src/cli.js:1781writeFileSync(join(p, "package.json"), JSON.stringify({ dependencies: {} }));src/cli.js:1782writeFileSync(join(p, "cordis.patch.yml"), "[]\n");- 运行时改写自身配置会让下次启动的行为和你看过的源码不一致。
- 启动伪终端
spawns-pty需留意84 处命中src/cli.js:929const killer = spawn(process.env.ComSpec ?? "cmd.exe", ["/d", "/s", "/c", `taskkill /PID ${pid} /T /F >nul 2>&1`], { she…src/github.js:685dependencies: { schemastery: "^3.18.0", ws: "^8.18.0", clsx: "^2.1.1", "node-pty": "^1.1.0" },src/index.js:1195child = _spawn(process.env.ComSpec ?? "cmd.exe", ["/d", "/s", "/c", `"${line}"`], {src/index.js:4016const child = spawn(process.env.ComSpec ?? "cmd.exe", ["/d", "/s", "/c", '"echo "dsh verbatim check""'], {- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- 发起网络请求
network需留意7 处命中src/github.js:49response = await fetch(url, {src/github.js:216const response = await fetch(`${base}/${clean.replace("/", "%2F")}/latest`, {src/github.js:263const response = await fetch(`${base}/${clean.replace("/", "%2F")}`, {src/github.js:387const response = await fetch(`${base}/${name.replace("/", "%2F")}/${point}`, {- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 可终止进程
kills-processes需留意5 处命中src/cli.js:687process.kill(target, 0);src/cli.js:926try { process.kill(pid, "SIGKILL"); } catch { /* already gone */ }src/cli.js:931try { process.kill(pid); } catch { /* already gone */ }src/restart-protocol.js:246process.kill(pid, 0);- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 动态执行代码
dynamic-code需留意2 处命中src/index.js:3276const front = new Function("window", snippet)(undefined);src/index.js:3326const front = new Function([- 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
- 读取文件
reads-files一般271 处命中src/cli.js:245if (existsSync(full)) return full;src/cli.js:277if (!existsSync(manifestPath)) return undefined;src/cli.js:280manifest = JSON.parse(readFileSync(manifestPath, "utf8"));src/cli.js:292if (!existsSync(entry)) return undefined;- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 读取环境变量
reads-env一般82 处命中src/cli.js:198* merged object such as pnpmGuardEnv()); it defaults to process.env.src/cli.js:211env: env === undefined ? process.env : env,src/cli.js:389for (const [key, value] of Object.entries(process.env)) {src/cli.js:626for (const [key, value] of Object.entries(process.env)) {- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 接触凭据或密钥
credentials一般10 处命中src/cli.js:2584const badSpecs = ["pkg&whoami", "pkg|calc", "pkg$(x)", "pkg`x`", "pkg>x", "pkg;x", "%DSH_SECRET%"];src/github.js:741for (const bad of ["../secret", "a/../../b", "dir\\win.yml", "c:/abs.yml", ""]) {src/guard.js:56const SECURITY_ROW_RE = /sandbox|approval|permission|policy|credential|landlock/i;src/guard.js:1905// hold credentials, so it is copied (never logged) and removed by the- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 动态加载模块
dynamic-import一般4 处命中src/guard.js:1036* Rows the loader would try to mount without a module specifier. `import(undefined)`src/guard.js:3095({ applyEntryPatches } = await import("@deepseek-ai/cordis-plugin-include"));src/guard.js:3098throw new Error(`differential vs applyEntryPatches cannot run: @deepseek-ai/cordis-plugin-include failed to import (${er…src/installer.js:3011const { symlinkSync } = await import("node:fs");- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 以 shell 执行命令 | shell-exec | 高关注 | 6 |
| 可执行外部程序 | spawns-processes | 高关注 | 4 |
| R012 改写用户 profile | profile-tamper | 高关注 | 4 |
| 写入文件 | writes-files | 需留意 | 575 |
| 运行时改写自身配置 | modifies-own-manifest | 需留意 | 277 |
| 启动伪终端 | spawns-pty | 需留意 | 84 |
| 发起网络请求 | network | 需留意 | 7 |
| 可终止进程 | kills-processes | 需留意 | 5 |
| 动态执行代码 | dynamic-code | 需留意 | 2 |
| 读取文件 | reads-files | 一般 | 271 |
| 读取环境变量 | reads-env | 一般 | 82 |
| 接触凭据或密钥 | credentials | 一般 | 10 |
| 动态加载模块 | dynamic-import | 一般 | 4 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 11 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 7 条已公开的安全公告 (最高等级:中):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 中 | js-yaml | CVE-2026-84375 | js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources 修复版本:3.15.2, 4.3.2 详情 → |
| 中 | js-yaml | CVE-2026-59869 | js-yaml: YAML merge-key chains can force quadratic CPU consumption 修复版本:3.15.0, 4.3.0 详情 → |
| 中 | js-yaml | GHSA-5p4m-2wfm-xmqj | JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported 修复版本:3.15.1, 4.3.1 详情 → |
| 中 | semver | CVE-2022-25883 | semver vulnerable to Regular Expression Denial of Service 修复版本:5.7.2, 6.3.1, 7.5.2 详情 → |
| 低 | js-yaml | CVE-2026-53550 | JS-YAML: Quadratic-complexity DoS in merge key handling via repeated aliases 修复版本:3.15.0, 4.2.0 详情 → |
| 低 | js-yaml | CVE-2025-64718 | js-yaml has prototype pollution in merge (<<) 修复版本:3.14.2, 4.1.1 详情 → |
| 低 | js-yaml | GHSA-r3ph-w7gj-g6xm | js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources 修复版本:5.4.1 详情 → |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。