GPT-6 Luna · Heavy

feat-2fa-backup-codes-cal-com

cal.com · TypeScript · M · 100–299 lines · 6 files

The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.

Gold bugs found
0 of 1
Comments published
3
Comments matching a bug
0
Comments not matching
3
Cost of this PR
$0.058

Published comments (3)

highsecurityapps/web/pages/api/auth/two-factor/totp/setup.ts:78

Backup codes are exposed in the API response — Anyone who captures this response can use the plaintext backup codes to access the account. Avoid returning `backupCodes` in a generally observable response, or protect delivery from logging and recording.

highbugpackages/features/auth/lib/next-auth-options.ts:147-155

Concurrent requests can reuse the same backup code — Replace the unconditional `prisma.user.update` with an atomic conditional update that only consumes the code if the stored set is unchanged.

mediumbugapps/web/components/settings/TwoFactorAuthAPI.ts:22

Security-area modal omits backup code when disabling 2FA — The security-area modal cannot disable 2FA with a backup code because it omits that value. Update its call to `disable` to pass the backup code.

Gold bugs found (0)

None.

Gold bugs missed (1)

criticalThe credentials authorize() skips the password check when any totpCode is present, and the new backup-code branch never validates that totpCode, so a backup code plus a dummy totpCode logs in without the account password.