Repository navigation
fix(shells): classify MSYS section failures and arm the Niubash boundary in confined modes (#870, #409, #581, #958, #828, #771) - #1002
Closed
Nicholas023 wants to merge 7 commits into
Closed
Nicholas023 wants to merge 7 commits into
Nicholas023 wants to merge 7 commits into
Conversation
…870) A default DSH_HOME (~/.dsh) inside a home workspace made every full-access Niubash call refuse with 'the prepared payload must be outside the session workspace'. The boundary exists so confined workspace labeling and write gating never reach an executable through the workspace or a junction into it; full access runs without confinement and is not a security boundary against the account, so the refusal only removed a working configuration.
…vailable (#409) msys-2.0.dll prints a per-user section conflict as 'CreateFileMapping S-<user SID>.<n>, Win32 error 5. Terminating.' with no 'fatal error' prefix, so the restricted-token runtime failure reached the model as a bare non-zero exit and read like a command or denial problem. Classify that message like the signal-pipe failure: EXECUTOR_UNAVAILABLE with sandbox.runnerFailed, never a user authorization denial. The proxy still arms only new objects; a foreign DACL is not rewritten.
A report described ops_bash children still carrying the restricted Low token (S-1-16-4096) in danger-full-access while the host pwsh ran Medium. The projection chain (standing policy, per-call approval, the full-access short-circuit and the skipped confine) checks out in this repository, and a full-access child reports the caller's own integrity label here, so the failure did not reproduce. Lock the boundary with a guard that fails when full access ever routes through confinedBash or sandbox.confine, and document the whoami /groups token comparison for the next report.
A husky v9 hook with the shebang #!/usr/bin/env sh failed under the niu-Git command while the same script with #!/bin/sh ran. The interpreter lookup happens inside the niu-Git payload, which this repository cannot patch, so the entry documents the diagnostic pair and the shebang workaround and marks the root cause unresolved-upstream.
…ws Terminal (#828) Each ops_bash call flashed a console window on Windows 10 when Windows Terminal was the default terminal. Niubash is a console-subsystem binary launched without an interactive parent, and the Windows-10 terminal hand-off re-creates a visible console per call; no dsh-ops setting controls console hosting, and the shipped binary cannot be patched here. Record the default-terminal comparison as the diagnosis and mark the hidden-console build upstream work.
A Defender or ESET event removed only niu.exe from an otherwise complete payload, so selection failed with the member-level diagnostic from #844. The quarantine is an external security-product decision: collect the matching threat event, restore the pinned tree with provision-shells, and if an allow-list is chosen target the fixed prepared location. No repository behaviour claims to prevent it.
…rences (#958, #828) Review follow-up: the shebang and console-flash entries stated upstream mechanisms as established facts. Separate what the reporter observes (the two-shebang comparison, the default-terminal comparison) from the attributed mechanism, which this repository cannot verify inside the upstream payloads, so both entries point a diagnosis instead of claiming a proven root cause.
IsaacHuo
added a commit
to IsaacHuo/dsh-ops-pro
that referenced
this pull request
Nov 20, 2026
shells-full-access-confinement, shells-msys-shared-section and shells-niubash-prepared-boundary (absorbed with T-Auto#1002) only exercise the Windows Niubash branch; under DSH_OPS_REQUIRE_RUNTIME=1 their POSIX skips failed the Linux and macOS gates.
This was referenced Nov 20, 2026
This was referenced Nov 20, 2026
fix(files): accept rendered read output in edits and resolve indirect PDF lengths (#939, #788)
#1005
Closed
Thatgfsj
added a commit
that referenced
this pull request
Nov 20, 2026
#1002 adds shells-full-access-confinement, shells-msys-shared-section and shells-niubash-prepared-boundary; all three pin the Windows Niubash runtime branch and skip elsewhere, but the gate's per-platform allow-list did not name them, so the four POSIX legs reported them as disallowed skips (and DSH_OPS_REQUIRE_RUNTIME=1 turned each into a suite failure). Name them beside windows-security, niubash-consumer and niubash-security-host. Refs #1032, #1033.
WeiLinCool
pushed a commit
to WeiLinCool/dsh-ops
that referenced
this pull request
Nov 20, 2026
-T-Auto#1008 Merge release/ops-ptc-18-cards on top of the seven fix branches and reconcile the surfaces both sides rewrote: - docs/CHANGELOG.md: union of both sides' Unreleased entries (no duplicates). - src/publication/ptc.ts: keep the release's surface-aware teaching renderer and four-verdict refusal, port T-Auto#1008's T-Auto#929 ephemeral lesson channel and T-Auto#968's deferred loader pointer into it, and drop the P7 step-tail provider plus the compaction re-anchor that depended on logged history (superseded by the ephemeral channel; see T-Auto#929/T-Auto#998). - src/publication/replacements.ts: keep both the T-Auto#962 per-agent fail-open latch and the release's hidden-name system-prompt retirement. - src/publication/registrar.ts, src/consumer/mount.ts: union of the deferred advisor loop, the revoked verdict and the PTC keepOfficial handoff. - tests: adapt the tier enumerations, the cost ledger and the teaching assertions to the merged surface (the T-Auto#753 ops_status diagnostics row and the ephemeral lesson channel), keeping one assertion per unchanged behaviour. - docs: point the batching-guidance descriptions at the ephemeral inbox. Refs T-Auto#1000, T-Auto#1032.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #870, #409, #581
Refs #958, #828, #771
What was wrong
DSH_HOMEinside a home workspace, both containment checks inprepareNiubashevaluated true, so every Niubash Bash call was refused; default configurations were unusable in full access.#!/usr/bin/envhooks, Windows Terminal console flash, Defender quarantine) that this repository cannot fix; they get diagnostics with the observed comparisons separated from upstream inferences.The change
src/niubash/runtime.ts:prepareNiubashtakes the session mode; the prepared-root containment refusal is armed only in confined modes. Full access runs unconfined, so the boundary guarded no remaining channel there. Restricted modes keep refusing.src/shells/session-execution.ts: passespolicy.modeto the preparation.src/shells/*classification: the MSYS shared-section startup failure maps toEXECUTOR_UNAVAILABLEwithsandbox.runnerFailed.niubash-workspace-mode,shells-niubash-prepared-boundary,shells-msys-shared-section,shells-full-access-confinement; existingniubash-preparation18/18 stays green.Local validation:
shells-session6/6,niubash-security-host11/11,niubash-preparation18/18,shells-full-access-confinement1/1,shells-msys-shared-section1/1,niubash-workspace-mode1/1;npm run check:size826 files, all ≤1000 lines.Validation
The gate lines above were produced on the local integration head
b21274dd(all slices merged) with the pinned local fixtures:DSH_OPS_TEST_BASH= a verified pinned MSYS bash (sha256 6cc575e9…),DSH_OPS_NIUBASH_ARCHIVE= the shipped frozen archive. Each PR branch was also built and its own suites were run before push; the counts below are from those runs.CI required run: the pull_request event for this PR triggers
ci.yml; paste the aggregateCI requiredrun URL here once it finishes.Environment
maincommit58f6e281(origin/main at submission)npm ci --ignore-scripts --offline,npm run build,npm run stage:niubash -- --offline --archive <frozen archive>)