fix: sandbox write fails for existing subdirectories (mkdirp boundary check)#30610
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 1, 2026
Merged
fix: sandbox write fails for existing subdirectories (mkdirp boundary check)#30610steipete merged 2 commits intoopenclaw:mainfrom
steipete merged 2 commits intoopenclaw:mainfrom
Conversation
Contributor
Greptile SummaryThis PR fixes a regression from recent security hardening where Key Changes:
Security Impact: Confidence Score: 5/5
Last reviewed commit: a41a812 |
18 tasks
a41a812 to
17cccc2
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @glitch418x! |
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
hughdidit
pushed a commit
to hughdidit/DAISy-Agency
that referenced
this pull request
Mar 3, 2026
…glitch418x) (cherry picked from commit 3be1343) # Conflicts: # CHANGELOG.md # src/agents/sandbox/fs-bridge.test.ts # src/agents/sandbox/fs-bridge.ts # src/infra/boundary-file-read.ts # src/infra/safe-open-sync.test.ts # src/infra/safe-open-sync.ts
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
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.
Problem
The write tool fails in sandbox mode when creating files in subdirectories:
Regression from 2026.2.26 security hardening. The
mkdirpcall passes a directory path throughopenVerifiedFileSyncwhich only accepts files (isFile()check).Root Cause
createSandboxWriteOperations.mkdir→bridge.mkdirp→assertPathSafety→openBoundaryFile→openVerifiedFileSync:Directories fail the
isFile()check, returningreason: "validation", which causes the boundary check to throw.Fix
safe-open-sync.ts: Accept directories when a newallowDirectoryoption is setboundary-file-read.ts: PassallowDirectorythrough to the safe-open layerfs-bridge.ts: SetallowDirectory: truewhen calling boundary check frommkdirpTesting
Fixes #30582