Skip to content

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

fix(security): ignore heredoc bodies when detecting hidden execution

Steven Enamakelf6239a5bb0ac
diff --git a/crates/openhuman-core/src/security/policy/command_checks.rs b/crates/openhuman-core/src/security/policy/command_checks.rs
index 60663023f1..b8de0e25b3 100644
--- a/crates/openhuman-core/src/security/policy/command_checks.rs
+++ b/crates/openhuman-core/src/security/policy/command_checks.rs
@@ -81,6 +81,7 @@ fn contains_unquoted_single_ampersand(command: &str) -> bool {
#[cfg(test)]
fn has_hidden_execution(command: &str) -> bool {
+ let command = strip_quoted_heredoc_bodies(command);
["$(", "<(", ">("]
.iter()
.any(|needle| command.contains(needle))