DSH plugin security guard: 28-rule static scanner, risk scoring, whitelist/blacklist policy, local web dashboard and in-DSH risk popups.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:weisofns/dsh-security-guard
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DeepSeek Harness(dsh)插件生态安全卫士。标准 dsh 插件包,安装后自动开始工作:
静态扫描已安装插件、28 条规则风险评分、模型可调用扫描工具、本地 Web 仪表盘、可选远程规则更新。
功能
| 模块 | 功能 |
|---|---|
| 静态扫描器 | 28 条规则覆盖偷 Token、数据外发、动态执行、混淆、网络、供应链、持久化、提权等 |
| 启动自检 | 安装后自动扫描 profile 下已安装的 dsh 插件包 |
| DSH 工具 | 为模型注册 security_scan_plugins / security_scan_plugin / security_guard_report |
| 告警 | 控制台 + 事件总线 + 可选 Webhook,带等级过滤和限流 |
| Web 仪表盘 | GET /security-guard 可视化面板;POST /api/security-guard/* JSON API |
| 规则更新 | 支持 remoteSources 远程规则 JSON,可选定时自动更新 |
安装
# 先完全退出 DSH Host
dsh plugin --profile web add ./dsh-security-guard-2.1.0.tgz
重启 DSH 即可,无需额外配置。
使用
- 对话:“扫描一下我的插件安全” / “检查哪些插件有风险” / “扫描 dsh-labnana”。
- 模型调用
security_scan_plugins/security_scan_plugin返回风险报告。 - 浏览器访问
http://127.0.0.1:<DSH端口>/security-guard打开仪表盘。
检测规则(28 条)
- TOK-001~004:硬编码 Token / Token 外发 / 读取 DSH 凭据 / 环境变量凭据
- EXF-001~003:可疑外发域名 / DNS-ICMP 隧道 / 剪贴板读取外发
- EXE-001~003:动态代码执行 / 子进程执行 / 远程代码加载
- OBF-001~003:高熵字符串 / 解码后执行 / JSFuck 极简混淆
- NET-001~003:未授权监听 / WebSocket 外发 / 代理配置篡改
- FS-001~003:越界文件写入 / 删除系统文件 / 全盘文件搜索
- PRO-001~002:进程注入 / 权限提升
- SUP-001~003:可疑 install 脚本 / 依赖混淆 / Git 仓库投毒
- PER-001~002:启动项植入 / Shell 配置篡改
- PRIV-001~002:请求敏感 DSH 服务 / 拦截核心服务
配置(cordis.patch.yml)
- insert:
- id: dsh-security-guard
name: dsh-security-guard
config:
enabled: true
scanOnStart: true
autoUpdateRules: true
enableWebPanel: true
webPanelPath: /security-guard
maxFileSize: 1048576
includeNodeModules: false
whitelist: []
remoteSources: []
autoUpdateInterval: 0
minLevel: warning
channels:
- console
webhookUrl: ""
remoteSources: 远程规则 JSON URL 列表,例如["https://example.com/rules.json"]autoUpdateInterval: 规则自动更新间隔(分钟),0 表示不自动更新enableWebPanel/webPanelPath: 是否启用 Web 仪表盘及其路径
兼容性
- Node >= 20(使用全局
fetch) - DeepSeek Harness 官方插件加载方式(
dsh.bundle.patch+cordis.patch.yml) - 零第三方运行时依赖;
@deepseek-ai/dsh-tools由 DSH Host 提供,缺失时自动跳过工具注册
许可
MIT
Links
More in this category
toby-bridges/api-relay-audit★ 832
Runs local security audits of AI API relays and LLM proxies from DeepSeek Harness, producing Markdown reports for prompt injection, model substitution signals, tool-call rewriting, error leakage, stream integrity, and profile-gated Web3 risks.
howmp/dsh-pentest★ 451
Authorized pentest mode for DeepSeek Harness — exploration chain, assets and findings with a Web view.
SeaOf0/dsh-redteam-model★ 417
Authorized-security DSH collection: nine work modes (redteam coordinator, pentest, code audit, binary analysis, attack-defense, AV evasion, incident response, cloud security, CTF solving) and fifteen runtime plugins, managed from a settings page with one-click deploy, install, update and uninstall.
PerryLink/dsh-auto-review★ 164
Second-model auto-review on the approval answerer chain: a read-only reviewer subagent returns structured allow/deny verdicts with reasons, fail-closed by default.
PerryLink/dsh-permission-rules★ 114
Claude Code-style declarative permission rules: ordered allow/deny/ask YAML rules matching tool names, arguments, workspace paths, and agent identity on the tools/pre-execute waterfall, with full session-log audit, dry-run mode, and hot reload.
PensiveFei/dsh-secure-audit★ 85
Read-only security and compliance plugin for DeepSeek Harness: prompt-injection detection, Chinese-PII redaction, and a local configuration audit with redacted, reproducible reports.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.