LOG_FULL egress logging captures injected Authorization and unredacted bodies #257
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
_log_request(bot_bottle/egress_addon.py:123) serializesdict(flow.request.headers). Inrequest()the sidecar injects the upstreamauthorizationheader at line 219 before theLOG_FULLlogging at line 221-222, so the sidecar-owned upstream token is written to stderr.Additionally, request/response bodies in
_log_request/_log_responseare logged viaget_text(...)without passing throughredact_tokens— onlyhostandpathare redacted (contrast_req_ctx, which does redact). So known secret values in bodies are logged verbatim under LOG_FULL.Chained with the validate/runtime parser mismatch issue, an agent can both enable LOG_FULL (via a proposed
log: 2) and cause secret capture into the egress log.Fix: in the full-log path, redact headers and body through
redact_tokens, and never emit the injectedAuthorizationheader.Filed from a security audit of the TLS-interception egress path and git-gate credential handling (follow-up to the
prd-0054-install-scriptquality-eval review). The core controls — default-deny, per-bottle CA, sidecar credential isolation — were confirmed sound; these are residual hardening gaps.