GPT-5 finding
Admin scripts lack validation for required environment variables and fail with opaque errors when unset
- apps/web/scripts/inspect-app-hook.ts:21-24
- apps/web/scripts/inspect-app.ts:20-23
- apps/web/scripts/inspect-finding-status.ts:12-18
Both GitHub App scripts use non-null assertions on critical env vars without verifying presence before use, and the DB inspection script relies on DATABASE_URL but does not validate it. When missing, these scripts will throw inside library code, producing less actionable errors.
Recommendation
Add explicit early checks with clear error messages and non-zero exits when required env vars are missing, e.g., validate GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY in the GitHub App scripts, and DATABASE_URL before importing/using the DB layer.