Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(saas): harden the user shell sandbox — resolve symlinks, case-insensitive host network, finite CPU, refusal not allowed

Steven Enamakel3287489c1cbb
diff --git a/crates/openhuman-core/src/core/runtime/boot_guard_tests.rs b/crates/openhuman-core/src/core/runtime/boot_guard_tests.rs
index fc53576d70..8e4aa5cc5f 100644
--- a/crates/openhuman-core/src/core/runtime/boot_guard_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/boot_guard_tests.rs
@@ -364,3 +364,15 @@ fn a_root_aliasing_the_desktop_install_is_refused() {
);
}
}
+
+#[test]
+fn an_uppercase_host_network_or_an_infinite_cpu_limit_is_refused() {
+ let mut f = fixture();
+ f.config.tool_allowlist = vec!["host_shell".into()];
+ f.config.sandbox.network = "HOST".into();
+ f.config.sandbox.cpu_limit = f64::INFINITY;
+ let mut i = inputs(&f, &[]);
+ i.sandbox_available = true;
+ let found = violations(&i);
+ assert_eq!(found.len(), 2, "{found:?}");
+}