Make sure that `present_on_default_branch` is set to `true` if a branch containing a Vulnerability is merged

Why are we doing this work

We want to make sure that the following workflow is possible:

  1. Create an MR
  2. Run security scanners (this creates Security::Finding object)
  3. Interact with the Security::Finding – either dismiss it or create an issue to investigate
  4. A Vulnerability with present_on_default_branch set to false is created
  5. Merge the MR
  6. Once the MR is merged set present_on_default_branch to true for the Vulnerabilities the user has interacted with
  7. For all other Vulnerabilities::Finding a Vulnerability with present_on_default_branch set true should be created.

This issue's focus are points 5-7.

Related: #324860 (closed)

Implementation plan

TBA

Edited by Michał Zając