ShanHaiFish/dsh-plugin-security-review

DSH 动态 Cordis 插件安装安全审查守卫

Project Overview项目介绍

This is a native DSH (DeepSeek Harness) plugin that adds a security guard for dynamically installed and run cordis plugins. It conducts static security analysis on the source code of new plugins, follows a strict security-first policy to block any plugin that matches risky rule sets, and exposes two auditing tools for manual use. To install the recommended static bundle version, run the command dsh plugin --profile web add dsh-plugin-security-review from the npm registry. After installation, it automatically loads on DSH startup and does not require reactivation after restarts. It is also compatible with older DSH profiles that do not support static bundling via a fallback dynamic installation method.

The plugin supports multiple security features, including a local trusted whitelist maintained by the operator, a browser-based approval popup for pending plugin installs, and a full audit of all bundled plugins in your DSH profile. The approval popup offers three options: reject, approve with adding to whitelist, and approve just the current code fingerprint. Adding a plugin to the trusted whitelist means future updates or installs of the same plugin family will be automatically approved without popup, which speeds up development workflows. This feature is particularly useful for local development of custom plugins.

This plugin is released under the permissive MIT open source license, and it is available on the public npm registry for easy installation. There are some known limitations to keep in mind: the static rule-based detection can produce false positives or false negatives, and it only operates as an in-process guard. It cannot block malicious actors that have the ability to disable the guard directly, so proper host-level isolation is still required for effective defense-in-depth security. Upgrades to the plugin are done via dsh plugin update command in DSH. You can also install it from a local file path for offline development or testing.

这是一个原生DSH插件,用于对动态安装或运行的cordis插件做安全审查。它会对插件源码执行静态安全分析,遵循安全优先策略拦截风险插件,同时提供plugin_security_review和plugin_security_audit两个审查工具供手动审计使用。自v1.5.0版本起,它以静态bundle包形式提供,随DSH profile层自动加载,无需重启后重新定义激活。

它的核心功能包括操作者本地可信白名单、插件安装审批弹窗、全profile bundle库存审计,支持对高危代码直接拦截,支持白名单放行预先信任的插件。审批弹窗提供「拒绝」「同意+白名单」「同意」三个选项,满足开发者日常安装迭代插件的安全管控需求,适合需要对DSH动态插件加载做安全管控的用户使用。

该插件以MIT协议开源,推荐通过npm官方源安装,使用命令dsh plugin --profile web add dsh-plugin-security-review即可完成安装。它存在一些已知限制,比如静态规则可能误报漏报,仅做进程内拦截,无法对抗能够停用插件的恶意行为,纵深防御仍依赖宿主级隔离。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 dsh-plugin-security-review

把 ShanHaiFish/dsh-plugin-security-review 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

Plugin Install Security Review(v1.8.1)

English: README.en.md · 简体中文: 本文档

npm version npm downloads License: MIT

DSH 插件安装安全审查守卫。对 cordis_define / cordis_run 安装或运行的动态插件源码做静态安全审查,并按安全优先策略拦截;同时提供 plugin_security_review / plugin_security_audit 两个审查工具。

v1.5.0 起为静态 bundle 插件,随 profile 层栈自动加载,不再需要每次重启 DSH 后重新 define/run。

仓库内容

路径 说明
package.json + cordis.patch.yml + lib/ 静态 bundle(推荐):dsh plugin add 安装后开机自启动
manifest.json + package-source.js 动态插件回退形态(v1.4.0):无 bundle 能力的 profile 按 README 恢复流程加载
tests/gate.test.mjs 动态形态行为测试(node tests/gate.test.mjs)
tests/static.test.mjs 静态形态行为测试(node tests/static.test.mjs)

安装(静态 bundle, 推荐)

dsh plugin --profile web add dsh-plugin-security-review

已发布到 npm(registry.npmjs.org/dsh-plugin-security-review,最新 v1.8.1)。生产环境直接用上述命令从 registry 安装即可;file: 本地安装仅用于未发布或离线调试。

本地未发布时用 file: 指向本仓库(注意路径不能含空格):

dsh plugin --profile web add file:/path/to/dsh-plugin-security-review

重启 dsh web 后守卫即自动生效:plugin_security_audit(无参数)应显示「守卫: 运行中 (v1.8.1)」。

安装(动态插件, 回退)

仅用于没有 bundle 能力的 profile。步骤:

  1. 让 agent 读取 package-source.js 与 manifest.json。
  2. cordis_define:plugin: { kind:"new", idPrefix:"secur" },name/purpose 取 manifest.json,code.host 取 package-source.js 中 return { ... } 之后的内容。
  3. cordis_run 激活;plugin_security_audit 验证。

动态形态不跨 DSH 进程存续,重启后需重新加载;静态 bundle 形态无此限制。

v1.8.1 变更(相对 v1.8.0)

  • 修复: static bundle 的 peerDependencies 对齐 DSH 0.1.1-rc.2。@deepseek-ai/dsh-tools 与 @deepseek-ai/dsh-cordis-host-runner 由 ^0.1.0-rc.6 更新为 ^0.1.1-rc.2,匹配当前 DSH 携带的版本。因 npm/pnpm 对预发布版本严格匹配(预发布版本仅命中范围内相同 major.minor.patch 元组),旧范围不满足 0.1.1-rc.2,会导致 dsh plugin --profile web add/update dsh-plugin-security-review 安装时 peer 校验失败(ERESOLVE)。本版本不影响动态回退形态(不读取 package.json 的 peerDependencies)。

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

← 上一个 Prev DSH-TDAI-Memory-Adapter 下一个 Next dsh-nightshift →