Skip to content

Update vulnerability_states filter to match default value

What does this MR do and why?

This MR updates the status filter to match the default states applied by the backend:

  • It's shown by default
  • It cannot be fully removed - there will always be at least one, but can be two
  • Sets vulnerability_states: [] if the selected states match the default of the backend: ['new_needs_triage', 'newly_detected']

It's inspired by !130121 (merged) which aims to do a similar thing for the severity filter.

Screenshots or screen recordings

CleanShot_2023-08-30_at_18.25.09

How to set up and validate locally

  1. Navigate to scan result policy editor rule mode
  2. Verify that vulnerabilities_states criteria UI shows with New and All vulnerabilities states selected in rule mode and the vulnerabilities_states key is present in the yaml
  3. User selects specific state
  4. Verify that vulnerabilities_states key appears in yaml with selected values in an array
  5. User selects All vulnerability states
  6. Verify that vulnerabilities_states key in yaml is set to []
  7. User adds another status with values
  8. Verify that vulnerabilities_states key appears in yaml with selected values in an array

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #419683 (closed)

Edited by Martin Čavoj

Merge request reports

Loading