Redact token values from debug logs#51
Conversation
ConnectUserData.toString() now prints <redacted> instead of the raw JWT. StreamToken.toString() returns StreamToken(<redacted>) instead of the raw value. Auth request log in SocketSession now prints byte count instead of the serialized payload. Prevents JWT tokens from appearing in LogCat, crash reports, or monitoring systems.
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe changes implement security enhancements by redacting sensitive token information across three files. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
🚀 Available in v3.0.1 |



Goal
Prevent JWT tokens from leaking into LogCat, crash reports, and monitoring systems.
Implementation
ConnectUserData.toString()— custom override that prints<redacted>instead of the raw tokenStreamToken.toString()— returnsStreamToken(<redacted>)instead of the raw valueStreamSocketSessionauth request log — prints byte count instead of the serialized JSON payload containing the tokenTesting
Existing tests pass. Token redaction is structural (toString override) — no runtime behavior change.
Summary by CodeRabbit