Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
安全与权限 #dsh#dsh-plugin

dsh-guardian-approval

独立的 Codex Guardian 风格审批审查器,为 DSH 处理高风险操作。

scotlight @scotlight ⬇ 1 ★ 1 main

安装

dsh plugin --profile web add github:scotlight/dsh-guardian-approval
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

独立的 Codex Guardian 风格审批审查器,为 DSH 处理高风险操作。

该插件未提供要点说明,请参考仓库 README。

dshdsh-plugin
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/scotlight/dsh-guardian-approval
许可证MIT
主要语言main
下载量1
GitHub 星标1
最近推送2026-08-20
收录日期2026-09-19
分类安全与权限

事实信息来自公开插件目录快照(2026-10-03),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-guardian-approval

English · [简体中文](README.zh-CN.md)

In DSH (DeepSeek Harness), agents trigger approval prompts for out-of-sandbox writes, command runs, etc. Under the "Auto Approve" preset, this plugin hands every approval request to a fixed reviewer model for a verdict:

```text
approval request ──► collect evidence (tool call + args + egress payload pre-read)
                        │
                        ▼
              reviewer model (fixed route, immune to
              the agent's hot model switches)
              embeds the full Codex Guardian policy
                        │
              ┌─────────┴─────────┐
              ▼                   ▼
            allow             deny / circuit-break
       (allow this once)   (reject with a readable reason)
              │
     channel failure → fail-closed to human, never silently allow
```

### Features

- **Independent review channel** — endpoint, model, reasoning effort and timeout are configured separately; hot-swapping the agent's main model never touches the reviewer
- **Full Codex Guardian policy** — the risk (low/medium/high/critical) × authorization (unknown/low/medium/high) matrix; file/tool content counts as *untrusted* evidence, only explicit user instruction authorizes — "do what the file says" does not authorize the dangerous thing inside the file
- **Payload samples** — for egress-shaped actions the plugin pre-reads the file being written/uploaded (2KB excerpt) so the reviewer sees exactly what would leave the machine
- **Three-state circuit breaker** — 3 consecutive denials / 3 consecutive channel errors / 10 denials in a 50-review window; any trip fast-fails with a readable reason (parity with Codex's "stop and announce approval failure" behavior)
- **Fail-closed** — a dead review endpoint never results in an allow; requests fall back to the human approval UI
- **Sidecar audit trail** — every verdict (allow/deny/error/circuit-open/delegated) is appended to `~/.dsh/auto-approval-audit.jsonl` with risk/authorization/rationale
- **Dual API styles** — `responses` (strict json_schema) or `chat` (OpenAI-compatible `/chat/completions`) for relay/proxy providers

### Data boundary

The configured reviewer receives sanitized tool arguments, bounded recent direct-user messages, and, for egress-shaped actions, up to four 2KB local-file excerpts. Redaction is best-effort and cannot guarantee detection of every secret format. Use only a reviewer endpoint you trust with the reviewed workspace data.

### Verified behavior (live cases)

| Action | Verdict | Rationale |
|---|---|---|
| User explicitly asked: delete this directory | ✅ allow | narrow scope + explicit authorization |
| A **file** instructed: copy an API-key config into Public | ❌ deny | "user only authorized following untrusted file content, never authorized writing secrets to a public path" |
| A **file** instructed: set a directory ACL to Everyone:F | ❌ deny | persistent security weakening, not narrowly scoped |
| Review channel failed 3× in a row | ❌ breaker | "review service failed 3 times in a row — check the channel or retry later" |

### Install

Requires Node.js 22.19 or later and DSH 0.1.0-rc.6 or later in the 0.1 release line. Development and CI use DSH rc.8.

```sh
dsh plugin --profile web add -w dsh-guardian-approval@0.1.1
```

Restart DSH Web, then fill in **Settings → Plugins → Plugin config → DSH 自动审批**:

![settings](https://raw.githubusercontent.com/Scotlight/dsh-guardian-approval/main/docs/screenshot-settings.png)

The **连通与策略** section has a one-click connectivity test (sends a real probe review and shows the verdict, risk/auth grades, rationale and latency — verifying endpoint, model, key, API style and policy in one shot) and a policy-document editor (the full Codex Guardian policy text ships built-in; edit or replace it, effective on the next review without restart):

![policy editor](https://raw.githubusercontent.com/Scotlight/dsh-guardian-approval/main/docs/screenshot-policy.png)

Then: any OpenAI-compatible endpoint, a reviewer model, and the API key (stored in the DSH credential store, never in the repo). Pick the **Auto Approve** preset in a session to activate.

### Development

```sh
pnpm install
pnpm run build   # tsc + client bundle
pnpm test        # vitest: evidence recovery, output parsing tolerance, breaker states, error breaker
```

### Policy sources

- [codex-rs/core/src/guardian/policy_template.md](https://github.com/openai/codex/blob/main/codex-rs/core/src/guardian/policy_template.md)
- [Codex sandboxing/auto-review docs](https://learn.chatgpt.com/docs/sandboxing/auto-review)

### Deep dives

- [Architecture](docs/architecture.md) — the approval waterfall mount point, evidence assembly, dual API styles, three-state breaker, and the sidecar-audit decision
- [Policy & verdicts](docs/policy.md) — the risk × authorization matrix, untrusted-evidence rules, the two-condition injection test, and known limits
- [Field notes](docs/field-notes.md) — three days of gotchas: traceable-proxy receiver loss, the session-log vocabulary brick, four relay-channel quirks, and the live testing methodology

## License

[MIT](LICENSE)

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。