dsh-strip-sandbox-permissions

DSH PLUGIN安全与权限

仓库 Sharl210/dsh-strip-sandbox-permissions · npm dsh-strip-sandbox-permissions

安全与权限 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

DSH plugin 零依赖插件,剥离模型工具调用参数中的 sandbox_permissions 与 justification 字段,避免沙箱权限误拒绝,提升 DeepSeek Harness 工具调用稳定性。

一句话选型结论

按资料字段整理

dsh-strip-sandbox-permissions 是安全与权限类的 DSH 可安装插件,验证等级 L5 · 运行验证通过,安全审查为低风险,列出 4 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类安全与权限 收录类型可安装插件 验证等级L5 · 运行验证通过 安全审查低风险
验证等级 L5 L5 · 运行验证通过
GitHub 星标 1 复刻 0 · 未关闭 issue 0
最近更新 2026-08-21 创建于 2026-08-21
README 12.2 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:Sharl210/dsh-strip-sandbox-permissions
  1. 1
    确认版本与运行环境

    兼容的 DSH 版本为 0.2.0-rc.2 等 12 个;版本不匹配时安装会报错。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本0.2.0-rc.2 等 12 个版本版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名dsh-strip-sandbox-permissions可用 npm view 查看包信息

能做什么

4 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-strip-sandbox-permissions:DeepSeek Harness 的沙箱权限清理插件

  • 剥离沙箱权限字段
  • 避免误拒绝错误
  • 零依赖轻量实现
  • 未命中零开销透传

上游标签

dsh-plugin

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度稳定按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-10-08): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询
— · 其它检查项
  • L4_0_SANDBOX 沙盒安装判定 方式:沙盒安装执行

风险详情

  • 审查结论 通过
  • 结论说明 vet 静态分析未发现可疑行为,判定为干净(clean)。
  • 风险计数 严重 0 / 高 0 / 中 0
  • 风险详情 未发现严重或警告级问题。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L5:安装和运行都在沙盒里跑通过,装完能直接用的概率高。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 标注了兼容的 DSH 版本(0.2.0-rc.2 等 12 个),按版本装不容易报错。
  • 列出了 4 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在安全与权限场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-strip-sandbox-permissions当前 L5 · 运行验证通过 低风险 1 0.2.0-rc.2 等 12 个 有
dsh-infinite-gen-4 未做沙盒验证 未标注 1,611 未标注 无
cc-safety-net 未做沙盒验证 未标注 1,591 未标注 无
dsh-wallpaper-engine L5 · 运行验证通过 低风险 1,018 0.2.0-rc.2 等 10 个 有
api-relay-audit L5 · 运行验证通过 低风险 875 0.2.0-rc.2 等 10 个 有
hol-guard L4 · 沙盒安装通过 不在扫描口径 828 未标注 有

仓库档案

安全与权限
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方Sharl210仓库 dsh-strip-sandbox-permissions · 默认分支 main
分类安全与权限security
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue1 / 0 / 0收录时的数值,非实时
创建 / 更新2026-08-21 · 2026-08-21最后推送 2026-08-21
本站收录2026-08-27首次进入本站目录的时间

README 全文

12.2 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-strip-sandbox-permissions

A zero-dependency DeepSeek Harness (DSH) plugin that removes placeholder
arguments some models attach to tool calls — arguments that DSH then rejects
even though the call would have worked fine without them.

Two kinds of junk are handled. Both come from the same habit: a model fills in
an optional field it has nothing to say about, instead of leaving it out.

Field When it is removed What it otherwise breaks
sandbox_permissions, justification always (any value) false sandbox escalation rejection
reasoning_effort empty values by default; any value with reasoningEffort: always subagent delegation rejected

Problem 1 — false sandbox escalation

Some models (a post-training tendency) automatically attach sandbox_permissions
(and its companion justification) to tool calls. When the session already runs
with sufficient permission (for example full access), carrying a non-strictly-wider
value triggers a false rejection from the DSH sandbox:

Error: sandbox escalation to "workspace-write" is not strictly wider than this call's current "workspace-write" mode

The command that should have run is refused. Any value of these two keys is
escalation noise, so both are removed whatever they carry.

Problem 2 — reasoning_effort on subagent delegation

reasoning_effort is an optional child-LLM routing field on the subagent
delegation tools. Omitting it inherits a compatible configured/parent effort, or
falls back to the selected model's default. The runtime rejects a supplied value
in two distinct ways, and both mean the field should not have been sent:

(a) Empty placeholder — the delegation tool treats the mere presence of the
key as an explicit route selection, so even "" is rejected:

Error: child LLM `reasoning_effort` must be non-empty

(b) Unsupported value — the value survives to the provider preflight, but the
target model advertises no reasoning efforts, so it is refused:

Error: provider "my" model "[copilot]deepseek-v4-pro" does not support reasoning effort "high"

Case (a) is fixed unconditionally: an empty placeholder means exactly what
omission means, so the key is deleted and the call proceeds as if the model had
said nothing.

Case (b) depends on the routes a deployment actually uses, so it is opt-in. If
none of your routes advertises reasoning efforts, a stray effort can only
ever kill the call, and you want reasoningEffort: always (see below).

Configuration

# in your profile's cordis.patch.yml
- id: strip-sandbox-permissions
config:
reasoningEffort: always     # "empty" (default) | "always"
Value Behaviour
empty (default) Remove reasoning_effort only when it is "", whitespace-only, or null. A non-empty effort is a deliberate routing choice and is passed through.
always Remove reasoning_effort whatever it carries. Use when no route in the deployment supports reasoning efforts, so any value is guaranteed to fail.

Any other or missing value falls back to the conservative empty mode.

How it works

Every model tool call flows through the llm/stream waterfall (both the agent
loop's preparedCall.stream and llm.stream route through
streamWithRegistration → ctx.waterfall(this, 'llm/stream', ...)), so this is
the single interception point covering every adapter that goes through the
harness LLM runtime. The listener is registered with global: true, which skips
Cordis' context filter so it also reaches child agents and other sub-contexts;
without it a host-level listener could miss them. Adapters emit a block-end
chunk carrying the assembled tool-call block at the end of the stream. This
plugin rewrites that block: it parses the arguments object, deletes the
offending top-level keys, and re-serializes.

Only the keys listed above are touched; every other argument — and every other
empty string anywhere in the object — is preserved verbatim. A new block is
produced only when something was actually removed — otherwise the original block
object is passed through unchanged (zero cost). Invalid JSON, non-object
arguments, and non-tool-call blocks are left untouched.

What the rewrite covers, and what it does not

These limits were verified against the running harness rather than assumed:

  • The assembled tool call is cleaned. What actually executes, and what the
    durable assistant/message carries, uses the rewritten block. That is the part
    that decides whether the call succeeds.
  • Raw incremental deltas are not. Adapters emit tool-call-chunks deltas
    before block-end, and those pass through untouched, so a session log's
    delta records still contain the original key. This was confirmed empirically: a
    probe whose model output contained "reasoning_effort":"high" kept that text in
    its delta records while its block-end came out clean. Rewriting deltas in
    flight is not possible — a key can straddle a delta boundary. Tooling that
    rebuilds a call from deltas may therefore still see the key.
  • Only model-issued calls are seen. In PTC mode (tools mode ptc/both), a
    program inside run_code that calls a tool programmatically builds its
    arguments in code and never produces a model block-end, so this plugin cannot
    clean it. The gap is inert while tools mode is native (the default); it
    becomes live if a deployment selects ptc/both. Method is llm/stream only.
  • Escalation arguments have real meaning. sandbox_permissions /
    justification are legitimate optional arguments on the bash/fs/pwsh/run_code
    tools, not pure noise. They are stripped unconditionally because the common
    failure mode is a model attaching them out of habit and losing the call to a
    "not strictly wider" rejection. In a genuinely restricted session this also
    drops a deliberate, valid escalation request: the tool then runs under the
    standing policy and may simply be denied. If a restricted deployment needs
    model-driven escalation, do not install this plugin there as-is.

Install

Published on npm. Install with:

dsh plugin --profile  add dsh-strip-sandbox-permissions

A plugin change takes effect only after the DSH process restarts. A
long-running dsh web keeps the plugin code it loaded at startup, so installing
or upgrading while it runs changes nothing until you restart. Check the process
start time against the install time if you are unsure whether a change is live.

Verify the plugin row is in the composed tree:

dsh --profile  --dump-config | grep strip-sandbox

Package / publish

npm pack          # produce dsh-strip-sandbox-permissions-.tgz
npm publish       # publish a new version to the npm registry

A granular access token with Bypass 2FA enabled and Read and write
package access is required to publish; a token without bypass 2FA is rejected
with a 403 even when otherwise valid.

中文说明

一个零依赖的 DeepSeek Harness(DSH)插件:把模型硬塞进工具调用参数、随后被 DSH
拒收的占位参数清理掉。很多调用本来不写这些字段就能正常跑通,是被这些多余字段拖垮的。

处理两类字段,毛病同源——模型非要在自己没有意见的可选字段上填一个空占位,而不是直接省略:

字段 何时删除 不删会坏在哪
sandbox_permissions、justification 一律删除(不看值) 沙箱权限误拒绝
reasoning_effort 默认只删空值;配 reasoningEffort: always 后删任何值 子代理派发被拒

第一类:沙箱权限误拒绝。 部分模型(后训练倾向)会自动在工具调用里带上
sandbox_permissions 及其配套的 justification。当会话已经处于足够权限(例如完整
访问权限)时,带上一个并非严格更宽的值会触发 DSH 沙箱的误拒绝,本该正常执行的命令
被挡下。这两个键无论值是什么都属于升级噪声,因此一律删除。

第二类:子代理派发里的 reasoning_effort。 这个字段是子代理派发工具上一项可选的
子模型路由设置,省略它会继承已配置的或父级的推理档位,或退回所选模型的默认档。运行时
拒绝它的方式有两种,两种都说明这个字段本不该发出来:

  • 空占位:派发工具只要看到这个键存在,就认定模型做了显式路由选择,哪怕值是 ""
    也照样拒绝,抛出 child LLM reasoning_effort must be non-empty。
  • 值不被支持:值虽然传下去了,但目标模型并没有声明任何推理档位,于是在路由预检那里
    被拒,抛出 provider "..." model "..." does not support reasoning effort "high"。

第一种情况无条件修复:空占位的含义和省略完全一样,直接删掉,让调用按"模型什么都没
说"继续走。第二种情况取决于部署实际用了哪些模型路由,因此做成可选开关:如果你所有
路由都不支持推理档位,那么带上任何档位值都只会把调用搞死,这时就该用
reasoningEffort: always。

配置方式(写进 profile 的 cordis.patch.yml):

- id: strip-sandbox-permissions
config:
reasoningEffort: always     # "empty"(默认)| "always"

empty 是默认值,只删空值,非空的档位值视为真实路由意图原样保留;always 则不看值一律
删除。填其它值或干脆不填,都会退回保守的 empty。

实现方式。 所有通过 harness LLM 运行时发起的模型工具调用都要经过 llm/stream 瀑布流,
因此这是覆盖全部适配器的唯一拦截点。监听器以 global: true 注册,会跳过 Cordis 的上下文
过滤,因此进程内运行的子代理、孙代理也能命中。适配器在流末尾用 block-end 块携带组装好的
工具调用块,本插件解析其参数对象、从顶层删除需要清理的键、再序列化回去。

只动上面列出的键,其余参数原样保留,对象里其它空字符串也不碰。只有在确实删掉了东西时
才新建块,未命中时原对象零开销透传。非法 JSON、非对象参数、非工具调用块一律不动。

覆盖范围与已知边界(以下均经真实运行时核验,不是推测):

  • 被清理的是"组装完成的工具调用"。 真正执行的那份、以及持久化的
    assistant/message 里记录的那份,用的都是改写后的块——这决定了调用能否成功。
  • 原始增量 delta 不在清理范围内。 适配器在 block-end 之前就发出
    tool-call-chunks 增量,这些原样透传,所以会话日志的 delta 记录里仍留有原始键。
    这一点已实测确认:某次探针的模型输出含 "reasoning_effort":"high",它的 delta 记录
    保留了该文本,而同一调用的 block-end 出来是干净的。飞行中改写 delta 做不到——一个键
    可能跨越两个 delta 的分片边界。因此从 delta 重建调用的工具(重放类)仍可能看到该键。
  • 只看得见模型发起的调用。 PTC 模式(tools 模式为 ptc/both)下,run_code
    程序里以代码方式调用的工具,其参数在代码里构造、不产生模型 block-end,本插件看不到。
    该缺口在 tools 模式为 native(默认值)时不触发;一旦部署选了 ptc/both 就会生效。
  • 升级类参数有真实语义。 sandbox_permissions/justification 在 bash/fs/pwsh/
    run_code 上是合法的可选参数,并非纯噪声。本插件之所以无条件删除,是因为常见的故障形态是
    模型出于习惯带上它们、结果因"并非严格更宽"被拒。但在真正受限的会话里,这也会一并
    丢掉一次合法、刻意的提权请求:工具随后按原策略执行,可能直接被拒。若某个受限部署需要
    模型主动提权,就不要原样安装本插件。

安装:

dsh plugin --profile <你的profile名> add dsh-strip-sandbox-permissions

插件改动必须重启 DSH 进程才生效。 长期运行的 dsh web 用的是启动时加载的插件代码,
运行期间安装或升级都不会自动生效,必须重启。拿不准某个改动是否已经在跑,就比一下进程
启动时间和插件安装时间。

License

MIT

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
dsh-strip-sandbox-permissions 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:Sharl210/dsh-strip-sandbox-permissions` 即可。对应的 npm 包名是 `dsh-strip-sandbox-permissions`。

dsh-strip-sandbox-permissions 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-strip-sandbox-permissions 安全吗?

低风险。vet 静态分析未发现可疑行为,判定为干净(clean)。

dsh-strip-sandbox-permissions 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-strip-sandbox-permissions 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.2.0-rc.1、0.1.7-rc.2、0.1.7-alpha.2、0.1.6-alpha.2、0.1.6-alpha.1、0.1.5-rc.2、0.1.3-alpha.2。版本较多,只列出前 8 个。

dsh-strip-sandbox-permissions 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-strip-sandbox-permissions 有哪些功能?

剥离沙箱权限字段、避免误拒绝错误、零依赖轻量实现、未命中零开销透传。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

安全与权限
按星标排序,可作替代方案

dsh-infinite-gen-4

dsh-infinite-gen-4

DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投

未标注验证等级 1,611 星

cc-safety-net

cc-safety-net

为 DeepSeek Harness 等编码 CLI 提供执行前防护,在工具调用前拦截破坏性 Git 与文件系统命令,并阻止读取 SSH 密

未标注验证等级 1,591 星

dsh-wallpaper-engine

dsh-wallpaper-engine

DSH plugin 将本机 Wallpaper Engine 壁纸变为网页界面背景,支持视频、网页、场景壁纸渲染,并配以 iOS 液态玻璃

L5 · 运行验证通过 1,018 星

api-relay-audit

api-relay-audit

DSH plugin 本地安全审计工具,检测 AI API 中继与 LLM 代理的提示注入、模型替换、工具调用改写、SSE 异常及 Web3

L5 · 运行验证通过 875 星

hol-guard

hol-guard

L4 · 沙盒安装通过 828 星

sandbase-harness

sandbase-harness

SandBase Harness 是本地优先的 AI Agent 运行时,提供沙箱会话、MCP 工具、记忆、凭据管理与审计回放,并内置控制台

L4 · 沙盒安装通过 708 星

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-10-08。