Skip to content

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

test(auth): restrict temp workspace permissions on unix

Steven Enamakel4b56ef344405
diff --git a/crates/openhuman-rpc/src/server/auth_tests.rs b/crates/openhuman-rpc/src/server/auth_tests.rs
index 116619cb47..ca8699dcee 100644
--- a/crates/openhuman-rpc/src/server/auth_tests.rs
+++ b/crates/openhuman-rpc/src/server/auth_tests.rs
@@ -97,6 +97,12 @@ fn verify_external_inference_bearer_for_config_accepts_stored_key() {
}
}
let tmp = tempfile::tempdir().unwrap();
+ #[cfg(unix)]
+ {
+ use std::os::unix::fs::PermissionsExt;
+ std::fs::set_permissions(tmp.path(), std::fs::Permissions::from_mode(0o700))
+ .expect("make test workspace private");
+ }
let _key = FixtureKey {
key: std::env::var_os("OPENHUMAN_KEYRING_MASTER_KEY"),
file: std::env::var_os("OPENHUMAN_KEYRING_MASTER_KEY_FILE"),