dsh-redteam-model
SeaOf0
基于dsh web实现的多种模式,目的是服务于redteam进行授权的安全研究,覆盖渗透测试、红队评估、代码审计等范围领域,请勿用于非法行为。(允许二开,赋予模块各位自己的业务逻辑,方法论只有自己熟练的才好用,好的方法论=好的生态)
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ericleoo/dsh-escalation-tolerance
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Tolerate redundant sandbox_permissions requests – a Cordis plugin that turns hard failures into harmless no‑ops when a tool asks for a permission mode that is already active.
Some GPT‑family models (e.g., gpt-5.6-luna, azure/gpt-5.4-mini) speculatively send sandbox_permissions on ordinary tool calls, even when the session already runs at that permission level. The shared escalation validator (@deepseek-ai/dsh-sandbox) expects any escalation request to be strictly wider than the call’s effective mode; otherwise it fails with:
sandbox escalation to "<mode>" is not strictly wider than this call's current "<mode>" mode
This means a trivial pwd can crash the tool if the model adds a redundant sandbox_permissions field.
This plugin hooks into the tools/execute waterfall and inspects the requested sandbox_permissions. If the requested mode is not strictly wider than the session's standing mode, it strips both sandbox_permissions and justification from the arguments. The tool then executes at the standing mode – exactly what would have happened had the model not sent the redundant request.
Genuine escalations (modes that are strictly wider) are left untouched and still go through the normal approval flow.
Security note: No security boundary is changed. Stripping the redundant request is equivalent to ignoring it; the tool always runs under the session's current effective mode.
npm install @deepseek-ai/dsh-escalation-tolerance
The package includes a Cordis patch (cordis.patch.yml) that registers the plugin automatically when bundled with the @deepseek-ai/cordis bundle system.
If you are using Cordis manually, add the plugin to your configuration:
import { App } from '@deepseek-ai/cordis';
import * as escalationTolerance from '@deepseek-ai/dsh-escalation-tolerance';
const app = new App();
app.plugin(escalationTolerance);
The plugin listens on the tools/execute event and:
Extracts sandbox_permissions from the tool call arguments.
Resolves the session’s effective sandbox mode using the sandboxPolicy service.
Compares the requested mode against the WIDER_MODES table:
| Current mode | Allowed wider modes |
|---|---|
read-only |
workspace-write, danger-full-access |
workspace-write |
danger-full-access |
If the requested mode is not in that list, the plugin:
sandbox_permissions and justification,exec.arguments with the sanitised copy,If the requested mode is in the list, the plugin does nothing – the escalation request proceeds through the usual approval flow.
If no sandbox policy is available (or resolution fails), the plugin silently bypasses and lets the call proceed.
@deepseek-ai/cordis (peer dependency, ^4.0.1)sandboxPolicy service (provided by @deepseek-ai/dsh-sandbox or a compatible implementation)MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: permissions、sandbox。