chore: force env variables - #1080
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
| throw new Error( | ||
| 'ADMIN_EMAIL, ADMIN_PASSWORD, CANDIDATE_EMAIL, and CANDIDATE_PASSWORD must be set in the environment variables', | ||
| ) | ||
| } |
There was a problem hiding this comment.
Module validation breaks CSV-only seeding in production
Medium Severity
The validation check runs at module load time, meaning it executes whenever seed/users.ts is imported - even in production/qa/dev environments where only CSV seeds run and seedUsers is never called. The import in seed/seed.ts (line 7) triggers this validation unconditionally, so the seed script now fails in production environments that don't have ADMIN_EMAIL, ADMIN_PASSWORD, CANDIDATE_EMAIL, and CANDIDATE_PASSWORD set, even though those values are only needed for factory seeds.
Coverage Report
File CoverageNo changed files found. |
📊 Overall Test Coverage21.77% (average of lines, statements, functions, and branches) |
Preview EnvironmentYour preview environment is ready!
|


Note
Low Risk
Low risk: only affects the seed script startup behavior by failing fast when required env vars are missing; no runtime application logic changes.
Overview
Removes hardcoded fallback credentials from
seed/users.tsand requiresADMIN_EMAIL,ADMIN_PASSWORD,CANDIDATE_EMAIL, andCANDIDATE_PASSWORDto be present in the environment.The seed script now throws a clear error early if any of these variables are unset, preventing seeds from running with default test accounts.
Written by Cursor Bugbot for commit 312561c. Configure here.