GPT-6 Luna · Heavy
oauth-credential-sync-and-app-integration-enhancements-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 9
- Comments published
- 5
- Comments matching a bug
- 0
- Comments not matching
- 5
- Cost of this PR
- $0.072
Published comments (5)
Credential sync returns a response shape callers cannot consume — Callers may read an absent `data` property or treat the `Response` wrapper as token data when sync is enabled. Parse and normalize the endpoint response to the shape each caller expects.
Concurrent webhook deliveries can create duplicate credentials — Concurrent deliveries can both create credentials for the same user and app, violating the one-credential-per-user/app invariant. Use an atomic upsert or add a unique constraint to the `Credential` schema.
User ID 0 bypasses credential sync — A valid `userId` of `0` skips the sync path and uses the local provider refresh instead. Check explicitly for null or undefined so every valid ID uses the configured endpoint.
Webhook secret comparison leaks matching prefixes through timing — Direct string comparison can leak matching secret prefixes through timing. Validate equal lengths, then compare the webhook secret with a constant-time function.
Missing encryption key falls back to an empty string — Fail fast when `CALCOM_APP_CREDENTIAL_ENCRYPTION_KEY` is missing instead of attempting decryption.
Gold bugs found (0)
None.