注册一个 agent 工具 plugin_guard,在安装前对 DSH 插件包做静态扫描,给出判定与原因:缺少或损坏的 dsh.bundle.patch、未声明 dsh.permissions、安装脚本、危险 API 与代码混淆、依赖风险,以及未索引、无法核验的源码。只读:不导入、不安装、不求值、不运行被扫描的代码。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-plugin-guard-tool
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:RyeSama/dsh-plugin-guard#path:/plugins/dsh-guard-tool
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
A DSH plugin bundle that gives the agent one tool: plugin_guard.
Ask it to check a package before it joins your profile, and it answers with the same verdict, reasons and next command the CLI prints:
> scan ../dsh-plugin-gate before I install it
FAIL 0/100 · 1 high · 1 medium · 2 low
HIGH security/dangerous-api Evaluates code at runtime (lib/rules.js:136)
Next: read the flagged lines before installing; drop --ignore-scripts if the
package needs an install step you did not review
The scan is static and read-only. It never imports, installs, evaluates or runs the code it looks at, and it never writes to the package.
Install
dsh plugin --profile desktop add dsh-plugin-guard-tool
Or from a checkout, without going through npm:
dsh plugin --profile desktop add link:$PWD/plugins/dsh-guard-tool
After the profile restarts the agent has plugin_guard; nothing appears in the
desktop UI, because this bundle ships no client code.
Requires DSH >=0.2.0-rc.1 <0.3.0-0, declared both in peerDependencies and in
dsh.engines.dsh. @deepseek-ai/dsh-tools comes from the host; the bundle only
imports it.
What the tool accepts
| argument | type | meaning |
|---|---|---|
target |
string, required | a plugin directory (./my-plugin) or an npm package name (dsh-plugin-gate) |
json |
boolean | return the full machine-readable report instead of the summary |
What it does not do
- It does not install, block, or sandbox anything. A DSH plugin runs in the host process; the guard is governance and admission, not isolation.
- It does not fetch the trust index of the profile's CLI. The tool reads the
package on disk and reports;
dsh-plugin-guard indexanddsh-plugin-guard scanremain the CLI's job. - It cannot see what a dependency does, or what the plugin does at runtime.
Files
index.js host half: defineTool + ctx.tools.register
spec.js the tool definition, free of any DSH import (unit tested)
cordis.patch.yml the bundle patch that mounts the host half
locale/{en,zh}.json title and description shown by the host
icon.svg the icon shown by the host
spec.js is kept separate on purpose: the tool's behaviour is testable with
node --test test/smoke.mjs and no DSH installation.
MIT.
链接
同类插件
kenryu42/cc-safety-net★ 2167
执行前守卫,在工具调用运行前拦截破坏性 Git 与文件系统命令,以及对 SSH 密钥、.env 等机密文件的访问。
ADWMC/helm-d#helmd★ 1670
DeepSeek Harness 的安全分析插件:33 个工具覆盖六大安全域、证据/报告与工具集,并提供案件生命周期、路由和工具账本;按会话绑定的案件工作区支持证据链、E 编号校验与可复现结论(repro_cmd);内置 362 篇按需参考、三档可热切换人设,以及带案件状态恢复的破甲 / Case / 拦截 / 关于四页工作台。
SeaOf0/dsh-redteam-model★ 944
面向授权安全研究的 DSH 合集:九个工作模式(redteam 总控、渗透测试、代码审计、二进制分析、攻防评估、免杀对抗、应急溯源、云安全攻防、CTF 解题)与十五个运行时插件,设置页管理台支持一键部署、安装、更新与卸载。
toby-bridges/api-relay-audit★ 939
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。
howmp/dsh-pentest★ 625
面向 DeepSeek Harness 的授权渗透模式:以探索链路记录目标、线索、资产与漏洞,并在 Web 中可视化展示。
ECNU/EduWork#dsh-auto-approval★ 467
按需启用规则和用户配置的 SystemOne 兼容服务,审查命令及文件工具的沙箱越界申请;不确定或失败时保留人工确认。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。