Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
dsh-ops version and how it was installed
0.5.0(npm 包,随 desktop profile 用 pnpm 装的,无本地 tarball;pnpm-lock.yaml 里有 dsh-ops@0.5.0)
DSH version and profile
0.2.2-rc.1, profile=desktop
OS and architecture
Windows x64
Minimal reproduction
Call the shell tool in any DSH session (profile=desktop):
ops_bash({"command": "echo hi"})
Observed: EXECUTOR_UNAVAILABLE - the restricted Bash runtime could not be prepared:
UNKNOWN: unknown error, open 'C:\Users\Wu\.dsh\profiles\desktop\node_modules\dsh-ops\runtime\win32-x64\niubash\niu.exe'
Equivalent CLI reproduction (copy as-is, Windows PowerShell):
& 'C:\Users\Wu\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe' 'C:\Users\Wu\.dsh\profiles\desktop\node_modules\dsh-ops\bin\dsh-ops.mjs' bash-runtime status
Actual output on 2026-11-07:
{
"selected": {
"available": false,
"source": "bundled",
"detail": "EXECUTOR_UNAVAILABLE: Niubash payload verification failed: Incomplete Niubash payload tree. Restore the complete pinned v1.5.0 portable tree; this is not a user authorization denial. Do not bypass confinement or fall back to another shell."
},
"engine": "none",
"managed": [],
"bashIpc": {
"root": "C:\\Users\\Wu\\.dsh\\dsh-ops\\bash-ipc",
"current": null,
"generations": 0,
"entries": [],
"totalBytes": 0,
"reclaimableBytes": 0
}
}
Root cause (already confirmed): Windows Defender quarantined the payload file
C:\Users\Wu\.dsh\profiles\desktop\node_modules\dsh-ops\runtime\win32-x64\niubash\niu.exe
as Trojan:Win32/Bearfoos.A!ml (ThreatID 2147731250, false positive).
Provenance check: 158 expected files, 157 OK, 0 mismatched, 1 missing = niu.exe only.
Expected niu.exe sha256: 7ec3ec04ce91bae64c23d7150e6b16574e9d91df8fcf0df997006e2b37bf2f1e
Archive: niubash-v1.5.0-win-x64.tar.gz, sha256 da28cdc4e2e87f777ee0eae71386276f9c6a0ed135c1e2baad943acd8d349b87
---Expected behaviour
bash-runtime status should report available: true and ops_bash should execute the command.
If a payload file is missing or quarantined by antivirus, the error should say so explicitly
(e.g. "niubash payload file niu.exe is missing - possibly quarantined by antivirus"),
name the exact file, and offer a supported repair path (reinstall/repair from the pinned
provenance and re-verify the SHA-256) instead of the generic
"UNKNOWN: unknown error, open ...". Users should not have to bypass Defender or any
confinement to recover.
如果页面上还有 "Bug description / Actual behaviour / Steps to reproduce" 之类的框
Bug description:
After Windows Defender quarantined the bundled Niubash payload file
(runtime\win32-x64\niubash\niu.exe) as a false positive, ops_bash fails on every call with
EXECUTOR_UNAVAILABLE: "Incomplete Niubash payload tree" / "UNKNOWN: unknown error, open ...
niu.exe". The rest of the payload tree is intact (157/158 files, 0 mismatched); only niu.exe
is missing. The error message does not mention antivirus quarantine or how to repair.
Steps to reproduce / Actual behaviour: see "Minimal reproduction" above.
Environment: see the required fields above.
Additional context:
- Full incident report attached (niubash_defender_false_positive_report_2026-11-07.md).
- Raw Defender events attached (evidence_raw.txt).
- Defender detection is a false positive: Trojan:Win32/Bearfoos.A!ml (ThreatID 2147731250,
SeverityID 5), 3 detections on 2026-11-07, ActionSuccess=True, DidThreatExecute=False.
- The official archive SHA-256 matches the pinned provenance value; only niu.exe is missing,
which is exactly the file Defender quarantined.
- Already filed/reported to Microsoft and to the Niubash upstream (links to be added).
Actual reading
$ "C:\Users\Wu\.dsh\dsh-runtimes\dsh-primary-runtime\dependencies\node\bin\node.exe" "C:\Users\Wu\.dsh\profiles\desktop\node_modules\dsh-ops\bin\dsh-ops.mjs" ladder --json
exit code: 0
{
"worker": {
"resolved": true,
"executable": "C:\\Users\\Wu\\.dsh\\profiles\\desktop\\node_modules\\dsh-ops\\runtime\\win32-x64\\dsh-ops-worker.exe",
"source": "packaged runtime",
"error": null
},
"shells": {
"bash": {
"available": false,
"executable": null,
"source": "bundled",
"detail": "EXECUTOR_UNAVAILABLE: Niubash payload verification failed: Incomplete Niubash payload tree. Restore the complete pinned v1.5.0 portable tree; this is not a user authorization denial. Do not bypass confinement or fall back to another shell.",
"restricted": null,
"integrity": {
"status": "not-applicable",
"entries": [],
"warnings": []
}
},
"pwsh": {
"available": false,
"executable": null,
"source": "host",
"detail": "PowerShell is managed by the host; OPS does not supply or override its executable. Use dsh-ops upgrade-host-pwsh on Windows, then restart DSH. An explicit host pwshPath remains authoritative."
}
},
"levels": {
"files": true,
"bash": false,
"pwsh": false
},
"rungs": []
}
$ "...dsh-ops.mjs" bash-runtime status
exit code: 0
{
"selected": {
"available": false,
"source": "bundled",
"detail": "EXECUTOR_UNAVAILABLE: Niubash payload verification failed: Incomplete Niubash payload tree. Restore the complete pinned v1.5.0 portable tree; this is not a user authorization denial. Do not bypass confinement or fall back to another shell."
},
"engine": "none",
"managed": []
}
In a DSH session, calling the shell tool fails as well:
ops_bash({"command": "echo hi"})
-> EXECUTOR_UNAVAILABLE: the restricted Bash runtime could not be prepared:
UNKNOWN: unknown error, open 'C:\Users\Wu\.dsh\profiles\desktop\node_modules\dsh-ops\runtime\win32-x64\niubash\niu.exe'
---Reproduced in isolation?
Did not try isolation
Anything else (optional)
niubash_defender_false_positive_report_2026-11-07.md
Related issues/PRs: none found in this repo.
What we already ruled out:
- Not an authorization denial - the error text says "this is not a user authorization denial".
- Not a corrupted download or wrong archive: provenance check shows 158 expected files,
157 OK, 0 mismatched; the only missing file is niu.exe, which is exactly the file
Windows Defender quarantined. - Not a missing native worker: ladder --json shows worker.resolved=true with the packaged
dsh-ops-worker.exe present. - Not a bash availability issue: Git Bash exists (C:\Program Files\Git\bin\bash.exe); the
failure is dsh-ops' bundled payload tree, not the host bash.
Defender evidence (Get-MpThreatDetection / Get-MpThreat):
- Trojan:Win32/Bearfoos.A!ml, ThreatID 2147731250, SeverityID 5, IsActive=False.
- 3 detections on 2026-11-07: 17:09:05, 17:09:12 (runtime\win32-x64\niubash\niu.exe),
and 18:08:22 (shells\niubash.stage-CmVXMQ\niu.exe); ActionSuccess=True, DidThreatExecute=False. - We did NOT disable Defender, did NOT add exclusions, did NOT restore from quarantine,
and did NOT bypass the executor. This issue only asks for a clearer diagnostic and a
supported repair path.
Proxy/mirror environment: this machine accesses GitHub through a local proxy
(127.0.0.1:20809) because direct TLS is intercepted in this network. That is unrelated to
the local payload files; all reproduction above is local/offline.
Full report and raw evidence attached below.
Reacted by Agan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
latte03 commentedon Nov 7, 2026
+1
dagangwo commentedon Nov 8, 2026
一样啊更新到0.5以后dsh一调用ops就会被当做木马病毒杀掉,你是真有病毒还是一堆证书exe啊,解决一下,要不没法用
Yifumoe commentedon Nov 8, 2026
arookieofc commentedon Nov 17, 2026
docs(troubleshooting): record the antivirus quarantine of niu.exe (T-…
fix(shell): name endpoint-security quarantine on unknown runtime opens (
Thatgfsj commentedon Nov 20, 2026
#1033(main
c70633da)收下了本单要求的可操作处置:docs/troubleshooting.md:250「Antivirus quarantinedniu.exefrom the payload」,docs/CHANGELOG.md同步记录。本单期望的三件事在 main 上都已成立:
src/cli/niubash-payload.ts:126报Incomplete Niubash payload: niu.exe is missing,不再是只有UNKNOWN: unknown error, open ...(诊断点名随 fix(niubash): select by metadata and prepare on the first command #844 落地,文档随 chore(release): consolidate the OPS-PTC 18-card release with #1002–#1008 (#1000) #1033 补齐);src/bash-runtime-failure.ts:75指向dsh-ops provision-shells --bash,并说明重试本调用造不出缺失的 payload;Get-MpThreat/Get-MpThreatDetection(或 ESET 日志)取证步骤,以及「只对本固定 prepared 路径加白名单,不关闭防护、不广泛信任 payload 树」的边界。隔离本身是外部安全产品的决定,仓库侧能交付的「说清是隔离、点名文件、给出修复路径」三项均已落地。
docs(troubleshooting): record the antivirus quarantine of niu.exe (T-…