diff --git a/crates/terminal/src/sandbox_exec.rs b/crates/terminal/src/sandbox_exec.rs index ba9b94cf6bb2833bd0be8e327418deda44a7866b..dac19381f4361663e9e3d69f3cf0e18b371e83a2 100644 --- a/crates/terminal/src/sandbox_exec.rs +++ b/crates/terminal/src/sandbox_exec.rs @@ -112,7 +112,9 @@ impl SandboxExecConfig { /// Serialize the config to a JSON string for passing via CLI arg. pub fn to_json(&self) -> String { - serde_json::to_string(self).expect("failed to serialize sandbox config") + // This type is a flat struct of Strings, Vec, and bool — no + // cycles or non-serializable types — so serialization cannot fail. + serde_json::to_string(self).expect("SandboxExecConfig is non-cyclic") } /// Deserialize a config from a JSON string.