Skip to content

fix: add extra validation for vercel sync

4d64b17
Select commit
Loading
Failed to load commit list.
Open

fix: add extra validation for vercel sync #6094

fix: add extra validation for vercel sync
4d64b17
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 19, 2026 in 8m 3s

Code review found 1 important issue

Found 5 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important backend/src/services/secret-sync/vercel/vercel-sync-schemas.ts:54-63 Vacuous truth: empty targetEnvironments triggers misleading sensitive validation error

Annotations

Check failure on line 63 in backend/src/services/secret-sync/vercel/vercel-sync-schemas.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Vacuous truth: empty targetEnvironments triggers misleading sensitive validation error

When `targetEnvironments` is empty and `sensitive` is `true`, the new Team-scope check `config.targetEnvironments.every(...)` fires vacuously (`[].every(fn) === true` in JavaScript), producing the misleading error "not supported for development environments" alongside the correct "At least one environment is required" error. Fix: add `config.targetEnvironments.length > 0 &&` before the `.every()` call in both the backend schema (`vercel-sync-schemas.ts` line 54) and the frontend schema (`vercel-