From b49a45c5d0a5d5d2f0d4744d0ff40f6dac793249 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Tue, 17 Nov 2026 16:52:26 -0500 Subject: [PATCH] sandbox: Clarify which overlapping read paths are rejected --- crates/sandbox/src/sandbox.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/sandbox/src/sandbox.rs b/crates/sandbox/src/sandbox.rs index 1edf1c8f38b..47297026354 100644 --- a/crates/sandbox/src/sandbox.rs +++ b/crates/sandbox/src/sandbox.rs @@ -127,8 +127,8 @@ pub enum SandboxFsPolicy { paths_disallowing_reads: Vec, paths_allowing_reads: Vec, }, - /// Reads are allowed everywhere except paths disallowing reads; writes are confined to - /// these locations (and the standard ephemeral locations the platform + /// Reads are allowed everywhere except paths disallowing reads; writes are + /// confined to these locations (and the standard ephemeral locations the platform /// provides). Each is a [`HostFilesystemLocation`] captured at validation /// time, never a bare path the enforcement layer would re-resolve. Restricted { @@ -786,8 +786,8 @@ impl Sandbox { /// reads, Unix socket grants, /// or TCP port grants, because those backends cannot enforce them yet. /// Returns [`SandboxError::InvalidRequest`] for a malformed policy, such as - /// a writable path inside a protected path, a path disallowing reads - /// inside a path allowing reads, or TCP port 0. + /// a writable path inside a protected path, a path disallowing reads that + /// is also, or lies inside, a path allowing reads, or TCP port 0. pub fn new(policy: SandboxPolicy) -> Result { let ( allow_fs_write,