Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

polarsource/polar
main @ 25c34cc
177
Fixes
0
CVEs
CRITICAL
Peak severity
26.3%
Coverage
Highlights
Auth Bypass: 107 prior fixes. Scrutinize any change in this area.
server/polar/auth/dependencies.py: most-fixed (6 issues). Treat as high-risk during review.
139 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: Multiple fixes target the accessible-org ID resolution, which is central to authorization. Bypasses here allow access to SSO-enforced or blocked organizations and cross-tenant data leaks.
Auth Bypass: OAuth2 authorization code grant has been patched multiple times for org scoping, SSO enforcement, and revoked-code handling, indicating a high-risk flow where token issuance can be abused.
Auth Bypass: Scope enforcement on authentication dependencies has been repeatedly fixed, showing a pattern where tokens could authenticate without required scopes or with incorrect scope checks.