Repository navigation
Replies: 1 comment
|
目前无解,写skill或者agent.md让它临时换后端为OpenSSL就行 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
DSH 缺陷 / 文档反馈 — Windows 沙箱受限 token 阻断 Schannel TLS 凭据
中文概要(供快速审阅)
DSH 在 Windows 上的沙箱(
dsh-sandbox-windows-acl)用一个受限令牌(WRITE_RESTRICTED+DISABLE_MAX_PRIVILEGE+LUA_TOKEN)约束被沙箱包裹的 shell 子进程。这个令牌只拦截写访问(文档如此声明),但顺带让 Windows 的 Schannel(系统 TLS 提供方)拿不到客户端凭据,导致走 Schannel 的工具——curl.exe、git.exe、Invoke-WebRequest、PowerShell 的SslStream(以及本环境里的pip)——在 TLS 握手阶段全部失败(SEC_E_NO_CREDENTIALS)。而 OpenSSL 栈的 Python 网络(requests/urllib)完全不受影响,harness 进程自身的web_search/web_fetch(不被沙箱包裹)也正常。DSH 文档多处声明"网络不受限(network stays unrestricted)"、"本 seam 不表达任何网络限制"、"读写/网络/进程可见性不受限"。这些说法在裸 socket / 原始 TCP 层面成立(TCP 连接确实能建立),但对 Schannel 型 TLS 不成立,会误导用户以为沙箱 shell 能正常走 HTTPS。建议修正文档措辞,或将"让受限令牌具备 Schannel 凭据"作为一个明确的安全决策,而不是让这一能力缺口继续作为未文档化的副作用存在。
提交信息(可直接复制)
提交目标(GitHub Issues)
deepseek-ai/deepseek-harness(DeepSeek AI 官方)gh issue create --repo deepseek-ai/deepseek-harness ...(需在非沙箱终端 + 已认证)标题
Windows restricted-token sandbox: Schannel TLS fails with SEC_E_NO_CREDENTIALSWindows 受限 token 沙箱导致 Schannel TLS 失败(SEC_E_NO_CREDENTIALS)一句话摘要
DISABLE_MAX_PRIVILEGE | LUA_TOKEN | WRITE_RESTRICTED) prevents Schannel from acquiring client credentials, so Schannel-based TLS clients (curl/git/Invoke-WebRequest/pip) fail at the handshake withSEC_E_NO_CREDENTIALS, while raw TCP sockets and OpenSSL-based clients (Pythonrequests/urllib) still work — contradicting the docs' claim that "network stays unrestricted."DISABLE_MAX_PRIVILEGE | LUA_TOKEN | WRITE_RESTRICTED)让 Schannel 拿不到客户端凭据,导致走 Schannel 的工具(curl/git/Invoke-WebRequest/pip)在 TLS 握手阶段即失败(SEC_E_NO_CREDENTIALS),而裸 TCP 与 OpenSSL 栈的 Python(requests/urllib)仍正常工作——这与文档"网络不受限"的声明不符。一次性复现(issue 评论区/邮件开场白)
Summary
On Windows, the DSH sandbox (
@deepseek-ai/dsh-sandbox-windows-acl) wraps the sandboxed shell child in a restricted token built withCreateRestrictedToken(..., flags = 13, ...)where13 = DISABLE_MAX_PRIVILEGE(0x1) | LUA_TOKEN(0x4) | WRITE_RESTRICTED(0x8).This token intersects writes only (as documented), but it also prevents Windows Schannel (the OS TLS provider) from acquiring client credentials,
so every Schannel-based HTTPS/TLS client fails at the handshake with
SEC_E_NO_CREDENTIALS (0x8009030e).Not affected: raw TCP sockets (connect succeeds), OpenSSL-based clients (Python
requests/urllib), and the harness node process (e.g.web_search/web_fetch), which is not wrapped by the restricted token.Contradiction with docs: DSH docs state the sandbox expresses "no network ... restrictions" and that "network stays unrestricted / reads, network, and process visibility are not [restricted]". This is true for raw sockets but not for Schannel-based TLS.
Environment
@deepseek-ai/dsh0.1.1-rc.2@deepseek-ai/dsh-sandbox,@deepseek-ai/dsh-sandbox-local,@deepseek-ai/dsh-sandbox-windows-acl,@deepseek-ai/dsh-bash-sandbox/@deepseek-ai/dsh-pwsh-sandboxworkspace-write(ACL restricted-token runner)pwsh),git,curl.exe, Python 3.14 (urllib)Expected vs. Actual
SEC_E_NO_CREDENTIALSweb_search/web_fetchRoot cause & evidence
The restricted token is built in machine-independent DSH code with a fixed flag set that strips privileges and produces a limited/write-restricted token. Under this token:
SEC_E_NO_CREDENTIALS.curl.exe -I https://api.deepseek.com→curl: (35) schannel: AcquireCredentialsHandle failed: SEC_E_NO_CREDENTIALS (0x8009030e)Invoke-WebRequest/.NET SslStream.AuthenticateAsClient→Exception calling "AuthenticateAsClient": No credentials are available in the security packagegit ls-remote https://github.com/...→Failed to connect to github.com:443 ... Could not connect to serverDISABLE_MAX_PRIVILEGE):whoami /alllists onlySeChangeNotifyPrivilege(bypass traverse checking); a normal interactive token carries many more.github.com:443,www.baidu.com:443,registry.npmjs.org:443,pypi.org:443,api.deepseek.com:443,*.deepseek.com:443all succeed; onlywww.google.com:443fails to answer (SYN-level, unrelated — Google's resilience to probes).python -c "import urllib.request; urllib.request.urlopen('https://api.deepseek.com')"→HTTPError 401: 'Authorization Required'— i.e. TLS handshake succeeded and the request reached the server (401 = no API key, as expected).Reproduction
Impact
git clone,curl,Invoke-WebRequest, PowerShell TLS, andpip(in this environment) — all the native-Windows TLS tools fail at the handshake.requests/urllib(OpenSSL) and harness-levelweb_search/web_fetch.api.deepseek.comfor LLM + web search).Suggested resolution (options)
dsh-sandbox/README.md,dsh-bash-sandbox/README.md, anddsh-sandbox-windows-acl/README.mdto note that, on the Windows restricted-token runner, Schannel client-credential acquisition fails, so Schannel-based TLS clients are unavailable; OpenSSL-based and harness-level clients are unaffected.Scope & confidence
0.1.1-rc.2,workspace-writesandbox (2026-08-23).SEC_E_NO_CREDENTIALS+ working OpenSSL) follow directly from it.research-assistant/docs/network-verification.md, 2026-08-16); this report is the upstream-facing version.References
@deepseek-ai/dsh-sandbox/README.md— "File effects are the whole policy vocabulary — the seam expresses no network, process, syscall, device, or credential restrictions."@deepseek-ai/dsh-bash-sandbox/README.md— "File effects only ... Network stays unrestricted"; Known Limitations: "Confinement covers file effects only — network restriction ... absent."@deepseek-ai/dsh-sandbox-windows-acl/README.md— "Writes are restricted; reads, network, and process visibility are not.WRITE_RESTRICTEDintersects write accesses only, so a confined child can ... open sockets."@deepseek-ai/dsh-sandbox-windows-acl/lib/types/token.d.ts+lib/types/win32-abi.d.ts—DISABLE_MAX_PRIVILEGE = 1,WRITE_RESTRICTED = 8,LUA_TOKEN = 4;createRestrictedToken(..., 13, ...).@deepseek-ai/dsh-web-search-deepseek/README.md— harness-levelweb_searchreaches the network viactx.web→POST {baseURL}/messages(DeepSeek Anthropic-compatible API), outside the sandbox.All reactions