Skip to content

The agent that grows with you

fix(redact): GCS and Azure SAS signatures count as URL credentials

John Paul Solivacf94e3eea31e
diff --git a/agent/redact.py b/agent/redact.py
index 4e3c377813f..621236e4079 100644
--- a/agent/redact.py
+++ b/agent/redact.py
@@ -83,6 +83,7 @@ _SENSITIVE_QUERY_PARAMS = frozenset({
"access_token", "refresh_token", "id_token", "token", "api_key", "apikey",
"client_secret", "password", "auth", "jwt", "session", "secret", "key",
"code", "signature", "x-amz-signature",
+ "x-goog-signature", "sig", # GCS V4 signed URLs, Azure SAS tokens
})
# Snapshot at import time so runtime env mutations (e.g. an LLM-generated
diff --git a/tests/hermes_cli/test_debug.py b/tests/hermes_cli/test_debug.py
index 7dae2a18d59..4c82763d246 100644
--- a/tests/hermes_cli/test_debug.py
+++ b/tests/hermes_cli/test_debug.py
@@ -439,6 +439,8 @@ class TestRunDebugShareRedaction:
"https://user:{s}@backup.example/v1",
"https://backup.example/v1?key={s}",
"https://backup.example/v1?X-Amz-Signature={s}",
+ "https://backup.example/v1?X-Goog-Signature={s}",
+ "https://backup.example/v1?sv=2024-11-04&sig={s}",
"https://backup.example/v1#access_token={s}&view=public",
])
def test_fallback_base_url_credential_never_reaches_upload_bound_content(self, hermes_home_with_secret, base_url):