chenw2759-wq/dsh-plugin-healthcheck 预览 preview

chenw2759-wq/dsh-plugin-healthcheck

害怕插件装了就崩溃?用这个插件帮你检测插件是否正常/是否含木马!

Project Overview项目介绍

This repository is a native DSH plugin built exclusively for the DeepSeek Harness ecosystem, designed to check the health of newly installed DSH plugins. When a user adds a new plugin to their DSH instance, this tool runs a full suite of checks before the backend is restarted, catching issues that would otherwise only appear on the next boot. To install it, you first create the DSH plugins directory if it does not exist, clone the repository into that folder, then add it to your web profile via the DSH CLI command, and finally restart the DSH backend to access it through the settings panel.

The core problem this plugin addresses is that DSH’s native plugin installation command only adds the plugin to the user profile and does no validation before the next backend restart. This means common issues like missing dependency chunks, duplicate core module instances, or incorrect cordis usage only get caught when the user restarts DSH, leading to avoidable downtime and debugging work. This plugin runs 9 different static and dynamic checks before restart, and automatically rolls back problematic plugins if issues are found, saving users time and frustration. After running a check, results are displayed with clear severity badges and one-click repair options for detected issues.

The plugin includes four levels of checking: L0 static analysis that does not load or run plugin code, L1 configuration combination checks, L2 isolated trial runs in a subprocess, and a static malware scan that checks for 7 common types of malicious code patterns. The malware scan follows a strict isolation rule that only reads plugin files and never executes code, to avoid activating any malicious content before detection. All automatic repair operations follow a hard rule that they never modify DSH core source code, only changing plugin code or configuration files, and require explicit user confirmation before any changes are made. The project is licensed under the permissive MIT open source license.

这是一款专为DeepSeek Harness(DSH)开发的原生插件健康检查工具,在安装新的DSH插件后,无需重启DSH后端即可验证该插件是否会引发运行时故障。它支持四层检查:纯静态代码检查、配置组合校验、隔离试跑和木马扫描,发现问题后可自动修复或回滚存在问题的插件,避免启动故障。

它解决了DSH原生dsh plugin add命令仅完成安装、不做任何验证,问题只会在下次重启后端时才暴露的痛点。它可以检查拦截9类常见的安装事故,包括依赖模块缺失、核心依赖实例重复、供应链投毒等,有效避免插件安装错误引发的各类问题。

安装时需要先将仓库克隆到本地DSH插件目录,再通过DSH CLI命令将其添加到web配置文件,重启后端即可使用。安装完成后,用户可通过Web GUI左下角设置进入检测面板,选择检测范围和层级后即可开始检测。本项目采用MIT许可证开源,用户可自由使用和修改。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 14 stars - an early-stage project星标 14,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:chenw2759-wq/dsh-plugin-healthcheck

把 chenw2759-wq/dsh-plugin-healthcheck 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-healthcheck

DSH 插件健康检查 —— 装完新插件后不重启后端即可验证插件是否会导致事故。 纯静态检查 + 配置组合 + 隔离试跑 + 木马扫描,发现即修复(自动修复 / 自动回滚 / 预制提示词)。

#dsh-plugin · DeepSeek Harness (DSH) · TypeScript · turtle-ui

截图

设置面板 →「插件检测」:

插件检测面板

运行一次检测(L0 静态 + L1 配置组合 + L2 隔离试跑 + 木马扫描):

插件检测结果


它解决什么问题

DSH 的 dsh plugin add 只负责把插件装进 profile(薄 pnpm 转发器),装完不做任何验证—— 问题要等下次后端启动才暴露。常见事故:

事故 根因 本插件拦截方式
启动报 ERR_MODULE_NOT_FOUND(缺哈希 chunk) files 白名单漏掉代码分割产物 C1 files 完整性
后端启动报缺 zod / schemastery 插件登记成 link: 依赖,绕过了 profile 的 node_modules C2 依赖声明审计
agent 报 Cannot read properties of undefined (reading 'prepare') file: 依赖装出 harness 核心包副本 → 模块双实例 → Symbol 身份错位 C3 高危副本检测
dsh-skin CLI not found(Windows) 命令不在注册表 PATH / execFile 只认 .exe C5 Windows 命令
改了 link:→file: 不生效 pnpm 不重解析 lockfile C6 lockfile 一致性
被禁用的插件长期残留在依赖里 禁用是压制症状而非修复 C7 禁用插件识别
供应链投毒 / 恶意代码 发布包内注入恶意逻辑 C8 木马扫描(纯静态隔离)
启动报 loader fibers failed(cannot get property "fs" without inject) 插件未构建(lib 缺失)或 cordis 用法错误(ctx.plugin() 后同步取服务) C9 cordis 用法检测(毫秒级) + L2 隔离试跑(重启前确认)

实战案例(真实事故)

案例 A:未构建的插件导致后端启动崩溃

dsh-ssh-workspace(SSH 远程工作区)登记进了 profile(file: 依赖 + bundle),但它的 lib/ 从未构建 —— 源码在、构建产物缺。重启后端时报:

Error: dsh: plugin tree failed to load: loader fibers failed
  Error: failed to apply loader entry ssh-workspace-fs (@deepseek-ai/dsh-ssh-workspace/fs):
    cannot get property "fs" without inject

根因链:ctx.plugin(SandboxedFileSystem) 是异步的,随后立即同步取 localCtx.fs 拿不到 服务(隔离作用域的 key 对不上)→ cannot get property "fs" without inject。

L2 隔离试跑如何救场:装完插件后不重启,直接跑一遍子进程完整 boot——它在后端真正 重启之前就把这条链断掉了(报同样的错),而不是等用户重启才发现。

修复(插件侧,不涉及 harness):

  1. 改用同步 new SandboxedFileSystem(localCtx, config) 并持有实例引用,不再 ctx.plugin() 后同步取服务;
  2. 直接 new 不走 cordis config 默认值填充,需显式传入 { cwd, diffBasisMaxBytes: 10 * 1024 * 1024 };
  3. inject 补上 sandboxPolicy。

这个案例说明:C8 木马扫描 + L2 隔离试跑在 CI 化的安装流程里互为补充—— 静态检查看"有什么",隔离试跑看"装完能不能起来"。


检查能力

L0 静态检查(不加载、不启动)

检查器 内容
C1 files 完整性 files 白名单 vs 实际 lib 产物,缺 chunk → error
C2 依赖声明 link: 带运行时依赖 / file: 带 harness peer
C3 高危副本 6 个核心包(cordis/cosmokit/dsh-tools/schemastery/dsh-credentials/dsh-home-paths)是否被装成真实目录副本
C4 依赖可解析 逐个依赖从插件锚点试解析
C5 Windows 命令 execFile/spawn 引用的命令在注册表 PATH 是否有真 .exe
C6 lockfile 一致性 specifier 与 lockfile version: 前缀是否一致
C7 禁用插件 被 disabled 但仍登记的插件(皮肤互斥正常机制不误报)
C9 cordis 用法 静态检测三类 cordis 错误:E1 ctx.plugin() 后同步取服务、E2 直接 new 需 config 的 Service 缺 config、E3 访问的服务不在 inject 声明里 → 提前捕获 cannot get property "X" without inject 类崩溃

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev deepseek-harness 下一个 Next pi-deepseek-anchor →