dsh-custom-plugin
github.com/AlexPeng07/dsh-custom-plugin
DeepSeek Harness(DSH)Web GUI 的 Custom 便利套件:个性化外观、天气特效、玻璃效果、项目文件夹、增强提示词库、会话导出与会话搜索、Mermaid 渲染、引用回复、7/30/90 天用量分析、预算与无密钥本地备份,以及 Ctrl/Cmd+K 快捷面板。
作者原文(英文)
Custom convenience suite for the dsh web GUI: appearance, folders, prompts, session export/search, Mermaid, quote reply, usage analytics, local budget, key-free backups, and a Ctrl/Cmd+K command palette; dual-face plugin mounted without dsh source changes
中文简介由 DeepSeek 模型翻译,仅供参考。
检测报告
能力清单
- 写入文件
writes-files需留意6 处命中lib/index.js:473await rename(statePath, `${statePath}.corrupt-${process.pid}`);lib/index.js:504await mkdir(dirname(statePath), { recursive: true });lib/index.js:508await writeFile(tmpPath, doc, "utf8");lib/index.js:509await rename(tmpPath, statePath);- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意5 处命中lib/client.js:426const response = await fetch(`${CUSTOM_PLUGIN_API_PREFIX}${path}`, {lib/index.js:2050const response = await fetch(url, {lib/index.js:2077const response = await fetch(url, {README.md:14The plugin is dual-face: the host half (`src/`) owns the state document, registers the `/api/custom-plugin` routes and t…- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 含混淆或编码代码
obfuscated-code需留意1 处命中lib/types/client/styles.d.ts:7export declare const STATIC_CSS = "/* dsh-custom-plugin static styles. Every rule is global by design: the UI\n * mounts…- 混淆本身不是恶意,但公开源码里出现大段混淆值得问一句为什么。
- R013 清单可疑
manifest-obfuscation需留意1 处命中- 安装脚本: prepare
- 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
- 接触凭据或密钥
credentials一般215 处命中lib/client.js:1714apiKey: "",lib/client.js:1715apiKeyDirty: false,lib/client.js:1716apiKeyConfigured: false,lib/client.js:1717credentialStorage: "none",- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 读取文件
reads-files一般4 处命中lib/index.js:422text = await handle.readFile("utf8");lib/index.js:556const text = await readFile(statePath, "utf8").catch(() => null);lib/index.js:937const refs = parseCredentialsRefs(await readFile(join(home, CREDENTIALS_FILE), "utf8"));lib/index.js:1975const text = readFileSync(localPath, "utf8");- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 文中出现远程脚本地址
remote-url-reference一般3 处命中lib/index.js:1987"https://cdn.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js",lib/index.js:1988"https://fastly.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js",lib/index.js:1989"https://unpkg.com/mermaid@11.6.0/dist/mermaid.min.js"- 只是文本里出现了远程脚本地址,没有看到加载它的调用。多半是文档或注释;若确实可疑,搜一下这个地址在包里的其他出现位置。
- 读取环境变量
reads-env一般1 处命中lib/index.js:24function resolveDshHome(env = process.env, home = homedir()) {- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 动态加载模块
dynamic-import一般1 处命中CHANGELOG.md:56- **smoke 收紧**:未构建即跑 smoke 给出明确「先 pnpm build」报错而非裸 ENOENT 堆栈;新增 bundle `require()` 字面量 ⊆ `PLATFORM_MODULES` 交叉校验(防未声明外部化…- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 写入文件 | writes-files | 需留意 | 6 |
| 发起网络请求 | network | 需留意 | 5 |
| 含混淆或编码代码 | obfuscated-code | 需留意 | 1 |
| R013 清单可疑 | manifest-obfuscation | 需留意 | 1 |
| 接触凭据或密钥 | credentials | 一般 | 215 |
| 读取文件 | reads-files | 一般 | 4 |
| 文中出现远程脚本地址 | remote-url-reference | 一般 | 3 |
| 读取环境变量 | reads-env | 一般 | 1 |
| 动态加载模块 | dynamic-import | 一般 | 1 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 32 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 11 条已公开的安全公告 (最高等级:低):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 低 | mermaid | CVE-2026-41150 | Mermaid Gantt Charts are vulnerable to an Infinite Loop DoS 修复版本:10.9.6, 11.15.0 详情 → |
| 未分级 | mermaid | CVE-2026-71436 | Mermaid XY Charts are vulnerable to an infinite loop DoS 修复版本:10.9.8, 11.16.1 详情 → |
| 未分级 | mermaid | CVE-2026-71437 | Mermaid Architecture diagrams are vulnerable to prototype pollution 修复版本:11.16.1 详情 → |
| 未分级 | mermaid | CVE-2026-50159 | Mermaid allows CSS injection applying to sibling elements of the diagram 修复版本:10.9.8, 11.16.1 详情 → |
| 未分级 | mermaid | CVE-2025-54881 | Mermaid improperly sanitizes sequence diagram labels leading to XSS 修复版本:10.9.4, 11.10.0 详情 → |
| 未分级 | mermaid | CVE-2026-41159 | Mermaid: Improper sanitization of configuration leads to CSS injection 修复版本:10.9.6, 11.15.0 详情 → |
| 未分级 | mermaid | CVE-2025-54880 | Mermaid does not properly sanitize architecture diagram iconText leading to XSS 修复版本:11.10.0 详情 → |
| 未分级 | mermaid | CVE-2026-71438 | Mermaid configuration APIs allow prototype pollution 修复版本:10.9.8, 11.16.1 详情 → |
| 未分级 | mermaid | CVE-2026-41149 | Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection 修复版本:10.9.6, 11.15.0 详情 → |
| 未分级 | mermaid | CVE-2026-71439 | Mermaid radar diagrams are vulnerable to DoS 修复版本:11.16.1 详情 → |
| 未分级 | mermaid | CVE-2026-41148 | Mermaid: Improper sanitization of `classDefs` in diagrams leads to CSS injection 修复版本:10.9.6, 11.15.0 详情 → |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。