Add a service that will update namespace level vulnerability statistics as a part of vulnerabilities processing
Add a new service that should be executed every time we add/update a row in vulnerability_statistics. (which is a project-level statistics)
The service will update the namespace vulnerability statistics with the new information for all the namespaces in this vulnerability's traversal_ids.
For example, a new critical vulnerability was found in project 5, that resides inside this traversal_ids {1, 2, 3, 4, 5}.
We will increase the critical counter for all the namespaces 1, 2, 3, 4 and 5
Flows to consider when implementing:
- report ingestion
- severity override service
- statistics adjustment service
- All places where
Statistics::UpdateService.update_for(vulnerability)is called
Edited by Yuval Siev