dsh-qqbot
github.com/zaofan-make/dsh-qqbot
v1.9.3
模型与账号
可执行外部程序以提权方式执行写入文件
基于 deepseek-harness (dsh) 的 QQ Bot IM 插件**增强 fork**:将 QQ 消息平台作为 dsh agent 的前端协议驱动,并加入表情包图库、富媒体收发、定时任务、多实例人格、好感度系统、可视化设置面板等能力。
作者原文(英文)
QQ Bot IM channel plugin for deepseek-harness (dsh)
中文简介由 DeepSeek 模型翻译,仅供参考。
deepseek-harnessdshdsh-pluginqqbotqq-botchatbotai-agentcordis
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注5需留意4一般13未命中
高关注需留意一般
能力清单
- 可执行外部程序
spawns-processes高关注5 处命中dist/commands/exit.js:10import { spawn } from 'node:child_process';dist/commands/exit.js:27"const { spawn } = require('child_process');",dist/features/qun-login.js:19import { spawn, spawnSync } from 'node:child_process';settings-host.js:9import { spawn } from 'node:child_process';- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 以提权方式执行
privilege-escalation高关注2 处命中client/qqbot-settings.js:756if (list.length && !gid) setGid(list[0].gid)client/qqbot-settings.js:832: h('select', { className: 'qqs-inp', style: { padding: '3px 8px', maxWidth: 320, border: '1px solid ' + T.border, borde…- 确认提权是插件功能本身需要,还是仅仅在探测环境。多数插件不需要 root。
- 写入文件
writes-files需留意188 处命中dist/transport/attachment.js:69writeFileSync(destPath, buf);dist/transport/attachment.js:102mkdirSync(dir, { recursive: true });dist/features/attitude.js:228mkdirSync(join(dataRoot, '.qqbot'), { recursive: true });dist/features/attitude.js:229writeFileSync(p, JSON.stringify(data, null, 1), 'utf8');- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 发起网络请求
network需留意97 处命中dist/transport/attachment.js:62const resp = await fetch(url, { signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS) });dist/features/ext-capabilities.js:56const res = await fetch('https://bots.qq.com/app/getAppAccessToken', {dist/features/ext-capabilities.js:181const res = await fetch(`https://api.bot.qq.com${p.startsWith('/') ? p : `/${p}`}`, {dist/api/group-admin.js:119const res = await fetch(TOKEN_URL, {- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- 启动伪终端
spawns-pty需留意2 处命中dist/features/qun-login.js:306spawnSync('powershell', ['-NoProfile', '-Command', cmd], { stdio: 'ignore', windowsHide: true, timeout: 20000 });- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- R011 客户端可疑脚本
client-side-risk需留意2 处命中- qqbot-settings.js: postMessage 无 origin 校验; qqbot-settings.js: innerHTML + postMessage
- 浏览器侧代码能改你看到的界面。确认改动范围符合插件用途。
- 可终止进程
kills-processes需留意1 处命中dist/commands/exit.js:33' try { process.kill(pid, \'SIGTERM\'); } catch {}',- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 接触凭据或密钥
credentials一般305 处命中dist/gateway/bootstrap.js:131appSecret: config.appSecret,dist/gateway/bootstrap.js:566// 卡片(= .mjs 代码)需要"钥匙"而不是"被包好的能力": 直接把 appId/appSecret 给它,dist/gateway/bootstrap.js:567// 它就能自己换 access_token 调任意官方 API(查成员/发消息/上传媒体/禁言…)。dist/gateway/bootstrap.js:568botplayController.setCredentialsGetter(() => ({- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 读取文件
reads-files一般256 处命中dist/features/attitude.js:205mtime = statSync(attPath(dataRoot)).mtimeMs;dist/features/attitude.js:215if (existsSync(attPath(dataRoot))) {dist/features/attitude.js:216const raw = JSON.parse(readFileSync(attPath(dataRoot), 'utf8'));dist/features/botplay-ext.js:137const raw = readFileSync(stateFile, 'utf8');- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 动态加载模块
dynamic-import一般58 处命中dist/gateway/bootstrap.js:468const ct = await import('../channel-tools.js');dist/gateway/bootstrap.js:482const es = await import('../features/extension-store.js');dist/gateway/bootstrap.js:501const hooks = await import('../features/ext-hooks.js');dist/gateway/bootstrap.js:834const hooks = await import('../features/ext-hooks.js');- 动态导入本身无害,但会让依赖关系难以静态审阅。
- 读取环境变量
reads-env一般44 处命中dist/gateway/bootstrap.js:133baseUrl: process.env.QQBOT_BASE_URL?.replace(/\/+$/, '') || 'https://api.bot.qq.com',dist/gateway/bootstrap.js:134tokenBaseUrl: process.env.QQBOT_TOKEN_BASE_URL?.replace(/\/+$/, '') || 'https://api.bot.qq.com',dist/gateway/bootstrap.js:138logger: process.env.QQBOT_DEBUG_CONSOLE ? console : logger,dist/channel-tools.js:35const DIAG_FILE = process.env.QQBOT_DIAG_FILE || '';- 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 可执行外部程序 | spawns-processes | 高关注 | 5 |
| 以提权方式执行 | privilege-escalation | 高关注 | 2 |
| 写入文件 | writes-files | 需留意 | 188 |
| 发起网络请求 | network | 需留意 | 97 |
| 启动伪终端 | spawns-pty | 需留意 | 2 |
| R011 客户端可疑脚本 | client-side-risk | 需留意 | 2 |
| 可终止进程 | kills-processes | 需留意 | 1 |
| 接触凭据或密钥 | credentials | 一般 | 305 |
| 读取文件 | reads-files | 一般 | 256 |
| 动态加载模块 | dynamic-import | 一般 | 58 |
| 读取环境变量 | reads-env | 一般 | 44 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 264 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 6 条已公开的安全公告 (最高等级:中):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 中 | 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 详情 → |
| 低 | 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。