[dev] [cursor[bot]] cursor/rbac-matrix-form-logic-9716#2474
[dev] [cursor[bot]] cursor/rbac-matrix-form-logic-9716#2474github-actions[bot] wants to merge 3 commits intomainfrom
Conversation
Customers could only upload PDFs and images when submitting evidence. Added CSV, XLSX, and XLS support to the file type mapper and evidence form definitions (whistleblower-report, tabletop-exercise). Also added an optional spreadsheet upload field to the RBAC matrix form so users can upload their matrix as a file instead of entering rows manually. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…apper - Add matrixFile to rbacMatrixDataSchema with .refine() so the uploaded file isn't silently stripped by Zod - Make matrixRows optional when a companion file is uploaded (both in the Zod schema and the validateRequiredMatrixCells guard) - Add CSV/XLSX/XLS MIME mappings to the step 3 file uploader (four-step forms like tabletop-exercise) which was missed in the prior commit Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryMedium Risk Overview Updates both client-side and server-side validation so matrix required-cell checks are skipped when the companion file is present, and the Zod schema now enforces rows-or-file via preprocessing empty rows to Expands file upload accept lists to include CSV/Excel for relevant evidence attachments, and updates the wizard’s MIME mapping accordingly. Reviewed by Cursor Bugbot for commit 59b3ddd. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 59b3ddd. Configure here.
| .refine((data) => (data.matrixRows && data.matrixRows.length > 0) || data.matrixFile, { | ||
| message: 'Enter at least one RBAC row or upload a spreadsheet', | ||
| path: ['matrixRows'], | ||
| }); |
There was a problem hiding this comment.
Partial matrix rows block submission despite companion file
Medium Severity
The validateRequiredMatrixCells function correctly skips cell-level validation when a companion file is uploaded, but the Zod schema in rbacMatrixDataSchema has no matching logic. The emptyMatrixRowsToUndefined preprocessor keeps any row with at least one non-empty cell, and z.array(rbacMatrixRowSchema).optional() then validates those partial rows, failing on empty required columns. A user who starts filling in matrix rows and then decides to upload a spreadsheet instead gets blocked by trigger() in goToStepThree — the two validation layers are inconsistent.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 59b3ddd. Configure here.
|
Automatically closed this PR because it was created by Bugbot autofix for #2471, and that PR was closed. |


This is an automated pull request to merge cursor/rbac-matrix-form-logic-9716 into dev.
It was created by the [Auto Pull Request] action.