Skip to content

FE: Improve number of vulnerabilities filtering

Why are we doing this work

  • customers want to be able to have more control over the number of vulnerabilities that an approver gets notified for

Relevant links

  • Designs in epic

Implementation plan

MR 1

  • frontend modify general text to turn the more than text into a dropdown
    • Three options: More than, Less than, Any number
      • Defaults to Any number
      • updates TBD yaml value
    • Current number input conditionally shows (this feature already exists)
      • hidden by default
      • shows for more and less
  • frontend ensure the dropdwons are set to the correct values when the values are changed in yaml mode
  • frontend ensure rule mode is disabled if incorrect values are added in yaml mode
  • frontend ensure the dropdowns are set to the correct values for pre-existing policies

MR 2

  • frontend update the policy list drawer to render the information correctly

Verification steps

  1. Ensure the GitLab Ultimate license is enabled
  2. Navigate to a project/group => Security & Compliance => Policies => New policy => Scan result policy
  3. Verify the range is set to Any number by default
  4. Verify the number input is hidden
  5. Change the range to any other range
  6. Verify the number input is shown
  7. Navigate to yaml mode, make changes to the range/number to a value that does exist, navigate to rule mode and ensure the dropdowns have been updated
  8. Navigate to yaml mode, make changes to the range/number to a value that does not exist, navigate to rule mode and ensure that rule mode is disabled
  9. Create the policy, edit it, verify the dropdowns assigned the appropriate values
Edited by Alexander Turinske