Skip to content

[dev] [cursor[bot]] cursor/rbac-matrix-form-logic-9716#2474

Closed
github-actions[bot] wants to merge 3 commits intomainfrom
cursor/rbac-matrix-form-logic-9716
Closed

[dev] [cursor[bot]] cursor/rbac-matrix-form-logic-9716#2474
github-actions[bot] wants to merge 3 commits intomainfrom
cursor/rbac-matrix-form-logic-9716

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 7, 2026

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.

tofikwest and others added 3 commits April 7, 2026 11:24
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>
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 7, 2026

PR Summary

Medium Risk
Changes form validation and submission schema for the RBAC matrix to allow either entered rows or an uploaded file, which could affect required-field enforcement and downstream data expectations. Also expands allowed upload types (CSV/Excel), increasing the surface area for file-handling edge cases.

Overview
Adds an alternate upload path for the rbac-matrix evidence form: users can now either enter RBAC rows or upload a .csv/.xlsx/.xls (plus .pdf) spreadsheet (matrixFile).

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 undefined and a refine requiring at least one.

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.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Apr 7, 2026 3:49pm
comp-framework-editor Ready Ready Preview, Comment Apr 7, 2026 3:49pm
portal Ready Ready Preview, Comment Apr 7, 2026 3:49pm

Request Review

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tofikwest
❌ cursoragent
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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'],
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 59b3ddd. Configure here.

@cursor cursor bot closed this Apr 7, 2026
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 7, 2026

Automatically closed this PR because it was created by Bugbot autofix for #2471, and that PR was closed.

@cursor cursor bot deleted the cursor/rbac-matrix-form-logic-9716 branch April 7, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants