Scans skills and MCP configs for prompt injection, homoglyphs, hidden Unicode, dangerous shell, and credential leaks.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ChenLaoshiYF/dsh-mcpguard
GitHub-sourced plugins run build scripts on your machine at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DeepSeek Harness (dsh) 安全扫描插件:扫描 skill 文件、MCP 配置与工具描述,检测提示注入、同形字混淆、Unicode 隐形字符、危险 shell、凭据泄露。
DSH 生态首个安全类插件(截至 2026-08 调研,163 个社区插件中安全方向空白)。
安装
dsh plugin --profile web add "github:ChenLaoshiYF/dsh-mcpguard"
或在管理面板 Settings → Plugins 中安装。重启 dsh --profile web 生效。
工具
| 工具 | 说明 |
|---|---|
mcpguard_scan |
扫描本机默认位置(MCP 配置 + skill 目录) |
mcpguard_scan_path |
扫描指定目录或文件 |
检测规则
与 mcpguard 主项目同一套引擎(Python / Go / TS 三实现规则一致):
| ID | 规则 | 严重度 |
|---|---|---|
| UNI-001 | Unicode 隐形字符(零宽/Bidi/私有区) | high |
| B64-001 | 可疑 base64 长串 | medium |
| INJ-001 | 指令覆盖(ignore previous instructions) | critical |
| INJ-002 | 角色扮演注入("从现在开始你是…") | critical |
| INJ-003 | 多语言指令覆盖(日語/韓語指令忽略) | high |
| PTH-001 | 敏感路径(~/.ssh、token、.env) | high |
| SHL-001 | 危险 shell(curl|sh、eval、IEX) | critical |
| PWD-001 | 密码赋值形态 | info |
| BH-001 | 静默外发/工具行为异常 | high |
| HMG-001 | 同形字混淆(西里尔/数学体) | high |
报告自动脱敏:API key、GitHub token、SSH 私钥块、JWT → ***。
开发
npm install
npm run build # 编译到 lib/
node test/smoke.mjs # 运行自测(19 项)
配置
# cordis.patch.yml
- insert:
- id: mcpguard
name: dsh-mcpguard
config:
sensitivity: medium # low/medium/high
scanOnStartup: false # 启动时自动扫描
隐私
完全本地运行,零网络请求,零遥测。
License
MIT
Links
More in this category
liustack/modlens★ 1261
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
Anionex/dsh-vision-toolkit★ 323
Vision tasks for text-only models: intent-aware image Q&A, long-screenshot OCR, UI reproduction, grounding, and pixel diff.
zhaoolee/notes★ 138
Export DSH conversations as Smartisan Notes-style PNGs, or create and update Markdown notes in a configured account-scoped workspace.
Lum1104/dsh-browser★ 89
Chrome sidebar extension that lets DSH operate your browser directly, no vision capabilities required.
liustack/modsearch★ 88
Web search bridge for text-only agents: ask the web or X, get structured JSON evidence (search, fetch, citations).
taxueseek/argo★ 69
Search built for agents: multilingual coverage across web, academic, code, shopping, finance, news, and encyclopedias.