Skip to content

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

fix(security): pass command by reference in hidden execution check

Steven Enamakel58aedf438251
diff --git a/crates/openhuman-core/src/security/policy/command_checks.rs b/crates/openhuman-core/src/security/policy/command_checks.rs
index b8de0e25b3..a607530b18 100644
--- a/crates/openhuman-core/src/security/policy/command_checks.rs
+++ b/crates/openhuman-core/src/security/policy/command_checks.rs
@@ -85,8 +85,8 @@ fn has_hidden_execution(command: &str) -> bool {
["$(", "<(", ">("]
.iter()
.any(|needle| command.contains(needle))
- || contains_unquoted_char(command, '`')
- || contains_unquoted_single_ampersand(command)
+ || contains_unquoted_char(&command, '`')
+ || contains_unquoted_single_ampersand(&command)
}
#[cfg(test)]