Highlights
Auth Bypass: 2 prior fixes. Scrutinize any change in this area.
auth/notion-oauth.js: most-fixed (3 issues). Treat as high-risk during review.
3 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.
Cross-Site Scripting (XSS): Six XSS fixes across three UI/export components indicate a systemic lack of output encoding for dynamic values (database metadata, error messages, timestamps, URLs). The recurring sink is innerHTML and window.location.href, suggesting a pattern of unsafe DOM manipulation.
Auth Bypass: Two OAuth state validation flaws: one allowed null/missing state to bypass mismatch check, another lacked PKCE. These are critical because they enable CSRF and authorization code interception.
Credential Exposure: Client secret was exposed client-side; fixed by routing token requests through a backend worker. This is a fundamental architecture flaw that must not regress.