Repository navigation
Let a caller mark a path entry literal: { path, literal: true } - #621
Merged
Merged
Conversation
`denyRead`, `allowRead`, `allowWrite` and `denyWrite` take
`{ path, literal: true }` beside a string. Such an entry is a path and
never a pattern, whether or not it exists, so it can name a file in a
folder whose name holds `[`, `*` or `?`, or one that is not there yet.
Marked paths travel beside the spellings, in `literal...` lists on the
read and write restriction configs, so no backend reads their characters
again. The Linux wrapper folds those lists in once and takes every path
it is handed for a name, which an eslint rule holds; macOS compiles a
marked path to a subpath filter; Windows takes it down its literal branch
and skips one that holds `*` or `?`. `writeRootsOf()` is exported for
whoever asks what a command may write.
This was referenced Sep 28, 2026
This was referenced Sep 29, 2026
Closed
`resolveReadPathEntries` is main's generator over this branch's list of
entries, and both deny expansions keep `spelledOf(...)` inside main's
`finish()` and `walked()`, with `{ listings }`.
Merged
ronleizrowice-ant
added a commit
that referenced
this pull request
Oct 4, 2026
This was referenced Oct 20, 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.
Second of three stacked pull requests that replace #608; base: #620, the
anchorone. Then #622. The third expresses the paths it finds as marked entries, so this goes first.What
denyRead,allowRead,allowWriteanddenyWritetake{ "path": "...", "literal": true }beside a string: a path, never a pattern, whether or not it exists.FilesystemPathEntryis exported.getFsReadConfig()andgetFsWriteConfig()carry marked entries in fourliteral...lists, andwriteRootsOf()is exported for whoever asks what a command may write. The Linux wrapper folds those lists in and takes every path for a name; an eslint rule holds that.Behaviour changes
initialize();wrapWithSandbox()and both getters then throwTypeError.wrapCommandWithSandboxLinux()drops a direct caller'sallowOnlystring with*?[]when nothing is at that spelling: as a name,/home/*/../.sshwould fold to/home/.ssh.Tests
Real bubblewrap runs on Linux, both runtimes. macOS is profile text compared on Linux: nothing ran under
sandbox-exec.expandWindowsFsPathsruns on Linux; one Windows-only case was only read. 28 mutations, 27 caught; the survivor is equivalent.Merge order
Conflicts with #569, #574, #575, #607, #581. #594 and #595 merge clean but read
allowOnlyalone (hostHelperWritePaths(),ownInstallWarning()): they must readwriteRootsOf(). So must the monitor lines #569 and #574 add.