From 6c1dc96af6340daff885b0e2a35011ba74a19936 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Wed, 9 Sep 2026 19:09:22 -0600 Subject: [PATCH] Stop Debug-formatting credentials in fabro-auth resolve tests Three test panics printed the resolved `Credentials` value with `{:?}`. The lithos credential types redact secrets in their Debug output, but CodeQL's cleartext-logging rule cannot see that and flagged each site. The variant name is enough to diagnose a failing test, so drop the value. Co-Authored-By: Claude Fable 5.1 --- lib/foundation/fabro-auth/src/resolve.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/foundation/fabro-auth/src/resolve.rs b/lib/foundation/fabro-auth/src/resolve.rs index 3e8f2e5f9..a089af5c7 100644 --- a/lib/foundation/fabro-auth/src/resolve.rs +++ b/lib/foundation/fabro-auth/src/resolve.rs @@ -559,7 +559,7 @@ mod tests { auth: HttpAuthentication::Bearer(secret), .. }) => secret.expose_secret(), - other => panic!("expected bearer credentials, got {other:?}"), + _ => panic!("expected bearer credentials"), } } @@ -622,7 +622,7 @@ mod tests { assert_eq!(header.name, "x-api-key"); assert_eq!(header.value.expose_secret(), "anthropic-key"); } - other => panic!("expected header credentials, got {other:?}"), + _ => panic!("expected header credentials"), } } @@ -724,7 +724,7 @@ mod tests { let credentials = resolver.resolve(modal).await.unwrap(); match &credentials { Credentials::Http(http) => assert!(matches!(http.auth, HttpAuthentication::None)), - other => panic!("expected header-only credentials, got {other:?}"), + _ => panic!("expected header-only credentials"), } assert_eq!(header_value(&credentials, "Modal-Key"), Some("wk-test")); assert_eq!(header_value(&credentials, "Modal-Secret"), Some("ws-test"));