GitHub Security Audit Flags Critical OAuth Token Leak & Encryption Gaps in Codebase
A comprehensive security audit has uncovered critical vulnerabilities in a codebase, with the most severe issue exposing user session tokens via browser URLs. The audit, structured around the OWASP Top 10, identified 3 critical, 8 high, 9 medium, and 2 low severity findings. The primary critical flaw involves the OAuth authentication flow, which redirects users to the frontend with a `?session_token=...` parameter visibly embedded in the URL. This practice is flagged as OWASP A02 (Cryptographic Failures) and poses an immediate risk, as tokens in URLs are recorded in browser history, server and proxy logs, and can be leaked via HTTP Referer headers to third-party sites.
The audit specifies the correct remediation: the backend must set an `HttpOnly`, `SameSite=Strict`, and `Secure` cookie directly in the OAuth callback response, then redirect the user without any credentials in the URL. The frontend must be explicitly prohibited from reading credentials from URL parameters. Key files implicated in this vulnerability are `auth.py` and `useAuth.ts`. A second critical finding, listed under "Phase 1 — Critical (Fix Immediately)," points to a deficiency in at-rest encryption, though the specific details are truncated in the provided context.
These findings describe vulnerable patterns and behaviors rather than pinpointing specific line numbers, indicating a systemic review of security posture. The presence of multiple high and medium-severity issues alongside the critical flaws suggests broader security hygiene problems that require urgent architectural and code-level fixes. The audit's structured approach and reference to OWASP standards signal a formal, high-stakes review process, likely prompted by compliance requirements or a proactive security initiative, placing significant pressure on the development team to prioritize and implement these fixes immediately.