shuxue6662-a11y/dsh-risk-guard0

dsh-risk-guard

DeepSeek Harness 的零打扰 Agent 审计与保险丝拦截插件。

AI 分析

核心用途是监控和拦截高风险的 Agent 操作。适合需要对 DSH 会话进行安全审计、限制文件大小或工作区路径以防止意外损失的用户。支持通过命令行查看审计账单。

包名
dsh-risk-guard
版本
0.1.0
许可证
MIT
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:shuxue6662-a11y/dsh-risk-guard

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']
FieldDefaultMeaning
fuseEnabledtruemaster switch for fuse blocking
maxFileSizeMb50month JSONL rolls into a gzip archive above this size
workspaceRootunsetused to detect writes outside the workspace
homeDirOS homehome used by path rules and ~ expansion
dshHome~/.dsh or $DSH_HOMEaudit store lives at /risk-guard
protectedBranches['main','master']force-push to these branches is blocked
protectedRemotes[]force-push to these remotes is blocked
credentialFileNamescommon list.env, credentials, id_rsa, …