Stop --chdir from binding the working directory read-write

This commit is contained in:
2026-11-17 20:37:01 +01:00
parent 352ead2bf5
commit 4b801f811e
8 changed files with 72 additions and 21 deletions
+3
View File
@@ -66,11 +66,14 @@ impl Sandbox {
fn build(prefix: &[&str], extra_args: &[&str], guard: Option<HostGlobsGuard>) -> Self {
let mut cmd = Command::new(env!("CARGO_BIN_EXE_agent-sandbox"));
cmd.args(prefix);
cmd.args(LAUNCH_DIR_WRITABLE);
cmd.args(extra_args);
Self { cmd, _guard: guard }
}
}
const LAUNCH_DIR_WRITABLE: [&str; 2] = ["--rw", "."];
fn scan_guard_for(extra_args: &[&str]) -> Option<HostGlobsGuard> {
extra_args
.contains(&"--blacklist")