FE: Update scan result vulnerability states criteria to display automatically
Why are we doing this work
- see Policy Editor Rule Mode UX enhancements (&11079) for details
Implementation plan
-
frontend update filters to not use null
and[]
, but instead to get the information from the yaml -
frontend remove vulnerabilities_states: []
from default yaml -
frontend display vulnerabilities_states
criteria UI by default with statusNew
andAll vulnerability states
(yaml would bevulnerability_states: [new_dismissed, new_needs_triage]
) selected in security_scan_rule_builder -
frontend when a user selects New
andAll vulnerability states
, thevulnerabilities_states
key is removed from the yaml if it is the only status in security_scan_rule_builder
Verification steps
- 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
Edited by Martin Čavoj