[DEV] Honor Filters for CSV exports of the Vulnerability Report

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Currently, when users export the Vulnerability Report to CSV, the export includes all vulnerabilities regardless of any filters applied in the UI. This creates a mismatch between what users see in the report and what they receive in the export, leading to confusion and requiring manual post-processing of the exported data.

We need to honor the applied filters (severity, report type, state, etc.) when generating CSV exports so that the exported data matches exactly what's displayed in the Vulnerability Report.

Implementation Plan

  1. Create a database migration
  2. Update the CreateService to capture and store filters
  3. Update the ExportService to apply filters
  4. Update the background worker
  5. Testing considerations

Additional notes:

  • Consider adding validation to ensure only valid filter keys are stored
  • Update API documentation to reflect the new filter parameters
Edited by 🤖 GitLab Bot 🤖