Update vulnerability_states filter to match default value
requested to merge 419683-fe-update-scan-result-vulnerability-states-criteria-to-display-automatically into master
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
- Navigate to scan result policy editor rule mode
- Verify that
vulnerabilities_states
criteria UI shows withNew
andAll vulnerabilities states
selected in rule mode and thevulnerabilities_states
key is present in the yaml - User selects specific state
- Verify that
vulnerabilities_states
key appears in yaml with selected values in an array - User selects
All vulnerability states
- Verify that
vulnerabilities_states
key in yaml is set to[]
- User adds another status with values
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #419683 (closed)
Edited by Martin Čavoj