shuxue6662-a11y/dsh-risk-guard ↗★ 0
dsh-risk-guard
DeepSeek Harness 的零打扰 Agent 审计与保险丝拦截插件。
AI 分析
核心用途是监控和拦截高风险的 Agent 操作。适合需要对 DSH 会话进行安全审计、限制文件大小或工作区路径以防止意外损失的用户。支持通过命令行查看审计账单。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:shuxue6662-a11y/dsh-risk-guard说明文档
阅读完整 README ↗Usage
/risk-guard operation bill for the current session
/risk-guard --turn only the last turn
/risk-guard --all summary + bills for every recorded session
/risk-guard --json machine-readable output
The bill shows the time range, call count, turn count, high-risk count, fuse blocks, max/total scores, tag distribution, the risky calls table, and every fuse denial.
Configuration
Plugin config lives in the profile's cordis.patch.yml:
- insert:
- id: risk-guard
name: 'dsh-risk-guard'
config:
fuseEnabled: true
maxFileSizeMb: 50
workspaceRoot: 'C:/projects/my-app'
homeDir: 'C:/Users/me'
dshHome: 'C:/Users/me/.dsh'
protectedBranches: ['main', 'master']
protectedRemotes: []
credentialFileNames: ['.env', 'credentials', 'id_rsa']
| Field | Default | Meaning |
|---|---|---|
fuseEnabled | true | master switch for fuse blocking |
maxFileSizeMb | 50 | month JSONL rolls into a gzip archive above this size |
workspaceRoot | unset | used to detect writes outside the workspace |
homeDir | OS home | home used by path rules and ~ expansion |
dshHome | ~/.dsh or $DSH_HOME | audit store lives at /risk-guard |
protectedBranches | ['main','master'] | force-push to these branches is blocked |
protectedRemotes | [] | force-push to these remotes is blocked |
credentialFileNames | common list | .env, credentials, id_rsa, … |