Skip to content

fix(ws): redact credentials from lifecycle logs - #150

Open
logarithmone1128 wants to merge 1 commit into
larksuite:v2_mainfrom
logarithmone1128:fix/redact-ws-lifecycle-credentials
Open

fix(ws): redact credentials from lifecycle logs#150
logarithmone1128 wants to merge 1 commit into
larksuite:v2_mainfrom
logarithmone1128:fix/redact-ws-lifecycle-credentials

Conversation

@logarithmone1128

Copy link
Copy Markdown

Problem

WebSocket connection and disconnection INFO logs currently include the complete connection URL, exposing access_key and ticket query values.

Change

  • Redact only the values of access_key and ticket before formatting lifecycle logs.
  • Preserve non-sensitive endpoint and query context, ordering, repeated parameters, percent-encoded keys, empty/value-less parameters, and fragments.
  • Keep the original URL unchanged for connection state and websockets.connect().
  • Add regression coverage for the URL sanitizer and both lifecycle log paths.

Verification

  • WebSocket suite: 15 passed
  • Configured default suite: 658 passed
  • git diff --check

Fixes #141

@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

Redact access_key and ticket from WebSocket lifecycle INFO logs

2 participants