Security: AUTH_DISABLED has no production guardrail #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
apps/api/src/middleware/auth.tssupportsAUTH_DISABLED=truewhich completely bypasses authentication and injects a fakesub: "dev-user"identity. The defaultdocker-compose.ymlships withAUTH_DISABLED: "true".There is no
NODE_ENVgate, no startup warning, and no safeguard against accidentally deploying this to production.Context
Flagged in CEO review on PR #16. Merged without fix.
Fix options (pick one or combine)
AUTH_DISABLED=trueNODE_ENV !== "production"— refuse to start with auth disabled in productiondocker-compose.dev.ymloverride instead of the default compose fileImpact
Security risk — anyone deploying the default compose file to production will have auth completely disabled.
Fixed in PR #24 (merged 2026-03-17). See commit
43e50255.