D

deepseek-harness-cli

@ai-thinker/deepseek-harness-cli

v0.4.13 开发与运行时 可执行外部程序以 shell 执行命令写入文件

一个面向 DeepSeek Harness (DSH) 的终端客户端,基于 OpenTUI 0.5.x + SolidJS 构建。

作者原文(英文)

DeepSeek Harness - OpenTUI terminal interface

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

分类
dev
发布
2026-10-09
版本
v0.4.13

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注13 处命中
    • dist/apply-update.js:2import { spawnSync as spawnSync2 } from "node:child_process";
    • dist/apply-update.js:94import { spawnSync } from "node:child_process";
    • dist/cli.js:2456import { execFile } from "node:child_process";
    • dist/dispatcher.js:2import { spawn, spawnSync as spawnSync4 } from "node:child_process";
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注8 处命中
    • dist/apply-update.js:104return process.platform === "win32" ? { ...options, shell: true, windowsHide: true } : options;
    • dist/apply-update.js:107return process.platform === "win32" ? { ...options, shell: true, windowsHide: true } : options;
    • dist/dispatcher.js:197return process.platform === "win32" ? { ...options, shell: true, windowsHide: true } : options;
    • dist/dispatcher.js:200return process.platform === "win32" ? { ...options, shell: true, windowsHide: true } : options;
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意30 处命中
    • dist/apply-update.js:217appendFileSync(logPath(), parts.map((p) => typeof p === "string" ? p : JSON.stringify(p)).join(" ") + `
    • dist/apply-update.js:255mkdirSync(dirname2(path), { recursive: true });
    • dist/apply-update.js:257writeFileSync(temp, `${JSON.stringify({ pending }, null, 2)}
    • dist/apply-update.js:259renameSync(temp, path);
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意13 处命中
    • dist/apply-update.js:229const res = await internals2.fetch(registryLatestUrl(pkgName), {
    • dist/cli.js:3223const res = await fetch(authUrl, {
    • dist/cli.js:3253const res2 = await fetch(url, {
    • dist/cli.js:3370res = await fetch(`${this.baseUrl.replace(/\/$/, "")}/api/session.export?${params}`, {
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 动态执行代码dynamic-code需留意2 处命中
    • dist/runner.js:325schema.callback = new Function("return " + schema.callback)();
    • …-test/scripts/wlan_ch1_ofdm54.py:56print('\n=== Multi-Eval (40 bursts) ===')
    • 看 eval / new Function 的入参来自哪里。常量字符串和用户输入是两回事。
  • 启动伪终端spawns-pty需留意1 处命中
    • …r-ai-m62-m61/references/shell.md:132int shell_exec(char *cmd, uint32_t length);
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 接触凭据或密钥credentials一般206 处命中
    • dist/cli.js:2812// src/components/api-key-modal.tsx
    • dist/cli.js:2813function ApiKeyModal(props) {
    • dist/cli.js:2884insertNode(_el$5, createTextNode(`未检测到 DEEPSEEK_API_KEY,请输入你的 DeepSeek API Key 以继续。`));
    • dist/cli.js:3492credentialsDescribe(refs) {
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取环境变量reads-env一般86 处命中
    • dist/apply-update.js:149if (process.env.OPENTUI_LIBC === "musl")
    • dist/apply-update.js:203resolved = process.env.DSH_DEBUG_LOG || join3(tmpdir(), `dsh-cli-debug-${process.pid}.log`);
    • dist/apply-update.js:207const v = process.env.DSH_DEBUG;
    • dist/apply-update.js:240function updateMarkerPath(env = process.env) {
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 读取文件reads-files一般38 处命中
    • dist/apply-update.js:112if (existsSync(join(dir, "package.json")))
    • dist/apply-update.js:123if (existsSync(candidate))
    • dist/apply-update.js:152return existsSync("/etc/alpine-release");
    • dist/apply-update.js:177return JSON.parse(readFileSync(manifest, "utf8")).version;
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 文中出现远程脚本地址remote-url-reference一般10 处命中
    • dist/dispatcher.js:111return `bun ${version} is incompatible with the OpenTUI terminal client on Windows (bun 1.4+ ` + "segfaults the renderer…
    • dist/dispatcher.js:1430` + ` npm i -g bun (or follow https://bun.sh/install)
    • dist/runner.js:1046return `bun ${version} is incompatible with the OpenTUI terminal client on Windows (bun 1.4+ ` + "segfaults the renderer…
    • dist/runner.js:1623` + "This package normally ships bun as the `@oven/bun-*` optional dependency; a reinstall that " + "keeps optional deps…
    • 只是文本里出现了远程脚本地址,没有看到加载它的调用。多半是文档或注释;若确实可疑,搜一下这个地址在包里的其他出现位置。
  • 动态加载模块dynamic-import一般1 处命中
    • …ai-thinker-src/scripts/build.mjs:92const { rm } = await import('fs/promises');
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注13
以 shell 执行命令shell-exec高关注8
写入文件writes-files需留意30
发起网络请求network需留意13
动态执行代码dynamic-code需留意2
启动伪终端spawns-pty需留意1
接触凭据或密钥credentials一般206
读取环境变量reads-env一般86
读取文件reads-files一般38
文中出现远程脚本地址remote-url-reference一般10
动态加载模块dynamic-import一般1

这份报告的口径

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

依赖安全公告

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

等级依赖包编号摘要
中wsCVE-2026-45736ws: Uninitialized memory disclosure
修复版本:8.20.1 详情 →
中wsCVE-2026-48779ws: Memory exhaustion DoS from tiny fragments and data chunks
修复版本:5.2.5, 6.2.4, 7.5.11 详情 →

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

← 返回全部插件