Implement updating of `Vulnerability::Reads#dismissal_reason` when a `Vulnerability::StateTransition` is created
In order to make vulnerability values filterable by dismissal_reason
, we will need to ensure that this column is automatically filled in on the Vulnerability::Read
model every time a new Vulnerability::StateTransition
record is created.
We need to update the application code to keep this value up to date as new state transition records are created.
Implementation Plan
-
backend Update the
Vulnerabilities::DismissService
and any other applicable services to ensure that theVulnerability::Reads#dismissal_reason
is kept up to date.
Verification steps
- Go to
Secure -> Vulnerability report
- Dismiss any Vulnerability with a reason
- Check if appropriate
Vulnerability::Read
record hasdismissal_reason
populated
Edited by Michał Zając