dsh-sandbox-noop-escalation

zzstar101/dsh-sandbox-noop-escalation
★ —上架于 2026-10-16🔧 工具与能力安全与权限

简介

去掉那些不会让当前沙箱模式变宽的 sandbox_permissions / justification 参数,避免调用报错「sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode」。GPT 系列模型往往每次调用都会填这两个可选参数,并选 workspace-write,而它比 danger-full-access 更窄。插件在 tools/pre-execute 阶段把请求的模式和会话沙箱策略给出的当前模式做比较:相同或更窄时去掉这两个字段(只有 justification 时也会去掉)。同时兼容 GPT 从 Codex shell 工具带过来的取值:null、空值和 use_default 视为没有请求;会话已经是 danger-full-access 时,任何取值(包括 require_escalated)都会去掉,因为不存在更宽的模式。真正的升权请求、无法识别的模式值,以及没有声明 DSH 升权参数的工具,都原样交给 DSH 处理。不会放宽任何权限。监控的工具列表可配置(默认 bash、pwsh、write、edit、run_code)。零依赖。

安装

curl -fsSL https://www.dshhub.co/install.sh -o dshhub-install.sh && bash dshhub-install.sh

已经装好 DSH?可以跳过体检,直接装市场:dsh plugin --profile web add dshhub-market

本插件仅支持插件端安装。

← 返回插件目录