Security context

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

cogentapps/chat-with-gpt
main @ c75663b
3
Fixes
0
CVEs
HIGH
Peak severity
50.0%
Coverage
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
server/src/endpoints/session.ts: most-fixed (2 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.

Authentication Bypass: Incomplete authentication checks failed to recognize OIDC-authenticated sessions when determining user status, leading to bypassed restrictions during service filtering. Future endpoints must use unified authentication checks that account for all supported passport and OIDC schemes.
Auth Bypass: Evaluating login status using incomplete request properties instead of the base class's validated userID property allowed unauthorized session endpoint access. Security-sensitive endpoints should strictly inherit and reference authenticated properties from the base controller.
Cryptographic Issues: Using a hardcoded fallback secret ('keyboard cat') for session signing compromised session integrity and allowed potential session hijacking. The system must dynamically generate strong random fallback secrets at startup when the environment configuration is missing.