Fix filter_by_states clearing previously applied filters
Why are we doing this work
Issue reported indicates that the security center vulnerability report shows incorrect vulnerability counts.
From @bwill
This is a rather obscure bug that happens when filtering by state
and report_type
at the same time. It happens because of this code, which overrides the currently filtered vulnerabilities with vulnerable.vulnerability_reads
. This clears all of the previously applied filters. I've opened !139576 (closed) to fix this. The only reason why it does not happen for the group or project vulnerability reports is because we use a different finder for those which does not have this bug.
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing: