π‘οΈ Sentinel: [CRITICAL] Fix authentication bypass vulnerability - #119
π‘οΈ Sentinel: [CRITICAL] Fix authentication bypass vulnerability#119secrooq wants to merge 1 commit into
Conversation
Removed the hardcoded "stealth_dev_bypass_root_2026" fallback for the `ADMIN_BYPASS_SECRET` in `src/auth.ts` which allowed 2FA to be bypassed if the environment variable wasn't present. Changed the fallback to `null` to securely fail closed. Co-authored-by: secrooq <81346684+secrooq@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: CRITICAL
π‘ Vulnerability: A hardcoded 2FA bypass secret (
"stealth_dev_bypass_root_2026") was present insrc/auth.ts, allowing an attacker who knows this secret to bypass the Two-Factor Authentication requirement if theADMIN_BYPASS_SECRETenvironment variable is not explicitly configured on the server.π― Impact: Attackers could gain unauthorized access by bypassing 2FA mechanisms entirely, leading to full account compromise.
π§ Fix: Removed the hardcoded secret and replaced it with a
nullfallback. The 2FA bypass check now inherently fails ifADMIN_BYPASS_SECRETis unset, following the fail-secure principle.β Verification: Tested via unit tests, build generation, and e2e playwright verification tests which all passed. Also inspected
src/auth.tsto confirm there is no fallback string forexpectedSecret.PR created automatically by Jules for task 18079393030119125724 started by @secrooq