Skip to content

[Fix] runtime: redact sensitive fields in debug HTTP logs#44

Merged
samzong merged 1 commit into
mainfrom
fix/runtime-debug-redact-sensitive
Jun 4, 2026
Merged

[Fix] runtime: redact sensitive fields in debug HTTP logs#44
samzong merged 1 commit into
mainfrom
fix/runtime-debug-redact-sensitive

Conversation

@samzong

@samzong samzong commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

What's changed?

  • Extend debug transport logging to redact sensitive request/response headers beyond Authorization (cookies, API keys, token-like header names).
  • Redact sensitive fields in JSON and form-like text bodies before dumping debug output.
  • Add tests ensuring secrets do not appear on stderr while non-sensitive fields remain visible.

Why

  • Debug mode is meant for troubleshooting, but it must not leak credentials into logs or agent-visible stderr output.

Extend debug transport logging to mask sensitive headers and body
fields (JSON and form-like text), not only Authorization. Add tests
that assert tokens, cookies, and API keys never appear on stderr.

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong

samzong commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@samzong samzong merged commit 1b33711 into main Jun 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant