Skip to content

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

fix(profiles): validate profile id from profile dir in sandbox policy

Steven Enamakel2751317fc47c
diff --git a/crates/openhuman-core/src/profiles/tools.rs b/crates/openhuman-core/src/profiles/tools.rs
index 94e59e9f00..4c0138acdd 100644
--- a/crates/openhuman-core/src/profiles/tools.rs
+++ b/crates/openhuman-core/src/profiles/tools.rs
@@ -210,7 +210,7 @@ pub fn sandbox_policy_with(
let users = super::layout::users_dir(saas_root);
let profile_dir = action_dir.parent();
let is_user_sandbox = profile_dir.and_then(Path::parent) == Some(users.as_path())
- && agent_dir
+ && profile_dir
.and_then(Path::file_name)
.and_then(|name| name.to_str())
.is_some_and(|name| super::types::ProfileId::parse(name).is_ok())