Skip to content

Create Vulnerability when issue feedback created

What does this MR do and why?

This MR is the first part of 384867+, to create vulnerabilities from the Pipeline Security page if one does not already exist. From this, we can then pull issues into the Security Finding GraphQL query through the Vulnerability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Create a new local project based off of https://gitlab.com/gitlab-examples/security/security-reports.
  2. Create a branch and run a pipeline off of it.
  3. Checkout the master branch. Create an issue by clicking the "Create Issue" button in the Pipeline Security Findings list.
  4. The issue should be created, but not the Vulnerability.
  5. This can be verified by performing the following in a rails console:
Project.find(<project ID>).vulnerabilities #should be 0
  1. Checkout the 384867-add-issuelinks-field-to-pipelinesecurityreportfinding-create-vuln branch. Create an issue by clicking the "Create Issue" button in the Pipeline Security Findings list.
  2. The issue and vulnerability should both be created.
  3. This can be verified by performing the following in a rails console:
Project.find(<project ID>).vulnerabilities #should be > 0

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #384867 (closed)

Merge request reports