Replies: 2 comments 1 reply
|
Confirmed at source level against master
Timeline: the label write arrived in One refinement to the "precondition without a fallback" framing: a no-label fallback is not safe by itself. The runner lowers the sandboxed token to Low integrity ( What would actually help: split the combined call (DACL first, label second — or preflight the desired access before touching anything), so the failure names the missing right and the remediation ( |
Your case is the one where the unelevated one-liner works — and the same error also covers the one where it cannot runkittimzhe's analysis above is right, and it matches what I read at master Your workspace is the environment where the cheap fix applies: What now delivers that, in the failing result rather than in a README
New in 0.5.0 (published today) — the remedy now forks on ownership, because this identical error also covers a directory the caller does not own (#7771: owner The advisory also carries two facts the error cannot: the version boundary (the label half arrives at Scope: a stopgap, not a fix. The plugin never edits an ACL and never elevates; the upstream gap — a failure naming neither the missing right nor a remedy, under a precondition that is not pre-flighted — is still open in
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
On Windows, after upgrading 0.1.5-rc.3 → 0.1.7-rc.2, every shell command fails before it
runs, and the
workflowtool dies with the same error:The workspace is an ordinary directory: owned by the user, whose
Modifycomes from aninherited
Authenticated UsersACE. Inherited Modify does not includeWRITE_OWNER, and0.1.7's
grantWritenow needs it — it writes a Low mandatory label into the object's SACL. Onemissing right aborts the whole grant, so the sandbox never comes up and the command never starts.
Giving the workspace
WRITE_OWNERfixes it completely, which is why this looks like aprecondition that was added without a fallback rather than a fundamental design problem.
Environment
@deepseek-ai/dsh0.1.7-rc.2 (npm tagnext), profileweb, file policyworkspace-write(default)D:\develop\dshon an NTFS data volumeReproduction
dsh webon Windows with the defaultworkspace-writepolicy.pwshcommand (evenpwd).SetNamedSecurityInfoW failed (Win32 5): grantWrite(<workspace>).workflowfails with the worker exiting on the same error.read/write/edit/glob/grep,subagent,web_fetch/web_searchall work. Only the paths that confine a child process break.What was measured
Workspace DACL (
icacls D:\develop\dsh):Note what is missing: there is no
Mandatory Labelline, i.e. the Low label was never applied,and no explicit
WRITE_OWNERfor the user. The inherited Modify ACE carries the(I)flag, so itcomes from a parent (on this machine the data volume's default permissions).
Isolation, same non-elevated token, scratch directory:
icacls <dir> /setintegritylevel LowAccess is denied, exit 5icacls <dir> /grant "*S-1-5-11:(W)"(DACL only)icacls <dir> /grant "<user>:(WO)"then/setintegritylevel LowMandatory Label\Low Mandatory Level:(NW)appearsSo the DACL edit is permitted and only the label edit is refused — which is exactly the merge that
grantWriteperforms in oneSetNamedSecurityInfoWcall.After granting
WRITE_OWNER, everything recovers:Root cause
dsh-sandbox-windows-acl,grantWrite()merges three edits into a singleSetNamedSecurityInfoW(path, 1, SecurityInfo, null, null, dacl, label)call whereSecurityInfo = 20(DACL_SECURITY_INFORMATION | LABEL_SECURITY_INFORMATION). The package's owncomment states the precondition (
lib/types-DxezulnA.js, abovegrantWrite):"Owned by the caller plus inherited Modify" is not enough, and that combination is common:
a directory created by another tool, or one inheriting the data volume's default ACL, looks
perfectly writable to the user and still fails this precondition.
This is a regression from the 0.1.7 sandbox hardening ("fix Windows sandbox deletions escaping
the authorized directory", 0.1.7-alpha.1): 0.1.5-rc.3 wrote the DACL only. The leftover capability
ACE in the DACL above, with no matching label, is the fossil of a successful old-style grant —
which is why the same machine worked before the upgrade.
Suggested fixes
Win32 5ongrantWrite(<path>)gives a user no way to knowthat
WRITE_OWNERis the missing right. Naming the right and the path (and that the sandboxtherefore cannot start) would have saved a long diagnosis.
WRITE_OWNERis unavailable, applying the DACL without thelabel still yields a working sandbox, exactly as 0.1.5-rc.3 did. Losing one hardening measure
is strictly better than losing every command.
WRITE_OWNER(WRITE_DACisowner-implicit), so
grantWritecould add the missing ACE before applying the label — no adminrights needed, as the workaround below shows.
the user Full control, or at least
WRITE_OWNER.Workaround (applied locally)
No elevation required. After this, the default
workspace-writepolicy works again and DSH appliesits Low label itself. It has to be repeated for every workspace whose Modify is inherited, and
again after an ACL reset (e.g. a fresh clone or a restored directory).
Related
.docxattachment and its two comments only cover the subagent-model request. Mentioning it incase maintainers know whether it describes this same precondition — if so these could be merged.
Happy to test a patch on this machine (0.1.7-rc.2, PowerShell 5.1, secondary NTFS volume) — the
failure reproduces every time.
All reactions