Skip to content

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

test: remove redundant oauth and policy injection test cases

Steven Enamakeldf4fa922f6ce
diff --git a/crates/openhuman-core/src/security/credentials/openai_oauth/flow_tests_lifecycle_tests.rs b/crates/openhuman-core/src/security/credentials/openai_oauth/flow_tests_lifecycle_tests.rs
index a4dc977389..c1d7e7a64b 100644
--- a/crates/openhuman-core/src/security/credentials/openai_oauth/flow_tests_lifecycle_tests.rs
+++ b/crates/openhuman-core/src/security/credentials/openai_oauth/flow_tests_lifecycle_tests.rs
@@ -47,14 +47,6 @@ fn build_authorize_url_includes_codex_pkce_and_extra_params() {
assert_eq!(pairs.get("prompt").map(String::as_str), Some("consent"));
}
-#[test]
-fn parse_callback_input_accepts_full_redirect_url() {
- let url = "http://127.0.0.1:1455/auth/callback?code=abc&state=xyz";
- let (code, state) = parse_callback_input(url).unwrap();
- assert_eq!(code, "abc");
- assert_eq!(state, "xyz");
-}
-
#[test]
fn parse_callback_input_accepts_raw_query_string() {
let (code, state) = parse_callback_input("code=abc%20123&state=xyz").unwrap();
@@ -62,23 +54,10 @@ fn parse_callback_input_accepts_raw_query_string() {
assert_eq!(state, "xyz");
}
-#[test]
-fn parse_callback_input_rejects_missing_code() {
- let err = parse_callback_input("http://127.0.0.1:1455/auth/callback?state=xyz").unwrap_err();
- assert!(err.contains("code"));
-}
-
#[test]
fn parse_callback_input_rejects_blank_invalid_and_missing_state() {
let blank = parse_callback_input(" ").unwrap_err();
assert!(blank.contains("required"));
-
- let invalid = parse_callback_input("not-a-callback").unwrap_err();
- assert!(invalid.contains("invalid"));
-
- let missing_state =
- parse_callback_input("http://127.0.0.1:1455/auth/callback?code=abc").unwrap_err();
- assert!(missing_state.contains("state"));
}
#[test]
diff --git a/crates/openhuman-core/src/security/policy/policy_injection_tests.rs b/crates/openhuman-core/src/security/policy/policy_injection_tests.rs
index c11f7df924..cb93621e0e 100644
--- a/crates/openhuman-core/src/security/policy/policy_injection_tests.rs
+++ b/crates/openhuman-core/src/security/policy/policy_injection_tests.rs
@@ -16,13 +16,6 @@ fn command_injection_redirect_blocked() {
assert!(!p.is_command_allowed("ls >> /tmp/exfil.txt"));
}
-#[test]
-fn quoted_ampersand_and_redirect_literals_are_not_treated_as_operators() {
- let p = default_policy();
- assert!(p.is_command_allowed("echo \"A&B\""));
- assert!(p.is_command_allowed("echo \"A>B\""));
-}
-
#[test]
fn command_argument_injection_blocked() {
let p = default_policy();
@@ -160,13 +153,6 @@ fn command_injection_tee_blocked() {
assert!(!p.is_command_allowed("tee file.txt"));
}
-#[test]
-fn command_injection_process_substitution_blocked() {
- let p = default_policy();
- assert!(!p.is_command_allowed("cat <(echo pwned)"));
- assert!(!p.is_command_allowed("ls >(cat /etc/passwd)"));
-}
-
#[test]
fn command_env_var_prefix_is_always_rejected() {
let p = default_policy();