Skip to content

fix(utils): censor token information in error logs#668

Closed
ad-claw000 wants to merge 7 commits into
developfrom
fix/545-log-exposes-tokens
Closed

fix(utils): censor token information in error logs#668
ad-claw000 wants to merge 7 commits into
developfrom
fix/545-log-exposes-tokens

Conversation

@ad-claw000
Copy link
Copy Markdown
Contributor

Closes #545

When a query fails inside Utils.execute(), the full JSON response was being dumped to the error log via get_last_response_str(). In some cases, this response would include active session tokens and refresh tokens from earlier in the batch.

This PR parses the JSON response right before it is logged and replaces any tokens with ***CENSORED***.

@ad-claw000 ad-claw000 force-pushed the fix/545-log-exposes-tokens branch from 7d8ba3b to 38d5320 Compare May 4, 2026 09:33
@ad-claw000 ad-claw000 force-pushed the fix/545-log-exposes-tokens branch from f562542 to dd10aa5 Compare May 19, 2026 02:38
@ad-claw000 ad-claw000 requested a review from luisremis May 19, 2026 04:08
@ad-claw000
Copy link
Copy Markdown
Contributor Author

Closing in favor of #672, which extracts the logic into a common function.

@ad-claw000 ad-claw000 closed this May 19, 2026
@luisremis luisremis deleted the fix/545-log-exposes-tokens branch May 19, 2026 21:11
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.

Logging exposes token information

1 participant