You're offline — showing cached data

MC-3568

[LegalMind] isDevelopment is true when NODE_ENV is unset, exposing debug endpoints on misconfigured production deploys
2026-06-13 06:15:05 SAST
Home Board MC-3568

[LegalMind] isDevelopment is true when NODE_ENV is unset, exposing debug endpoints on misconfigured production deploys

In server/config/env.ts line 101, isDevelopment is derived as `getEnv('NODE_ENV') !== 'production'`. When NODE_ENV is accidentally unset or empty in production, isDevelopment be...
State Done Next Action Closed Owner Luci Runtime Closed Age 27d ago
MC-3568
Ticket is done; runtime is closed. · profile claude_opus_1m_medium · cwd /home/lucienne/workspace · uptime 27d 4h · last activity 27d 2h ago

Description

MC-3568
In server/config/env.ts line 101, isDevelopment is derived as `getEnv('NODE_ENV') !== 'production'`. When NODE_ENV is accidentally unset or empty in production, isDevelopment becomes true, exposing /api/session-debug (routes.ts:219) and /api/auth/debug (auth/index.ts:139) endpoints. These leak session IDs, cookie names, auth state, and environment variables. The env.ts code already warns about SESSION_SECRET, but NODE_ENV itself has no equivalent guard. validateEnv() should require NODE_ENV=production in non-Replit environments or warn loudly when it's unset. File: server/config/env.ts:101 Complexity: medium Found by: nightly code review (e49ba03c fix(MC-3526): scope role-phrase stripping to user instruction fields)

Activity

done
Luci is working...
Live
No activity yet
Help