dshbase

插件目录 / Security / dsh-escalation-tolerance

dsh-escalation-tolerance

已验证 · 实测可装 ericleoo

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-14最近推送
跨平台平台

功能简介

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.

✅
我们的评价
可用 — 实测通过,早期项目

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. 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

@deepseek-ai/dsh-escalation-tolerance

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.

Problem

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.

Solution

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.

Installation

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);

How It Works

The plugin listens on the tools/execute event and:

  1. Extracts sandbox_permissions from the tool call arguments.

  2. Resolves the session’s effective sandbox mode using the sandboxPolicy service.

  3. 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
  4. If the requested mode is not in that list, the plugin:

    • Copies the arguments,
    • Deletes sandbox_permissions and justification,
    • Replaces exec.arguments with the sanitised copy,
    • Lets the tool execute normally.
  5. 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.

Dependencies

  • @deepseek-ai/cordis (peer dependency, ^4.0.1)
  • The sandboxPolicy service (provided by @deepseek-ai/dsh-sandbox or a compatible implementation)

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-escalation-tolerance」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:ericleoo/dsh-escalation-tolerance

Headless(CLI)profile:

dsh plugin --profile headless add github:ericleoo/dsh-escalation-tolerance

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Security 里更多

浏览全部 7819 个插件 →