Skip to content

FE: Create age filtering

Why are we doing this work

  • customers want to be able to choose the age of vulnerabilities they get notified by filtering for status

Relevant links

  • Designs in epic

Implementation plan

MR 1

  • frontend create age filter with generic filter
    • title: Age is:
    • description: Dropdown, Input, Dropdown
      • First dropdown has three options: Any (default value), More than, and Less than
        • the yaml value modified by this is: TBD
      • Second two values conditionally render if More/Less than is chosen
        • Number input
          • the yaml value modified by this is: TBD
        • Second dropdown has Day, Week, Month, and Year
          • the yaml value modified by this is: TBD
  • frontend it is conditionally shown
    • hidden before the scanner is chosen
    • when Security Scan is chosen, it shows below the main section
    • when License Scan is chosen, it is hidden
  • frontend ensure the description is set to the correct values when the values are changed in yaml mode
  • frontend ensure the description is set to the correct values for pre-existing policies

MR 2

  • frontend ensure rule mode is disabled if incorrect values are added in yaml mode

MR 3

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

MR 4

  • frontend prevent age filter to be used with only new vulnerabilities. It only makes sense for policies based on previously detected vulnerabilities.

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 filter is hidden
  4. Choose License Scan
  5. Verify the filter is hidden
  6. Choose Security Scan
  7. Verify the filter can be changed and the yaml is updated appropriately
  8. Navigate to yaml mode, make changes to values to a value that does exist, navigate to rule mode and ensure the description has been updated
  9. Navigate to yaml mode, make changes to the values to a value that does not exist, navigate to rule mode and ensure that rule mode is disabled
  10. Create the policy, edit it, verify the description is assigned the appropriate values
Edited by Martin Čavoj