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.
This commit is contained in:
parent
668396c2e1
commit
c0d204810d
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue