DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Sandbox Console Fix — DeepSeek Harness 插件(DSH Plugin)
← Plugins
S

dsh-sandbox-console-fix

Sandbox Console Fix

DeepSeek Harness Windows bundle:为 ACL 沙箱运行器提供控制台,使受限的 pwsh/cmd/powershell 在 workspace-write 下重新启动(只读模式从未受影响)。将一个 `Everyone` 完全访问 ACE 合并到运行器进程令牌的 Default DACL 中(已随附的只读路径已合并同一个 ACE)

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:TJZF-4j97/dsh-sandbox-console-fix#455326ab1f986b27fe06bd0a7fd7a5bff7f4b8d6
README兼容性版本

说明

DeepSeek Harness Windows bundle:为 ACL 沙箱运行器提供控制台,使受限的 pwsh/cmd/powershell 在 workspace-write 下重新启动(只读模式从未受影响)。将一个 `Everyone` 完全访问 ACE 合并到运行器进程令牌的 Default DACL 中(已随附的只读路径已合并同一个 ACE),除此之外不更改令牌、ACL、完整性标签或策略中的任何内容。

兼容性与来源证明

Sandbox Console Fix 以 dsh-sandbox-console-fix 发布,当前版本为 0.2.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/10/11

版本

0.2.1stable
2026/10/11
0.2.0stable
2026/10/10
0.1.1stable
2026/10/9
查看其余 1 个版本收起版本
0.1.0stable
2026/10/9

相关插件

正在加载相关插件…

最新版
0.2.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/11
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 security-access 分类下经过校验的插件。

Experimental Auto Review@deepseek-ai/dsh-experimental-auto-review针对每个工具的 LLM 授权审查,适用于 DeepSeek Harness Auto 权限预设Cc Safety Netcc-safety-net编码代理 CLI 钩子——阻止破坏性命令和访问机密文件Doctor@linxin666/dsh-doctorDSH 配置档案的事务性救援模式,配备受监督的启动器、隔离的恢复容器、确定性修复、健康监控以及本地 Web 恢复控制台Pocketdsh-pocket把 DeepSeek Harness 装进你的口袋:一个包、一个设置页,手机扫码即同步访问电脑上的 DSH(局域网 + 公网,实时同屏)。

README

dsh-sandbox-console-fix

Windows only. A DeepSeek Harness bundle that makes the confined sandbox usable on the desktop app: workspace-write shell calls start again, and read-only keeps working — without relaxing any confinement. Both of this bundle's patch rows are platform-guarded, so on Linux/macOS the composition is untouched and the package is inert.

Targets DeepSeek Harness desktop 0.2.0-rc.2 — Electron 44.0.0 / Node 24.18.1, verified on Windows 11 22H2 x64. Reported upstream as a Discussion: https://github.com/deepseek-ai/deepseek-harness/discussions/9280.

⚠️ NOT REVIEWED BY ANY HUMAN

AI-generated code. Found, designed, written and tested end-to-end by DeepSeek V4.1-flash, an AI agent running in DeepSeek Harness. A human directed the work and approved the steps, but no human has read, reviewed, audited or approved this code or its evidence. Treat it exactly like unreviewed third-party code from an unknown author: read index.js, console-shim.mjs and cordis.patch.yml yourself before installing, and do not run it anywhere you would not run an unreviewed script.

The same warning accompanies every comment this project posts upstream.

Prior art and corroboration

@argszero/cordis-plugin-sandbox-grant-advisor (0.17.0) already names this failure shape as its native-init family and explains it: a confined child that never reaches its first instruction, split into the packaged GUI-subsystem host and a console-subsystem node.exe whose runner was started with DETACHED_PROCESS. It is an advisor — it names and diagnoses; this bundle is the repair. Its measured remedies (Harness discussions #8193 / #8208) are followed here, including restoring the runner's three standard handles around AllocConsole(). The longer mechanism write-up is discussion #9238, and the report is #9280.

Root cause and what this bundle does

The restricted token that runs the confined child gets one extra full-access ACE merged into its Default DACL: tempWriteSidPtr ?? writeSidPtr ?? worldSid — the capability write SID in workspace-write, Everyone in read-only. On a host whose process token's Default DACL lacks Everyone, a child that has to create a console during DLL initialization dies with 0xC0000142 — and it only has to when the sandbox runner owns no console (the packaged desktop app's Electron host).

Primary mechanism (since 0.2.0). The shim runs inside the runner process before the runner derives the restricted token, and merges Everyone into that process token's Default DACL. The restricted token inherits it, which is exactly what the shipped read-only path already does — so no console handling is needed at all.

Fallback. If the merge cannot be applied, the shim gives the runner a console instead: AllocConsole() with the three standard handles saved and restored and the window hidden.

Measured on one host: shipped runner → child 3221225794; Default-DACL merge only → child 0; writes outside the workspace still denied and absent; the child's own console stays hidden. Setting DSH_SANDBOX_CONSOLE_FIX_DEBUG to a file path records which path was taken. The structural fix belongs upstream — a one-line Default-DACL change, previously reported with a source patch in the Harness discussions (routing index: #9195).

The problem

On the packaged Windows desktop app, any shell call under workspace-write fails immediately:

[exit code: 3221225794]        # 0xC0000142 STATUS_DLL_INIT_FAILED

pwsh, cmd and powershell all fail the same way, both MSI and Store-packaged PowerShell builds, while danger-full-access and read-only work — so the shell tool is fine and the workspace-write confinement path is the problem.

The failure needs two conditions together — a console-less runner host (the Electron binary) and workspace-write. The complete matrix is in docs/VERIFICATION.md. Why the child's own console creation succeeds in the one mode and fails in the other is not isolated — see sections 5 and 9 of that record; the fix works in both modes either way.

Root cause, in the shipped code (dsh-sandbox-local, windowsAclRunnerInvocation()):

if (existsSync(builtEntry)) return [process.execPath, builtEntry];

In the desktop app process.execPath is DeepSeek Harness.exe — an Electron binary, i.e. a GUI-subsystem image, which never has a console. Measured on one machine, same parent process:

runner hostGetConsoleWindow()
node.exe (console subsystem)non-zero → has a console
DeepSeek Harness.exe (GUI subsystem)0 → no console

The ACL runner then spawns the confined child without CREATE_NO_WINDOW / CREATE_NEW_CONSOLE — on purpose, because per DSH's own documentation such children die during DLL initialization under the restricted token — and relies on the child inheriting the runner's console. With nothing to inherit, the console-subsystem child must create a console itself; that creation fails under the Low-integrity write-restricted token, and the process exits STATUS_DLL_INIT_FAILED (0xC0000142).

The fix

One extra argv entry, in the position DSH's own development path already uses for the same runner ([process.execPath, "--import", <url>, entry]):

shipped:  [execPath, runner.js, …profile, --, target]
this:     [execPath, --import <console-shim.mjs>, runner.js, …profile, --, target]

console-shim.mjs merges one Everyone full-access ACE into the runner process token's Default DACL (falling back to AllocConsole() only when that cannot be applied), so the confined child inherits a console and starts normally.

What does not change

shippedwith this bundle
restricted token (Low IL + write-restricted SIDs)✔identical — except the token's Default DACL gains an Everyone full-access ACE, exactly the ACE the shipped read-only path already merges
workspace / private-temp capability-SID grants, deny ACEs✔identical
integrity label, Job object, stdio plumbing, denial dialects✔identical
runner and child environment✔identical — nothing injected
dsh-fs-sandbox file policy✔untouched

Verified with an escape-write test run inside the confined child: four out-of-workspace targets are denied and absent on disk, while an in-workspace write succeeds — see docs/VERIFICATION.md.

Install

Install it the way dsh expects — through the Plugin Manager, which performs package installation and bundle selection itself:

  1. Open the Plugin Manager page and install a bundle from https://github.com/TJZF-4j97/dsh-sandbox-console-fix, or from an absolute path to a checkout of this directory.
  2. Restart the Harness.
  3. Set the session to workspace-write and run any shell command.

Nothing is downloaded and no build script is requested, because the package deliberately declares no dependencies: index.js loads LocalSandboxProvider from the running Harness bundle, and console-shim.mjs resolves koffi there too. The Harness's own installer recorded exactly that — Packages: +1, zero downloads, no pending build scripts.

cordis.patch.yml mounts this provider by disabling the shipped sandbox row and inserting its own, both rows platform-guarded with !!js — the idiom the shipped dsh-base patch uses for its own bash-sandbox row. That shape is required by the Loader dialect: a non-insert patch that targets an existing row replaces its fields, and a truthy name only asserts the existing plugin name, so a provider row cannot be swapped by overriding its id. On Windows the composition keeps exactly one ctx.sandbox provider and the shipped package still resolves from the dsh installation; on other platforms the shipped row stays enabled and this bundle's row stays disabled.

Installing by hand (not recommended)

Copy the directory somewhere the profile can resolve, add the name to dsh.profile.bundles, then restart:

Copy-Item -Recurse -Force .\dsh-sandbox-console-fix "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\dsh-sandbox-console-fix"
{ "dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-sandbox-console-fix"] } } }

The Plugin Manager route is preferred: install_bundle snapshots and restores package.json and pnpm-lock.yaml when an install fails, and keeps the profile's own bookkeeping consistent.

Verify

With the session set to workspace-write:

$PSVersionTable.PSVersion                      # expect 7.6.6 — not 0xC0000142
Set-Content 'C:\Users\<you>\nope.txt' 'x'      # expect [sandbox: file access denied under workspace-write mode]
Set-Content '.\ok.txt' 'x'                     # expect success
Remove-Item '.\ok.txt'

Not caused by this bundle: inside the confined shell the sandbox blocks piped stdio between programs, so $x = & some.exe … and some.exe | Out-Null fail (EPERM; PowerShell surfaces it as StandardOutputEncoding is only supported when standard output is redirected), while a bare & some.exe …, PowerShell's own cmdlet pipelines and file redirection work. That is the sandbox's documented confinement. Reproduce the underlying mechanism without installing anything:

node scripts/console-probe.cjs                        # host-console probe
node scripts/console-probe.cjs --host electron        # same parent, Electron host
node scripts/full-chain-repro.js --help               # drive the shipped runner under both hosts
powershell -File scripts/escape-test.ps1 -Workspace <dir>   # confinement check

See scripts/README.md for the extracted-runner paths those scripts need.

Uninstall

Remove the bundle name from the profile's bundles list (and the dependency), then restart. No system-level change is left behind — the workspace ACEs and integrity label that the Harness itself owns are not touched by this bundle.

Compatibility

PlatformWindows 10/11, x64
HarnessDeepSeek Harness desktop 0.2.0-rc.2 (Electron 44.0.0 / Node 24.18.1) — the subclass overrides one method of @deepseek-ai/dsh-sandbox-local@0.2.0-rc.2
Node / Electronany (--import requires Node ≥ 20.6 / Electron with Node ≥ 20.6)
Upstream reporthttps://github.com/deepseek-ai/deepseek-harness/discussions/9280
Other platformsthe override is never called; the package is inert

Because it subclasses a Harness-internal class, re-check after a Harness upgrade — the upstream fix (see the issue report) makes this package unnecessary.

Discovery

DeepSeek Harness's CONTRIBUTING.md asks ecosystem plugins to associate their GitHub project with the dsh-plugin topic. This repository carries it — together with dsh, deepseek-harness, sandbox, windows and pwsh — so the plugin is discoverable from that topic listing.

Security

The bundle does not widen file authority, and this is measured rather than argued: with the Default-DACL merge applied, writes to %USERPROFILE%, the drive root, C:\Windows\Temp and the user temp directory are still denied and the files are absent, while an in-workspace write succeeds. What changes is only the runner process token's Default DACL, which gains one Everyone full-access ACE — the same ACE the shipped runner already merges on its read-only path. The restricting SIDs, the Low integrity label, the workspace and private-temp grants, the denial ACEs and the fs policy are untouched, and the shim performs no process creation and no environment change. It writes one file only when DSH_SANDBOX_CONSOLE_FIX_DEBUG is explicitly set to a path, for support. Every failure is swallowed so the runner keeps its shipped behaviour.

License

MIT

Security review (three adversarial rounds, 2026-10-11)

This is an AI self-review, not a human audit. Three attack/fix/functional-test rounds were run against the installed bundle; every finding below was reproduced before it was fixed, and every fix was re-tested against the same attack.

FindingSeverityStatus
A bare require('koffi') resolved from this plugin's ancestor directories — all writable by any local process — so a planted package executed inside the sandbox runner (outside the sandbox). Reproduced.HighFixed: koffi is now resolved only from inside the running Harness installation.
index.js loaded @deepseek-ai/dsh-sandbox-local through the same walk-up chain, unvalidated; a planted class runs inside the Harness process and controls windowsAclRunnerInvocation(). Reproduced.HighFixed: the resolution's realpath must be inside this plugin's own node_modules or the dsh profile root.
The diagnostic env var wrote an arbitrary absolute path, truncating any existing file. Reproduced.MediumFixed: the diagnostic now emits one stderr line and performs no file writes.
A missing or unreadable shim was preloaded unconditionally, so the runner failed to start and every sandboxed command failed. Reproduced.MediumFixed: the shim's existence is checked before it is preloaded.
The merge's re-read only compared the ACE count, so a silent SetTokenInformation no-op would be reported as success.MediumFixed: the Default DACL is now walked and the ACE must name Everyone and carry FILE_ALL_ACCESS.
Token handle, SID and merged ACL were never released.LowFixed: CloseHandle + LocalFree.
The EXPLICIT_ACCESS_W layout is 64-bit; other architectures were not excluded.LowFixed: the merge is skipped off x64 and the console fallback is used.
The fallback's standard-handle restore had no per-step protection.LowFixed: each step is individually guarded.
An inherited Authenticated Users: Modify ACE (from the volume hosting the plugin directory) applies to this plugin's source directory, and the profile installs it with link:, so any authenticated local user can rewrite the executed code — including cordis.patch.yml, whose !!js expressions the Loader evaluates as code. Verified by icacls and by reading the Loader.

What this bundle changes, precisely

  • It merges one Everyone full-access ACE into the runner process token's Default DACL, before the runner derives the restricted token — the same ACE the shipped runner already merges on its read-only path. The restricted token therefore inherits it.
  • Scope: a Default DACL governs the initial ACL of every securable object that token holder creates without an explicit security descriptor, so this is process-wide for the runner, not limited to the confined child. It is per-process and disappears when the Harness exits.
  • Measured after the fix: the confined child starts, its own restricted token's Default DACL contains the Everyone ACE with mask 0x1f01ff, writes outside the workspace stay denied and absent, and the child's own console is created hidden.
  • Uninstall this bundle before validating a Harness upgrade — while it is installed, its disabled patch silently discards any upstream change to the shipped sandbox row.
High (deployment)
Not fixable in code. Either tighten that directory's ACL or accept and disclose the trust premise.
A later patch layer (profile, ~/.dsh/cordis.patch.yml, --patch) can revive the shipped sandbox row or supply config for this bundle's inserted row.MediumDocumented; inherent to the layering design.
Removing or moving the source directory while a session is live makes the layer silently skip, which revives the shipped row and brings 0xC0000142 back.MediumDocumented.
link: dependencies carry no integrity in pnpm-lock.yaml, so runtime tamper detection is impossible. The executed tree was nevertheless verified to equal the published v0.2.0 commit by git object hashes.LowDocumented.