From c0d204810d0c537f9daed3c6de87d05bfbd16aac Mon Sep 17 00:00:00 2001 From: handnewb Date: Tue, 28 Jul 2026 14:13:34 -0300 Subject: [PATCH] fix(gateway): redact secrets in background process completion output _output passes through redact_terminal_output (force=False) but not _redact_gateway_user_facing_secrets (force=True). When security.redact_secrets is disabled or the command is not an env-dump, the output can leak credentials (Authorization: Bearer, PGPASSWORD=, etc.) into the session transcript and chat platforms. Add the same redaction gate applied to _command so both paths are protected by force=True + _GATEWAY_SECRET_PATTERNS. --- gateway/run.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gateway/run.py b/gateway/run.py index 47d476d891c1d..3132e1d037b26 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -24097,6 +24097,7 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew _out = f"[… output truncated — showing last {len(_tail)} chars]\n{_tail}" else: _out = _raw + _out = _redact_gateway_user_facing_secrets(_out) completion_evt = { "type": "completion", "session_id": session_id,