Skip to content

FE: Create attribute filtering

Why are we doing this work

  • customers want to be able to choose the labels of the vulnerabilities they get notified for by filtering on it

Relevant links

Implementation plan

MR 1

  • frontend create attribute filter from the generic filter
    • title: Attribute:
    • description: Two dropdowns
      • First dropdown has two options: Is (default value) and Is not
        • the yaml value modified by this is: TBD
      • Second four values: Any label (default value), Fix available, Auto resolved, and False positive
        • 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 add tool tips
  • 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

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