Skip to content

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

test(config): cover credentials in debug redaction

Steven Enamakel2da1918be37a
diff --git a/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs b/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs
index 46de5ee193..9cf9eb5f98 100644
--- a/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs
+++ b/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs
@@ -185,11 +185,15 @@ fn the_route_cannot_be_serialized_into_a_config_file() {
#[test]
fn debug_never_discloses_route_bearer_or_header_values() {
let route = EphemeralRoute {
- endpoint: "https://fixture.example/v1".into(),
+ endpoint: "https://route-user:[email protected]/v1?key=route-query-secret#route-fragment-secret".into(),
api_key: "u2-unique-route-secret".into(),
headers: vec![("x-private".into(), "u2-unique-header-secret".into())],
};
let debug = format!("{route:?}");
assert!(!debug.contains("u2-unique-route-secret"));
assert!(!debug.contains("u2-unique-header-secret"));
+ assert!(!debug.contains("route-user"));
+ assert!(!debug.contains("route-password"));
+ assert!(!debug.contains("route-query-secret"));
+ assert!(!debug.contains("route-fragment-secret"));
}