fix: add extra validation for vercel sync #6094
+24
−0
Open
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
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-
Loading