toby-bridges/api-relay-audit
toby-bridges/api-relay-audit从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。
DeepSeek Harness 自动审批门控:Flash 预判写入/命令是否不可回补,安全操作自动批准、危险操作转人工(fail-safe)。另含文件改动对比(unified diff)与一键撤销、按会话隔离的快照管理(v0.5.1:通过工具调用参数回溯精确保存快照,覆盖人工审批场景)。
简体中文 | English
Auto-approval gate for DeepSeek Harness — minimal human intervention: safe operations auto-approve, risky ones go to a human (fail-safe).
A Flash model pre-judges every sandbox escalation: routine operations auto-approve, hard-risk operations (deletion / credentials / remote / system / bulk) always require human confirmation; learned rules only ever cover operations you confirmed, with an in-app human review UI.
SAFE / RISKY:<category>); recoverable operations auto-approveallowlist.json edits take effect immediately, no restartThe "Approval" tab (right of Trace) lists the current session's auto-allowed and manually-approved actions in reverse-chronological order: each record shows the tool (bash / edit), a verdict tag ("Auto-allowed · Flash safe", "Approved" etc.), timestamp and description. The top bar shows this session's diff snapshot usage (2.9 KB · 3 items) with two cleanup options: "This session only" (removes only the current session's snapshots, never touching other sessions' unviewed diffs) and "Clear all" (double-confirmed, clears every session).
Click a file in an approval record to open the diff dialog: a unified diff with green additions (+), red deletions (-) and gray context lines; dual old/new line numbers on the left; multiple changes grouped into hunks with gray "6 unmodified lines" separators folding unchanged regions. The header shows +2 / -2 changed · 20 unchanged. The Revert button at the bottom sends an undo command to the conversation so the AI restores the file from the pre-approval snapshot.
The "Auto-approval" section in Settings provides full configuration: preset initialization (one-click write of the auto-approve preset into cordis.patch.yml), pipeline overview (DENY → allowlist → denyRules → Flash → learning), deny-keyword blacklist (built-in entries + custom add), and hot-reload notes (changes take effect immediately, no restart).
dsh plugin --profile web add dsh-approval-gate
auto-approve preset to ~/.dsh/profiles/web/cordis.patch.yml (see guide)dsh webMIT