chore(supabase): remove debug session logging from browser client#71
chore(supabase): remove debug session logging from browser client#71roshanraj9136 wants to merge 1 commit into
Conversation
The browser Supabase client module ran getSession() at import time and console.log'd the result on every page load. The 'res' object contains session.access_token (a JWT) and session.refresh_token, both of which are sufficient to impersonate the user. Logging this to the browser console exposes auth tokens to: - shoulder-surfing / screen-recording / screen-sharing - malicious or buggy browser extensions that read console output - users who paste console output into bug reports - third-party analytics tools that scrape console logs The block was annotated 'DEBUG' and is clearly leftover instrumentation. This removes it. No functional change — getSession() is already called by useAuth and AuthContext where the result is consumed safely. Refs: CWE-532 (Insertion of Sensitive Information into Log File)
|
@roshanraj9136 is attempting to deploy a commit to the OpenLake_Website Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
More reviews will be available in 41 minutes and 40 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 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 |
Summary
src/lib/supabase.tsran a debugconsole.logofsupabase.auth.getSession()at module load. Every page that imports the browser Supabase client would print the user's session — includingaccess_token(JWT) andrefresh_token— to the browser console.The block was annotated
// DEBUG:and is clearly leftover instrumentation. This PR removes it.Why this matters
Auth tokens in the browser console are visible to:
An attacker with the access token can impersonate the user for ~1 hour. With the refresh token, indefinitely until logout.
Classification: CWE-532 (Insertion of Sensitive Information into Log File).
Change
Removed the 7-line debug block. No functional change —
getSession()is still called fromuseAuthandAuthContextwhere the result is consumed properly.Testing
npx tsc --noEmit— no new errors.supabase) is unchanged. All consumers continue to work.