baosfeng/my-dsh-plugins--plugins-dsh-my-guard ↗★ 5
dsh-my-guard
DSH 安全护栏插件:执行前护栏(破坏性命令拦截/确认)、安装前投毒扫描(可疑脚本/密钥/恶意依赖告警)、提示注入检测(prompt injection / jailbreak 命中告警)。DSH web plugin: pre-execute guard for destructive commands, pre-install poison scan, prompt injection detection.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:baosfeng/my-dsh-plugins#cc837f22ecaa841de7d263346073dc44c55d50ee&path:plugins/dsh-my-guard说明文档
阅读完整 README ↗配置
插件级配置(cordis.patch.yml 对应插件行的 config 字段,均为可选):
- insert:
- id: guard
name: 'dsh-my-guard'
- config: # 传给 apply(ctx, config)
mode: 'observe' # 护栏模式:observe(默认,只告警)/ ask(审批确认)/ deny(直接拦截)
poisonScan: true # 投毒扫描自动联动(默认 true)
injection: true # 提示注入检测(默认 true)
notifyEnabled: false # 高严重级告警经 dsh-my-notify 推送(默认关闭,issue #88)
notifyCooldownMs: 60000 # 同类型告警通知冷却(ms,默认 60000)
# customRules: '[{"pattern":"touch /etc/evil","mode":"deny","severity":"high","description":"写 /etc"}]'
# ↑ 自定义护栏规则(JSON 字符串;设置页保存后自动写入,无需手动编辑)