D

dsh-subprocess-local

github.com/deepseek-ai/deepseek-harness

v0.1.7-rc.2 其他 可执行外部程序以 shell 执行命令启动伪终端

description: "子进程服务的本地主机提供程序:在主机上运行由操作系统托管的管理范围与真实终端会话,并提供显式的较弱回退方案。" kind: "package-reference"

作者原文(英文)

Local-subprocess implementation of the DeepSeek Harness subprocess seam

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

分类
other
发布
2026-10-03
版本
v0.1.7-rc.2

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注6 处命中
    • lib/index.js:9import { execFile, spawn, spawnSync } from "node:child_process";
    • lib/runner-launch-B0t2_qAO.js:7import { execFileSync, spawn, spawnSync } from "node:child_process";
    • lib/types/linux-scope.d.ts:2import { spawn, spawnSync } from 'node:child_process';
    • lib/types/runner-launch.d.ts:2import type { StdioOptions } from 'node:child_process';
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注1 处命中
    • lib/runner-launch-B0t2_qAO.js:335exec: (file, args) => execFileSync(file, args, { encoding: "utf8" }),
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 启动伪终端spawns-pty需留意12 处命中
    • lib/index.js:703/** Local node-pty terminal-process implementation for the subprocess seam. */
    • lib/index.js:733* handle call completes synchronously under the hood (node-pty write, ps-based
    • lib/index.js:765* @param terminal - allocated node-pty process.
    • lib/index.js:820/** Whether node-pty has not yet published the top-level exit event. */
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 写入文件writes-files需留意10 处命中
    • lib/index.js:1143rmSync(this.directory, {
    • lib/index.js:1173writeFileSync(rc, [
    • lib/index.js:1207writeFileSync(join(directory, ".zshenv"), [
    • lib/index.js:1243rmSync(directory, {
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 可终止进程kills-processes需留意7 处命中
    • lib/index.js:430process.kill(pid, 0);
    • lib/index.js:439groupSignalled = process.kill(-child.pid, signal);
    • lib/index.js:442return signalLinuxDirectProcess(child.pid, () => process.kill(child.pid, signal));
    • lib/index.js:1461signal: (signal) => signalLinuxDirectProcess(terminal.pid, () => process.kill(terminal.pid, signal))
    • 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
  • R013 清单可疑manifest-obfuscation需留意1 处命中
    • 安装脚本: postinstall
    • 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
  • 读取文件reads-files一般20 处命中
    • lib/index.js:133if (existsSync(this.files.requestPath) && !(outcome.signal !== null && this.terminationSignals.has(outcome.signal))) thr…
    • lib/index.js:235if (this.establishment === "pending" && !existsSync(this.startup.files.requestPath)) this.establishment = "established";
    • lib/index.js:240if (!this.direct.running() && existsSync(this.startup.files.requestPath)) return false;
    • lib/index.js:253return this.terminationRequested && tasksCurrent === 0 && (!this.direct.running() || !existsSync(this.startup.files.requ…
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 接触凭据或密钥credentials一般7 处命中
    • README.md:156- **The credential scrub is a name heuristic** — `*KEY*`/`*PASSWORD*`/`*SECRET*`/`*TOKEN*` only; differently named secre…
    • README.zh.md:156- **凭据清除依赖名称启发式规则**——只匹配 `*KEY*`/`*PASSWORD*`/`*SECRET*`/`*TOKEN*`;名称不同的 secret(例如 `*PASSPHRASE*`)会继续传递,对误删变量引入白名单属于已记录的…
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取环境变量reads-env一般4 处命中
    • lib/index.js:1409const defaultShell = platform === "windows" ? process.env.ComSpec || void 0 : process.env.SHELL || userInfo().shell || v…
    • lib/runner-launch-B0t2_qAO.js:1362function consumeRunnerSelection(env = process.env) {
    • lib/runner-launch-B0t2_qAO.js:1485function resolveWindowsExecutable(command, cwd, env, exists = executableCandidateExists, currentEnv = process.env) {
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注6
以 shell 执行命令shell-exec高关注1
启动伪终端spawns-pty需留意12
写入文件writes-files需留意10
可终止进程kills-processes需留意7
R013 清单可疑manifest-obfuscation需留意1
读取文件reads-files一般20
接触凭据或密钥credentials一般7
读取环境变量reads-env一般4

这份报告的口径

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

依赖安全公告

已查询这个插件声明的全部依赖,没有匹配到已公开的安全公告。(含 DSH 框架包在内的 @deepseek-ai/* 不作查询——那是运行时自己的问题,不是插件的。)

← 返回全部插件