D

dsh-tui

github.com/ccch1mneyyy/dsh-TUI

v0.14.0 会话与记忆 可执行外部程序以 shell 执行命令写入文件

dst sh dsh-tui migrate # 列出各代理可迁移的对话数量(不写入) dsh-tui migrate claude-code # 导入 Claude Code 的全部对话(codex / omp / zcode / grok-build 同理) dsh-tui migrate codex --dry-run # 只预览将落盘的内容,不写入 sh

作者原文(英文)

Interactive terminal interface for DeepSeek Harness agents, sessions and tools.

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

dshdsh-tuideepseekdeepseek-harnesscordistuiterminalcli
分类
session
发布
2026-10-07
版本
v0.14.0

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注12 处命中
    • …pes/backends/codex/rpc/binary.js:16import { execFile } from 'node:child_process';
    • …types/dsh-adapter/childStderr.js:28import childProcess from 'node:child_process';
    • lib/types/utils/clipboard.js:40import { execFile, spawn } from 'node:child_process';
    • bin/dsh-tui.js:30import { spawn, spawnSync } from 'node:child_process'
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注10 处命中
    • bin/dsh-tui.js:108const shellOpt = isWin ? { shell: true } : {}
    • bin/dsh-tui.js:109// DEP0190(issue #148):shell:true + 非空参数数组触发语法级弃用告警——
    • bin/dsh-tui.js:742// 或 safe 菜单)。Windows 经 cmd()/shell:true 启动(见 cmd 注释),壳层
    • lib/types/update.js:526execFileSync('tar', ['--version'], { stdio: 'ignore' });
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意159 处命中
    • …-adapter/channel/core/actions.js:124void rename.rename(title).catch((error) => {
    • lib/types/activityPrefs.js:119mkdirSync(dir, { recursive: true });
    • lib/types/activityPrefs.js:120writeFileSync(join(dir, 'working-activity.json'), JSON.stringify({ frames: normalizeActivityPreset(name) }, null, 2));
    • …s/backends/shared/atomic-file.js:23renameSync(temporary, target);
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 启动伪终端spawns-pty需留意7 处命中
    • …pes/backends/codex/rpc/binary.js:54execFile(shim ? (process.env.ComSpec ?? 'cmd.exe') : executable, shim ? ['/d', '/s', '/c', `"${executable}" --version`] …
    • lib/types/utils/clipboard.js:636const child = execFile('powershell', ['-NoProfile', '-NonInteractive', '-Command', buildPsScript(imagePath)], { encoding…
    • lib/types/utils/execFileNoThrow.js:23return spawn(process.env.ComSpec ?? 'cmd.exe', ['/d', '/s', '/c', command], {
    • lib/types/utils/externalEditor.js:170child = spawn(cmd.file, cmd.args, {
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 发起网络请求network需留意6 处命中
    • …types/dsh-adapter/ide-channel.js:447socket = new WebSocket(`ws://127.0.0.1:${target.port}`);
    • …/backends/codex/rpc/transport.js:144websocket = new WebSocket('ws://localhost/', {
    • lib/types/update.js:286const response = await fetch(`${registryBase}/${PACKAGE_NAME}/latest`, {
    • lib/types/update.js:387const response = await fetch(url, {
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 可终止进程kills-processes需留意5 处命中
    • bin/dsh-tui.js:732process.kill(process.pid, signal)
    • bin/dsh-tui.js:1160process.kill(process.pid, result.signal)
    • …types/dsh-adapter/ide-channel.js:164* owning extension already exited). `process.kill(pid, 0)` probes existence
    • …types/dsh-adapter/ide-channel.js:170process.kill(pid, 0);
    • 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
  • R013 清单可疑manifest-obfuscation需留意1 处命中
    • 安装脚本: prepare
    • 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
  • 接触凭据或密钥credentials一般871 处命中
    • …pter/channel/action-readiness.js:38describeCredential: ref => getReadyActions().describeCredential(ref),
    • …pter/channel/action-readiness.js:147describeCredential: () => refuseAsync('login', undefined),
    • …kends/codex/session/approvals.js:257...(question.isSecret === true ? { secret: true } : {}),
    • …uestions/AskUserQuestionPanel.js:52/** One masked code point of a secret answer (`question.secret`). */
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取环境变量reads-env一般226 处命中
    • lib/types/ink/components/App.js:256!isEnvTruthy(process.env.DSH_TUI_ACCESSIBILITY)) {
    • lib/types/ink/components/App.js:618if (process.env.DSH_TUI_DEBUG_MOUSE) {
    • lib/types/ink/components/App.js:1066if (url && process.env.TERM_PROGRAM !== "vscode" && !isXtermJs()) {
    • …/backends/claude/session/auth.js:155if (context.authPlan.source === 'claude-login' && await detectClaudeAuth(process.env, undefined) === 'missing' && contex…
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 读取文件reads-files一般194 处命中
    • lib/types/activityPrefs.js:40return parseActivityFrames(readFileSync(join(dir, 'working-activity.json'), 'utf8'));
    • lib/types/activityPrefs.js:56return parseWorkingActivityConfig(readFileSync(join(dir, 'working-activity.json'), 'utf8')).config;
    • lib/types/backends/claude/auth.js:194if (!existsSync(path))
    • lib/types/backends/claude/auth.js:197const parsed = JSON.parse(readFileSync(path, 'utf8'));
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 动态加载模块dynamic-import一般134 处命中
    • lib/types/dsh-adapter/backends.js:18claude: () => import('../backends/claude/index.js').then(m => m.claudeBackend),
    • lib/types/dsh-adapter/backends.js:19codex: () => import('../backends/codex/index.js').then(m => {
    • lib/types/dsh-adapter/backends.js:35const { createOAuthCredentialSource } = await import('./oauth-credential-source.js');
    • …s/dsh-adapter/channel/binding.js:336get agent() { return require(binding.agent); },
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注12
以 shell 执行命令shell-exec高关注10
写入文件writes-files需留意159
启动伪终端spawns-pty需留意7
发起网络请求network需留意6
可终止进程kills-processes需留意5
R013 清单可疑manifest-obfuscation需留意1
接触凭据或密钥credentials一般871
读取环境变量reads-env一般226
读取文件reads-files一般194
动态加载模块dynamic-import一般134

这份报告的口径

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

依赖安全公告

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

等级依赖包编号摘要
严重lodash-esCVE-2021-23337Command Injection in lodash
修复版本:4.17.21 详情 →
严重lodash-esCVE-2019-10744Prototype Pollution in lodash
修复版本:4.17.12, 4.17.13, 4.17.14 详情 →
严重lodash-esCVE-2020-8203Prototype Pollution in lodash
修复版本:4.17.19, 4.17.20 详情 →
严重lodash-esCVE-2021-23337lodash vulnerable to Code Injection via `_.template` imports key names
修复版本:4.18.0 详情 →
中lodash-esCVE-2025-13465lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and `_.omit`
修复版本:4.18.0 详情 →
中lodash-esCVE-2019-1010266Regular Expression Denial of Service (ReDoS) in lodash
修复版本:4.17.11 详情 →
中lodash-esCVE-2025-13465Lodash has Prototype Pollution Vulnerability in `_.unset` and `_.omit` functions
修复版本:4.17.23 详情 →
中semverCVE-2022-25883semver vulnerable to Regular Expression Denial of Service
修复版本:5.7.2, 6.3.1, 7.5.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 详情 →
中yamlCVE-2023-2251Uncaught Exception in yaml
修复版本:2.2.2 详情 →
低lodash-esCVE-2020-28500Regular Expression Denial of Service (ReDoS) in lodash
修复版本:4.17.21 详情 →

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

← 返回全部插件