loeanxi/dsh-injection-guard ↗★ 1
dsh-injection-guard
针对 DeepSeek Harness 的源感知提示词注入保护插件
AI 分析
核心用途是防御提示词注入攻击,对敏感调用进行安全审查与拦截。适合对安全性要求极高、需要防止模型被恶意指令劫持的生产环境或自动化任务。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:loeanxi/dsh-injection-guard说明文档
阅读完整 README ↗Configuration
All options are optional. The safe defaults are shown below:
| Option | Default | Purpose |
|---|---|---|
log | true | Emit an explainable audit message for each decision |
askThreshold | 60 | Minimum score for ASK when a block threshold is not reached |
failClosed | true | Review-gate sensitive calls when no turn state is available |
semantic | true | Add conservative local intent signals; never weakens deterministic rules |
locale | en | Use en or zh-CN for audit text while retaining machine markers |
For Chinese audit output, add locale: zh-CN to the plugin configuration:
config:
log: true
locale: zh-CN
配置项
所有配置项均可省略,以下是安全默认值:
| 配置项 | 默认值 | 作用 |
|---|---|---|
log | true | 为每次决策输出可解释审计信息 |
askThreshold | 60 | 未达到阻断阈值时触发 ASK 的最低分数 |
failClosed | true | 没有 Turn 状态时,对敏感调用进行人工复核 |
semantic | true | 增加保守的本地意图信号,不会削弱确定性规则 |
locale | en | 使用 en 或 zh-CN 输出审计文本,同时保留机器标记 |
如果希望页面上看到中文审计结果:
config:
log: true
locale: zh-CN