dsh-cli
v0.14.7
会话与记忆
以 shell 执行命令可执行外部程序写入文件
根据 Provider 的不同,可通过 OAuth、设备码或 API key,将 **ChatGPT、Claude、SuperGrok、OpenCode Zen/Go、OpenRouter、 Nous Portal 和 Infron** 用作模型 Provider。无需对 dsh 源码打 patch。本插件与 dsh-cli 同步开发(并被其 打包内置),后者是 DeepSeek Harness 的终端入口;本插件也可独立安装到任意 d
作者原文(英文)
Interactive terminal interface for DeepSeek Harness agents, sessions and tools.
中文简介由 DeepSeek 模型翻译,仅供参考。
dshdsh-clideepseekdeepseek-harnesscordistuiterminalcli
检测报告
关注度高。命中了不少能力模式,其中可能有需要留意的。逐条看下面的清单。
2高关注5需留意4一般13未命中
高关注需留意一般
能力清单
- 以 shell 执行命令
shell-exec高关注14 处命中…/dsh-adapter/cli-registration.js:178read: () => execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', '[Environment]::GetEnvironmentV……/dsh-adapter/cli-registration.js:180execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', '[Environment]::SetEnvironmentVariable("Pat…bin/dsh-cli.js:96const shellOpt = isWin ? { shell: true } : {}bin/dsh-cli.js:97// DEP0190(issue #148):shell:true + 非空参数数组触发语法级弃用告警——- 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
- 可执行外部程序
spawns-processes高关注9 处命中…types/dsh-adapter/childStderr.js:28import childProcess from 'node:child_process';…/dsh-adapter/cli-registration.js:1import { execFileSync } from 'node:child_process';lib/types/utils/clipboard.js:36import { execFile, spawn } from 'node:child_process';bin/dsh-cli.js:30import { spawn, spawnSync } from 'node:child_process'- 看它调用哪些程序。调用本机已有的工具是常见做法。
- 写入文件
writes-files需留意120 处命中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));…/dsh-adapter/cli-registration.js:23writeFileSync(temporary, content, { flag: 'wx', mode });…/dsh-adapter/cli-registration.js:24renameSync(temporary, path);- 看写入位置。写自己的配置目录是正常的,写系统目录不是。
- 可终止进程
kills-processes需留意7 处命中lib/types/ink/components/App.js:542process.kill(process.pid, "SIGSTOP");bin/dsh-cli.js:727process.kill(process.pid, signal)bin/dsh-cli.js:1081process.kill(process.pid, result.signal)…types/dsh-adapter/ide-channel.js:164* owning extension already exited). `process.kill(pid, 0)` probes existence- 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
- 启动伪终端
spawns-pty需留意6 处命中…/dsh-adapter/cli-registration.js:178read: () => execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', '[Environment]::GetEnvironmentV……/dsh-adapter/cli-registration.js:180execFileSync('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', '[Environment]::SetEnvironmentVariable("Pat…lib/types/utils/clipboard.js:491const 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], {- 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
- 发起网络请求
network需留意5 处命中…types/dsh-adapter/ide-channel.js:447socket = new WebSocket(`ws://127.0.0.1:${target.port}`);lib/types/update.js:170const response = await fetch(`${registryBase}/${encodeURIComponent(PACKAGE_NAME)}/latest`, {lib/types/update.js:271const response = await fetch(url, {lib/types/update.js:502const response = await fetch(checksumUrl, {- 看请求发往哪些域名。发往作者自己的后端是常见做法。
- R013 清单可疑
manifest-obfuscation需留意1 处命中- 安装脚本: prepare
- 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
- 接触凭据或密钥
credentials一般323 处命中…pter/channel/action-readiness.js:38describeCredential: ref => getReadyActions().describeCredential(ref),…uestions/AskUserQuestionPanel.js:441const secretInput = question.id === 'dsh-auth-secret';…uestions/AskUserQuestionPanel.js:479const renderInputRow = () => (_jsxs(Box, { flexDirection: "row", marginTop: inputFocused ? 1 : 0, onClick: focusInputRow……uestions/AskUserQuestionPanel.js:480? _jsx(Text, { ref: caretRef, inverse: true, children: secretInput && cursorChar !== ' ' ? '•' : cursorChar })- 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
- 读取环境变量
reads-env一般182 处命中lib/types/ink/components/App.js:224!isEnvTruthy(process.env.DSH_CLI_ACCESSIBILITY)) {lib/types/ink/components/App.js:531if (!isEnvTruthy(process.env.DSH_CLI_ACCESSIBILITY)) {lib/types/ink/components/App.js:551if (process.env.DSH_CLI_DEBUG_MOUSE) {lib/types/ink/components/App.js:1005if (url && process.env.TERM_PROGRAM !== "vscode" && !isXtermJs()) {- 环境变量里常混有密钥。看它是否把整个 env 都读走。
- 读取文件
reads-files一般147 处命中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;…/dsh-adapter/migrate/bin-path.js:26if (existsSync(candidate))…s/dsh-adapter/bundled-presets.js:10const patches = parse(readFileSync(path, 'utf8'), {- 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
- 动态加载模块
dynamic-import一般46 处命中lib/types/screens/Chat.js:1479const { dirname } = await import('node:path');lib/types/screens/Chat.js:1480const { fileURLToPath } = await import('node:url');lib/types/screens/Chat.js:1481const { resolveOwnBin } = await import('../dsh-adapter/migrate/bin-path.js');…s/terminal-utils/cliHighlight.js:3// that only typecheck because this file's `typeof import('highlight.js')` pulls- 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
| 能力 | 标识 | 关注度 | 命中次数 |
|---|---|---|---|
| 以 shell 执行命令 | shell-exec | 高关注 | 14 |
| 可执行外部程序 | spawns-processes | 高关注 | 9 |
| 写入文件 | writes-files | 需留意 | 120 |
| 可终止进程 | kills-processes | 需留意 | 7 |
| 启动伪终端 | spawns-pty | 需留意 | 6 |
| 发起网络请求 | network | 需留意 | 5 |
| R013 清单可疑 | manifest-obfuscation | 需留意 | 1 |
| 接触凭据或密钥 | credentials | 一般 | 323 |
| 读取环境变量 | reads-env | 一般 | 182 |
| 读取文件 | reads-files | 一般 | 147 |
| 动态加载模块 | dynamic-import | 一般 | 46 |
这份报告的口径
扫描读的是包里的源码,全程不执行第三方代码。 本次读了 1209 个文件,扫描于 2026-10-14。 命中次数只说明源码里出现过这类调用,不说明行为好坏——一个插件读写文件 500 次和 1 次 都会被记为「读取文件」。这是能力清单,不是信任评分,也不是安全结论: 没扫出来的能力可能只是写法没被规则覆盖。
依赖安全公告
这个插件声明的依赖中,有 14 条已公开的安全公告 (最高等级:严重):
| 等级 | 依赖包 | 编号 | 摘要 |
|---|---|---|---|
| 严重 | lodash-es | CVE-2021-23337 | Command Injection in lodash 修复版本:4.17.21 详情 → |
| 严重 | lodash-es | CVE-2019-10744 | Prototype Pollution in lodash 修复版本:4.17.12, 4.17.13, 4.17.14 详情 → |
| 严重 | lodash-es | CVE-2020-8203 | Prototype Pollution in lodash 修复版本:4.17.19, 4.17.20 详情 → |
| 严重 | lodash-es | CVE-2021-23337 | lodash vulnerable to Code Injection via `_.template` imports key names 修复版本:4.18.0 详情 → |
| 中 | lodash-es | CVE-2025-13465 | lodash vulnerable to Prototype Pollution via array path bypass in `_.unset` and `_.omit` 修复版本:4.18.0 详情 → |
| 中 | lodash-es | CVE-2019-1010266 | Regular Expression Denial of Service (ReDoS) in lodash 修复版本:4.17.11 详情 → |
| 中 | lodash-es | CVE-2025-13465 | Lodash has Prototype Pollution Vulnerability in `_.unset` and `_.omit` functions 修复版本:4.17.23 详情 → |
| 中 | semver | CVE-2022-25883 | semver vulnerable to Regular Expression Denial of Service 修复版本:5.7.2, 6.3.1, 7.5.2 详情 → |
| 中 | yaml | CVE-2023-2251 | Uncaught Exception in yaml 修复版本:2.2.2 详情 → |
| 低 | lodash-es | CVE-2020-28500 | Regular Expression Denial of Service (ReDoS) in lodash 修复版本:4.17.21 详情 → |
| 低 | yaml | CVE-2026-33532 | yaml is vulnerable to Stack Overflow via deeply nested YAML collections 修复版本:1.10.3, 2.8.3 详情 → |
| 未分级 | sharp | GHSA-f88m-g3jw-g9cj | sharp inherited vulnerabilities in libvips: CVE-2026-33327, CVE-2026-33328, CVE-2026-35590, CVE-2026-35591 修复版本:0.35.0 详情 → |
查询的是依赖声明范围的下界(如 ^4.2.0 查 4.2.0),
不是实际安装到的版本。真正装的时候如果解析到了修复版本,就不受影响——
所以这是「可能受影响」,不是「这个插件有漏洞」。数据来自
OSV.dev。