浏览全部

其他 · v0.27.0

pi2dsh

github.com/weijiafu14/pi2dsh

能力可执行外部程序以 shell 执行命令写入文件

Bridge the Pi and DeepSeek Harness ecosystems: a general Pi Host ABI that runs unmodified Pi extensions as native DSH plugins, with compatibility inspection and Pi-to-DSH MCP config translation.

该插件尚未翻译,显示作者原文。

deepseek-harnessdsh-pluginpi-packagemigrationcompatibility
认证 L1已扫描 ✓健康 S/100周下载 573
11 项能力
许可
MIT
发布
2026-10-19
维护者
weijf14-gmail

安装命令

dsh plugin --profile web add pi2dsh@0.27.0

未检测

这个包的 tarball 里确实有 dsh.bundle.patch,补丁文件存在且可解析。但「有补丁」是静态检查的结果,不是装过——它能不能在这台机器上装成,还没有验证。

检测报告

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

能力清单

  • 可执行外部程序spawns-processes高关注3 处命中
    • dist/pi-coding-agent-lcNs9Wos.mjs:19import { execFile } from "node:child_process";
    • dist/pi-tui-DruSeKmd.mjs:8import { execSync } from "node:child_process";
    • dist/runtime-BFJsumJX.mjs:24import { spawn } from "node:child_process";
    • 看它调用哪些程序。调用本机已有的工具是常见做法。
  • 以 shell 执行命令shell-exec高关注1 处命中
    • dist/pi-tui-DruSeKmd.mjs:3354return execSync("tmux display-message -p '#{client_termfeatures}'", {
    • 看命令字符串是拼出来的还是写死的。拼接用户输入才是真正的风险。
  • 写入文件writes-files需留意25 处命中
    • dist/cli.mjs:71writeFileSync(parsed.values.out, output);
    • dist/oauth-bridge-C_MAPMGA.mjs:296await mkdir(dirname(this.#path), { recursive: true });
    • dist/oauth-bridge-C_MAPMGA.mjs:298await writeFile(temp, `${JSON.stringify(data, null, 2)}\n`, { mode: 384 });
    • dist/oauth-bridge-C_MAPMGA.mjs:299await rename(temp, this.#path);
    • 看写入位置。写自己的配置目录是正常的,写系统目录不是。
  • 发起网络请求network需留意20 处命中
    • …/anthropic-messages-CaYTgvLF.mjs:339* See https://undici.nodejs.org/#/?id=garbage-collection
    • …/anthropic-messages-CaYTgvLF.mjs:1008const FetchResponse = "Response" in fetch ? fetch.Response : (await fetch("data:,")).constructor;
    • …/anthropic-messages-CaYTgvLF.mjs:5435return await this.fetch.call(void 0, url, fetchOptions);
    • dist/dist-QBBA-dL_.mjs:1190socket = net.connect(this.connectOpts);
    • 看请求发往哪些域名。发往作者自己的后端是常见做法。
  • 启动伪终端spawns-pty需留意4 处命中
    • dist/pi-coding-agent-lcNs9Wos.mjs:1861const result = spawnSync("where", ["bash.exe"], {
    • dist/pi-coding-agent-lcNs9Wos.mjs:1874const result = spawnSync("which", ["bash"], {
    • dist/pi-coding-agent-lcNs9Wos.mjs:6122const result = spawnSync("where", ["bash.exe"], {
    • dist/pi-coding-agent-lcNs9Wos.mjs:6135const result = spawnSync("which", ["bash"], {
    • 伪终端等于给了一个完整 shell。确认这是插件的核心功能。
  • 可终止进程kills-processes需留意2 处命中
    • dist/pi-coding-agent-lcNs9Wos.mjs:1977process.kill(-pid, "SIGKILL");
    • dist/pi-coding-agent-lcNs9Wos.mjs:1980process.kill(pid, "SIGKILL");
    • 看它终止的是自己启动的进程,还是按名字匹配到的任意进程。
  • 清单可疑manifest-obfuscation需留意1 处命中
    • 安装脚本:prepare
    • 清单被刻意写乱时,加载行为会难以预测。看原文而不是看渲染结果。
  • 接触凭据或密钥credentials一般88 处命中
    • …/anthropic-messages-CaYTgvLF.mjs:4010* await client.beta.vaults.credentials.create(
    • …/anthropic-messages-CaYTgvLF.mjs:4037* await client.beta.vaults.credentials.retrieve(
    • …/anthropic-messages-CaYTgvLF.mjs:4056* await client.beta.vaults.credentials.update(
    • …/anthropic-messages-CaYTgvLF.mjs:4076* for await (const betaManagedAgentsCredential of client.beta.vaults.credentials.list(
    • 看它读取哪些凭据、发往哪里。用于登录自己的服务是正常的。
  • 读取文件reads-files一般70 处命中
    • dist/analyzer-BCHAvJ70.mjs:192const parsed = JSON.parse(await readFile(join(rootDir, "package.json"), "utf8"));
    • dist/analyzer-BCHAvJ70.mjs:231for (const entry of await readdir(path)) output.push(...await expandAsset(join(path, entry), rootDir));
    • dist/analyzer-BCHAvJ70.mjs:249const text = await readFile(source, "utf8");
    • dist/analyzer-BCHAvJ70.mjs:403const text = await readFile(file, "utf8");
    • 读文件是绝大多数插件的正常工作方式,本身不构成顾虑。
  • 读取环境变量reads-env一般56 处命中
    • …/anthropic-messages-CaYTgvLF.mjs:5145if (typeof globalThis.process !== "undefined") return globalThis.process.env?.[env]?.trim() || void 0;
    • …/anthropic-messages-CaYTgvLF.mjs:5163* @param {string | null | undefined} [opts.apiKey=process.env['ANTHROPIC_API_KEY'] ?? null]
    • …/anthropic-messages-CaYTgvLF.mjs:5164* @param {string | null | undefined} [opts.authToken=process.env['ANTHROPIC_AUTH_TOKEN'] ?? null]
    • …/anthropic-messages-CaYTgvLF.mjs:5165* @param {string} [opts.baseURL=process.env['ANTHROPIC_BASE_URL'] ?? https://api.anthropic.com] - Override the default b…
    • 环境变量里常混有密钥。看它是否把整个 env 都读走。
  • 动态加载模块dynamic-import一般31 处命中
    • dist/analyzer-BCHAvJ70.mjs:415pushFinding(findings, rootDir, file, source, node, `host-import(${packageName}:${importedName})`, "unsupported", `The pi…
    • dist/analyzer-BCHAvJ70.mjs:418pushFinding(findings, rootDir, file, source, node, `host-import(${packageName}:${importedName})`, matched.level, matched…
    • …/anthropic-messages-CaYTgvLF.mjs:973throw new Error("`File` is not defined as a global, which is required for file uploads." + (isOldNode ? " Update to Node…
    • dist/cli.mjs:79const { analyzePackage } = await import("./analyzer-BCHAvJ70.mjs");
    • 动态导入本身无害,但会让依赖关系难以静态审阅。
逐条扫描明细
能力标识关注度命中次数
可执行外部程序spawns-processes高关注3
以 shell 执行命令shell-exec高关注1
写入文件writes-files需留意25
发起网络请求network需留意20
启动伪终端spawns-pty需留意4
可终止进程kills-processes需留意2
清单可疑manifest-obfuscation需留意1
接触凭据或密钥credentials一般88
读取文件reads-files一般70
读取环境变量reads-env一般56
动态加载模块dynamic-import一般31

这份报告的口径

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

可信度

100 健康分 S 扣分项下方逐条附证据
  • 0没有可扣分的项

认证等级 L1

  • L0静态结构与契约✓sha512-3P2yFMxp2KxTlKye… 与本地 tarball 复算一致,补丁与入口齐备
  • L1配置组合与依赖图✓跨包无 entry id 冲突,插入模块可解析,目录内 peer 满足
  • L2隔离沙箱冒烟—尚未试装
  • L3运行时健康监控—未抽样(本层是抽样检测:没有会话不等于干净)
评分口径与作者信息

从 100 分开始按规则扣减:fail −20 / major −10 / warn −5 / minor −2;star 数、下载量、LLM 输出都不参与评分

维护者
weijf14-gmail
仓库
https://github.com/weijiafu14/pi2dsh
许可
MIT
最后发布
2026-10-19
周下载
573
star
219

扫描状态:已扫描。能力是事实,不是缺陷; 周下载与 star 只作参考,不参与评分。

认证等级只回答四件事:包本身是否完整可解析(L0)、能不能与别的插件组合(L1)、隔离环境里装不装得上并起得来(L2)、抽样运行时有没有异常(L3)。依赖漏洞、仓库存活、下载量都不参与评级,只作为独立信号标注。可信 ≠ 无漏洞,上架 ≠ 推荐。

DSH peer 依赖14 个cordisdsh-agent-instructionsdsh-attachmentdsh-commandsdsh-credentialsdsh-llmdsh-scopedsh-sessiondsh-skill-filesystemdsh-subprocessdsh-subprocess-localdsh-system-prompt等 14 个均为 @deepseek-ai/ 下的包
Node 要求>=22.19.0
第三方依赖11 个
bundle patch./cordis.patch.yml
依赖安全公告3 条,见下方

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

等级依赖包编号摘要
中pacoteCVE-2026-9496pacote is vulnerable to Denial of Service (DoS) via the addGitSha function
修复版本:21.5.1 详情
中yamlCVE-2023-2251Uncaught Exception in yaml
修复版本:2.2.2 详情
低yamlCVE-2026-33532yaml is vulnerable to Stack Overflow via deeply nested YAML collections
修复版本:1.10.3, 2.8.3 详情

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

元数据

主页https://github.com/weijiafu14/pi2dsh#readme
仓库最近提交2026-10-19
仓库创建2026-08-13

返回首页