Skip to content

Commit e7ef0fc

Browse files
authored
Add Windows filepath behavior clarifications (#666)
* Update schema.md with Windows path grants information Added sections on path grants and upward directory traversal in Windows to clarify access behavior. * Update Windows path grants and traversal documentation Clarify path grant behavior and upward directory traversal in Windows. * Revise Windows BaseContainer documentation sections Updated section headers for clarity and consistency regarding Windows BaseContainer. Adjusted wording to enhance understanding of path grants and upward directory traversal. * Update schema.md Addressing feedback on overpermissioning.
1 parent 5d25d1b commit e7ef0fc

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

docs/schema.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,23 @@ containment tier selected at runtime:
150150
runs sharing the same `containerId` can revoke each other's ACEs — use distinct
151151
`containerId` values for parallel runs.
152152

153+
#### Path grants and root directories for Windows BaseContainer
154+
155+
For Windows BaseContainer, a path grant in `readwritePaths` applies to that directory
156+
and its descendants with the exception of root directories. Granting access to a
157+
**volume root** (e.g. `C:\`) does **not** cascade to its child folders to prevent over-provisioning.
158+
159+
For example, `"readwritePaths": ["C:\\"]` does **not** grant access to files
160+
under `C:\data`.
161+
162+
#### Upward directory traversal for Windows BaseContainer
163+
164+
Many tools search **upward** from the working directory toward the volume root,
165+
looking for a marker file that defines their project. With Windows BaseContainer, when such a tool reaches a parent directory that is not in the allowlist, `ACCESS_DENIED` will be returned.
166+
167+
When resolving this error, grant only the specific directories the tool must reach and keep that set as small as possible.
168+
Avoid resolving this error by granting broad profile roots. Each 'readwritePaths' grant also exposes that directory's descendants and granting broad profile roots may result in over-permissioning.
169+
153170
### UI Policy
154171

155172
The `ui` section is the cross-platform UI-restriction policy. Every field is
@@ -320,4 +337,4 @@ changes require a major bump.
320337
| 0.3.0-alpha | Initial versioned schema. Added `process`, `lifecycle`, `containerId`, `wslc` alias. Dual-read fallbacks for legacy fields. |
321338
| 0.4.0-alpha | Removed legacy fields (`script`, `workingDirectory`, `processContainer.name`, etc.). `process` section now required. |
322339

323-
See the `tests/examples/` directory for complete configuration examples.
340+
See the `tests/examples/` directory for complete configuration examples.

0 commit comments

Comments
 (0)