Skip to content

fix(auth): harden E2E bypass to reject production#56

Merged
nocoo merged 2 commits intomainfrom
fix/e2e-auth-bypass-guard
Apr 21, 2026
Merged

fix(auth): harden E2E bypass to reject production#56
nocoo merged 2 commits intomainfrom
fix/e2e-auth-bypass-guard

Conversation

@nocoo
Copy link
Copy Markdown
Owner

@nocoo nocoo commented Apr 21, 2026

Closes #51\n\nisE2EMode() now unconditionally returns false when NODE_ENV === production, preventing auth bypass even if E2E_SKIP_AUTH and CI env vars leak to production.\n\nSeverity: HIGH

@nocoo nocoo force-pushed the fix/e2e-auth-bypass-guard branch 2 times, most recently from 12a6054 to 621b8c0 Compare April 21, 2026 09:53
next start forces NODE_ENV=production, making NODE_ENV checks unreliable
for E2E auth bypass. Replace with dual-key guard: both E2E_SKIP_AUTH=true
AND E2E_TEST_RUNNER=true required. E2E_TEST_RUNNER is set exclusively by
scripts/run-e2e.ts and will never appear in production deployments.
@nocoo nocoo force-pushed the fix/e2e-auth-bypass-guard branch from 621b8c0 to cffdd19 Compare April 21, 2026 09:58
@nocoo nocoo merged commit 293511e into main Apr 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🥝 choko] fix(auth): harden E2E auth bypass to reject production

1 participant