8.6 KiB
Requirements Document
Introduction
The Batch Finding Disposition feature adds multi-select capability to the Vulnerability Triage page's findings table, allowing engineers to select multiple findings at once and add them all to the Ivanti Queue with a shared workflow type and vendor in a single operation. Currently, each finding must be individually clicked, configured via a popover, and submitted — a repetitive process that slows down triage when working through many findings. This feature replaces that one-at-a-time flow with a batch selection toolbar and a bulk-add API endpoint.
Glossary
- Findings_Table: The sortable, filterable table of Ivanti host findings rendered in the VulnerabilityTriagePage component (
ReportingPage.js), where each row represents one finding. - Selection_Toolbar: A floating toolbar that appears above the Findings_Table when one or more findings are selected via their row checkboxes, displaying the count of selected findings and batch action controls.
- Batch_Add_Panel: The inline panel within the Selection_Toolbar that provides workflow type selection (FP, Archer, CARD), an optional vendor input, and a submit button for adding all selected findings to the queue in one operation.
- Todo_Queue_API: The backend Express router at
/api/ivanti/todo-queuethat manages CRUD operations on theivanti_todo_queuetable. - Queue_Panel: The existing right-side slide-out panel (
QueuePanelcomponent) that displays the user's current queue items grouped by vendor. - Workflow_Type: One of three disposition categories: FP (false positive), Archer (risk acceptance), or CARD (remediation card). Each finding added to the queue is assigned exactly one Workflow_Type.
- Finding: A single Ivanti host vulnerability record containing an ID, title, CVEs, IP address, severity, and other metadata.
Requirements
Requirement 1: Multi-Select Findings via Row Checkboxes
User Story: As an engineer, I want to select multiple findings using checkboxes so that I can batch-process them instead of handling each one individually.
Acceptance Criteria
- THE Findings_Table SHALL render a checkbox in the first column of each finding row that is not already in the queue.
- WHEN a user clicks a finding row's checkbox, THE Findings_Table SHALL toggle that Finding's selected state without opening the AddToQueuePopover.
- WHEN one or more findings are selected, THE Findings_Table SHALL visually distinguish selected rows from unselected rows using a highlighted background.
- THE Findings_Table SHALL maintain the selected findings set across sort and filter changes, removing only findings that are no longer visible after filtering.
- WHEN a finding is already in the queue, THE Findings_Table SHALL display that row's checkbox as checked and disabled, preventing re-selection.
- WHILE findings are selected, THE Findings_Table SHALL display a "Select All (visible)" control in the checkbox column header that selects all visible, non-queued findings.
- WHEN the "Select All" control is clicked while all visible non-queued findings are already selected, THE Findings_Table SHALL deselect all findings.
Requirement 2: Selection Toolbar with Batch Actions
User Story: As an engineer, I want a toolbar that appears when I have findings selected so that I can see how many are selected and take batch actions on them.
Acceptance Criteria
- WHEN one or more findings are selected, THE Selection_Toolbar SHALL appear as a sticky bar above the Findings_Table header row.
- THE Selection_Toolbar SHALL display the count of currently selected findings.
- THE Selection_Toolbar SHALL provide a "Clear Selection" button that deselects all findings and hides the Selection_Toolbar.
- THE Selection_Toolbar SHALL provide workflow type toggle buttons for FP, Archer, and CARD, matching the existing color scheme (FP: amber, Archer: blue, CARD: green).
- WHEN the selected Workflow_Type is FP or Archer, THE Selection_Toolbar SHALL display a vendor text input field.
- WHEN the selected Workflow_Type is CARD, THE Selection_Toolbar SHALL hide the vendor input field and display a "No vendor required" indicator.
- THE Selection_Toolbar SHALL provide an "Add to Queue" submit button that is enabled only when a Workflow_Type is selected and vendor is provided (for FP/Archer) or Workflow_Type is CARD.
- THE Selection_Toolbar SHALL follow the existing dark theme design system (monospace fonts, dark gradient backgrounds, accent-colored borders).
Requirement 3: Bulk Add to Queue API Endpoint
User Story: As an engineer, I want the backend to accept multiple findings in a single request so that batch additions are processed efficiently.
Acceptance Criteria
- THE Todo_Queue_API SHALL expose a
POST /api/ivanti/todo-queue/batchendpoint that accepts an array of finding objects with a shared workflow_type and vendor. - THE Todo_Queue_API SHALL validate that the findings array contains between 1 and 200 items.
- THE Todo_Queue_API SHALL validate that each finding object contains a non-empty finding_id string.
- THE Todo_Queue_API SHALL validate that workflow_type is one of FP, Archer, or CARD.
- WHEN workflow_type is FP or Archer, THE Todo_Queue_API SHALL validate that vendor is a non-empty string of 200 characters or fewer.
- WHEN workflow_type is CARD, THE Todo_Queue_API SHALL accept an empty or absent vendor field.
- THE Todo_Queue_API SHALL insert all valid findings into the
ivanti_todo_queuetable within a single database transaction. - IF any finding in the batch fails validation, THEN THE Todo_Queue_API SHALL reject the entire batch and return a 400 response with a descriptive error message.
- THE Todo_Queue_API SHALL return a 201 response containing the array of newly created queue items with their assigned IDs.
- THE Todo_Queue_API SHALL require authentication and the Admin or Standard_User group.
- IF a database error occurs during the transaction, THEN THE Todo_Queue_API SHALL roll back all inserts and return a 500 response.
Requirement 4: Frontend Batch Submission Flow
User Story: As an engineer, I want clicking "Add to Queue" on the toolbar to submit all selected findings at once so that I save time during triage.
Acceptance Criteria
- WHEN the user clicks "Add to Queue" on the Selection_Toolbar, THE Findings_Table SHALL send a single POST request to
POST /api/ivanti/todo-queue/batchcontaining all selected findings with the chosen workflow_type and vendor. - WHILE the batch request is in progress, THE Selection_Toolbar SHALL disable the "Add to Queue" button and display a loading indicator.
- WHEN the batch request succeeds, THE Findings_Table SHALL add all returned queue items to the local queue state, clear the selection, and hide the Selection_Toolbar.
- WHEN the batch request succeeds, THE Findings_Table SHALL update each newly queued finding's row checkbox to show the checked-and-disabled (already queued) state.
- IF the batch request fails, THEN THE Selection_Toolbar SHALL display the error message returned by the API and keep the current selection intact.
- WHEN the batch request succeeds and the Queue_Panel is open, THE Queue_Panel SHALL reflect the newly added items immediately without requiring a manual refresh.
Requirement 5: Preserve Single-Select Popover Flow
User Story: As an engineer, I want to still be able to add a single finding to the queue quickly without going through the batch flow, so that simple one-off additions remain fast.
Acceptance Criteria
- WHEN no findings are currently selected and a user clicks a finding row's checkbox, THE Findings_Table SHALL open the existing AddToQueuePopover for that single finding.
- WHEN one or more findings are already selected and a user clicks another finding row's checkbox, THE Findings_Table SHALL add that finding to the selection set instead of opening the AddToQueuePopover.
- THE AddToQueuePopover SHALL continue to use the existing single-item
POST /api/ivanti/todo-queueendpoint for individual additions.
Requirement 6: Keyboard Accessibility for Multi-Select
User Story: As an engineer, I want to use keyboard shortcuts to speed up multi-select so that I can triage even faster.
Acceptance Criteria
- WHEN a user holds Shift and clicks a finding row's checkbox, THE Findings_Table SHALL select all visible findings between the last clicked checkbox and the current checkbox (range select).
- THE Selection_Toolbar SHALL be navigable via keyboard Tab order, with all interactive elements (workflow buttons, vendor input, submit button) reachable by Tab key.
- WHEN the Escape key is pressed while the Selection_Toolbar is visible, THE Findings_Table SHALL clear the selection and hide the Selection_Toolbar.