xiangshu2026/dsh-alpha-guard ↗★ 1
dsh-alpha-guard
Policy-layer guard for DeepSeek Harness: read whitelist, sensitive-path deny list, dangerous-command blocking, subagent isolation, install approval and malware static audit. A first line of defense, not an antivirus.
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xiangshu2026/dsh-alpha-guardREADME
Read the full README ↗配置
路径:%USERPROFILE%\.dsh\alpha-guard\config.json
(首次加载自动生成;改完下一次工具调用即生效,不用重启)
完整字段见 config.example.json。常用项:
| 字段 | 说明 |
|---|---|
read.allowRoots | 读取白名单根目录 |
read.denyPaths | 永远拒绝读取(优先级高于白名单) |
read.denyNamePatterns | 按文件名拒绝(*.kdbx、id_rsa) |
write.denyPaths | 禁止写入 / 删除 |
commands.mode | deny(默认)/ warn(只记录不拦,排障用) |
subagent.allowWeb | false = 子代理完全断网 |
malware.blockAt | 拦下的风险分阈值,默认 30。调低更严格但误报更多 |
malware.notifyOnly | true = 只告警不拦 |
enabled | false 临时停用 |
failClosed | 插件内部异常时是否拒绝(默认 false,异常时放行并记日志) |
config.json被列为「禁止工具写入」,防止被提示注入自我解除防护。 要改请手动编辑。