mirror of
https://github.com/openai/codex.git
synced 2026-05-04 03:16:31 +00:00
fix(execpolicy) Dangerous commands in full-access
This commit is contained in:
@@ -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
|
||||
/// read‑only even when the root is writable. This is primarily used to ensure
|
||||
/// that folders containing files that could be modified to escalate the
|
||||
|
||||
Reference in New Issue
Block a user