toby-bridges/api-relay-audit
toby-bridges/api-relay-audit从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。
DSH「允许本次任务」临时授权:仅在当前任务内自动放行同类 `danger-full-access` 请求,任务结束自动失效。
中文 | English
Some high-risk actions deserve your explicit approval. Repeating that approval for the same task should not be necessary.
dsh-turn-approval adds an Allow for this task action to the DeepSeek Harness (DSH) Web approval card. When an agent requests danger-full-access, you can allow matching escalations for the rest of the current task only. The grant disappears when the task ends.
The default DSH permission remains workspace-write + ask; this plugin never changes it into a global high-permission mode.
For a danger-full-access request, the approval card offers:
[Reject] [Allow once] [Allow for this task]
danger-full-access requests in the current turn, then expires immediately at turn/end.Pin a commit SHA so later repository updates cannot silently change the code running on your machine:
dsh plugin --profile web add github:arrow949/dsh-turn-approval#<commit-sha>
The repository ships built, pure ESM JavaScript. A GitHub install needs neither a prepare script nor pnpm allowBuilds permission.
dsh plugin --profile web add ./dsh-turn-approval
Restart DSH Web and hard-refresh the browser (Ctrl+Shift+R). The third button confirms that the plugin has loaded.
workspace-write + ask.danger-full-access, review the approval reason and command.Verify that the profile contains the bundle layer:
dsh --profile web --dump-config
Uninstall:
dsh plugin --profile web remove dsh-turn-approval
Uninstalling removes both the Node and client halves. The approval card automatically returns to the two-button DSH default, with no changes left in official DSH files.
session + turn; it never turns an entire session into full access.danger-full-access escalations are automatically allowed. workspace-write and other approvals still prompt individually.After Allow for this task is selected, the plugin first asks the host to create the task grant. If that endpoint returns a non-2xx response or the request fails, the card clearly reports the failure and remains retryable. It does not pretend the grant succeeded or silently downgrade to Allow once.
This is an official DSH bundle: package.json declares dsh.bundle.patch, and cordis.patch.yml adds the plugin to a profile. Its client half renders through the official conversation.composer chain slot at higher priority; it does not modify any official DSH bundle file, and uninstalling restores the standard UI.
The current appearance reuses internal CSS class names from DSH's ApprovalPanel. If DSH changes that component structure or its CSS-module class names, this plugin may need a compatibility release. This is adaptation to DSH internals, not modification of official files.
Web only: headless profiles have no UI entry point, so the task-grant endpoint is not registered there.
After the user explicitly asks to install this plugin, run:
dsh plugin --profile web add github:arrow949/dsh-turn-approval#<commit-sha>
dsh --profile web --dump-config
Then ask the user to restart DSH Web and hard-refresh the browser. Do not modify official DSH bundle files. To uninstall:
dsh plugin --profile web remove dsh-turn-approval
pnpm install
pnpm test
The current suite covers turn and session isolation, type isolation, endpoint anti-forgery, restart fail-closed behavior, and the Cordis integration path.
MIT