Skip to content

Commit 37ffceb

Browse files
dvdksnclaude
andcommitted
sbx: document OS-specific filesystem rule paths
Filesystem rule examples only showed POSIX paths and never explained that rules match the path format of the developer's OS. Add Windows drive-letter and backslash syntax (including the *: any-drive wildcard), note WSL support, and call out that a multi-platform policy needs a rule per path format. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7b4c887 commit 37ffceb

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

content/manuals/ai/sandboxes/governance/concepts.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,40 @@ Both IPv4 and IPv6 notation are supported: `10.0.0.0/8`, `192.168.1.0/24`,
7878
### Filesystem rules
7979

8080
Filesystem rules use the actions `read` and `write`. Resources are host paths
81-
that sandboxes can mount as workspaces.
81+
that sandboxes can mount as workspaces. Write each path in the format used by
82+
the member's operating system. A rule only applies to members whose machines
83+
use that format, so cover every platform your members use.
84+
85+
**Path formats**
86+
87+
| Operating system | Example path | Home directory rule |
88+
| ---------------- | ----------------------------------------- | ----------------------------------------- |
89+
| macOS | `/Users/<name>/projects/**` | `~/**` |
90+
| Linux | `/home/<name>/projects/**` | `~/**` |
91+
| Windows | `C:\Users\<name>\projects\**` | `*:\Users\**` |
92+
| WSL | `\\wsl.localhost\<distro>\home\<name>\**` | `\\wsl.localhost\<distro>\home\<name>\**` |
93+
94+
On macOS and Linux, `~` expands to the member's home directory, so `~/**`
95+
matches each member's home tree without naming the user. Windows has no `~`
96+
shorthand: use `*` for the segments that vary between members, where `*:`
97+
matches any drive letter. So `*:\Users\**` matches any user's home directory on
98+
any drive. WSL paths are reached from the Windows host through the
99+
`\\wsl.localhost\<distro>` share. To allow a location for members on more than
100+
one platform, add a separate rule for each format.
101+
102+
**Wildcards**
103+
104+
Wildcards behave the same way in every path format:
82105

83106
| Pattern | Example | Matches |
84107
| ------------------ | ---------- | ---------------------------------------------------------- |
85108
| Exact path | `/data` | `/data` only |
86109
| Segment wildcard | `/data/*` | `/data/project`, one path segment only, not subdirectories |
87110
| Recursive wildcard | `/data/**` | `/data/project`, `/data/project/src`, any depth |
88111

89-
Use `**` when you intend to match a directory tree recursively. A single `*`
90-
only matches within one path segment and won't cross directory boundaries.
91-
For example, `~/**` matches all paths under the home directory, while `~/*`
92-
matches only direct children of `~`.
112+
Use `**` to match a directory tree recursively. A single `*` matches within one
113+
path segment and won't cross a path separator. For example, `~/**` matches all
114+
paths under the home directory, while `~/*` matches only its direct children.
93115

94116
## Rule evaluation
95117

0 commit comments

Comments
 (0)