fix(execpolicy) Dangerous commands in full-access

This commit is contained in:
Dylan Hurd
2026-02-02 23:38:08 -08:00
parent a90ff831e7
commit e7abb24d78
2 changed files with 30 additions and 3 deletions

View File

@@ -416,6 +416,15 @@ pub enum SandboxPolicy {
},
}
impl SandboxPolicy {
pub fn expects_enforcement(&self) -> bool {
matches!(
self,
SandboxPolicy::ReadOnly | SandboxPolicy::WorkspaceWrite { .. }
)
}
}
/// A writable root path accompanied by a list of subpaths that should remain
/// readonly even when the root is writable. This is primarily used to ensure
/// that folders containing files that could be modified to escalate the