Skip to content

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

test(config): cover debug redaction of route and search secrets

Steven Enamakel73408c3aca55
diff --git a/Cargo.lock b/Cargo.lock
index 7858c641c3..47d48b3216 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7076,7 +7076,7 @@ dependencies = [
[[package]]
name = "tinymcp"
-version = "0.9.0"
+version = "0.10.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7105,7 +7105,7 @@ dependencies = [
[[package]]
name = "tinymcp-bus"
-version = "0.9.0"
+version = "0.10.0"
dependencies = [
"schemars",
"serde",
@@ -7348,12 +7348,13 @@ dependencies = [
[[package]]
name = "tinywallet"
-version = "0.13.0"
+version = "0.17.0"
dependencies = [
"coins-bip32",
"coins-bip39",
"ed25519-dalek",
"hmac 0.13.0",
+ "rand 0.9.5",
"ripemd 0.2.0",
"sha2 0.11.0",
"sha3 0.12.0",
@@ -7366,7 +7367,7 @@ dependencies = [
[[package]]
name = "tinywallet-bus"
-version = "0.13.0"
+version = "0.17.0"
dependencies = [
"serde",
"serde_json",
@@ -7375,7 +7376,7 @@ dependencies = [
[[package]]
name = "tinywallet-crypto"
-version = "0.13.0"
+version = "0.17.0"
dependencies = [
"async-trait",
"bech32 0.12.0",
@@ -7391,7 +7392,7 @@ dependencies = [
[[package]]
name = "tinywallet-web3"
-version = "0.13.0"
+version = "0.17.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7412,7 +7413,7 @@ dependencies = [
[[package]]
name = "tinywallet-x402"
-version = "0.13.0"
+version = "0.17.0"
dependencies = [
"anyhow",
"async-trait",
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 ea5375a707..46de5ee193 100644
--- a/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs
+++ b/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs
@@ -181,3 +181,15 @@ fn the_route_cannot_be_serialized_into_a_config_file() {
assert!(!encoded.contains("mdl-token"));
assert!(!encoded.contains("ephemeral_route"));
}
+
+#[test]
+fn debug_never_discloses_route_bearer_or_header_values() {
+ let route = EphemeralRoute {
+ endpoint: "https://fixture.example/v1".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"));
+}
diff --git a/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs b/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs
index 9780e5e26e..dddb73ab20 100644
--- a/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs
+++ b/crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs
@@ -373,3 +373,10 @@ fn tinyfish_takes_its_own_key_and_is_never_managed() {
.insert("tinyfish".into(), SearchProviderSettings::managed());
assert_eq!(cfg.route("tinyfish"), SearchRoute::Direct);
}
+
+#[test]
+fn debug_never_discloses_direct_search_credentials() {
+ let mut config = SearchConfig::default();
+ config.exa.api_key = Some("u2-unique-search-secret".into());
+ assert!(!format!("{config:?}").contains("u2-unique-search-secret"));
+}