Vulnerabilities in the Pipeline Security tab all link to the same issue
Summary
Vulnerabilities reported in the Pipeline Security tab all point to the same related issue.
Steps to reproduce
(How one can reproduce the issue - this is very important)
Example Project
- https://gitlab.com/gitlab-org/gitlab/-/pipelines/154539972/security
- https://staging.gitlab.com/secure-team-test/js-yarn/-/pipelines/12783179/security
What is the current bug behavior?
All vulnerabilities (which are findings actually, as we don't use First-Class Vulnerabilities in this view yet) have the same related issue. As all of them have an issue attached, it's even impossible to create a new one for a vulnerability.
Note that if you use the pagination to view any results on another page, the issue links no longer appear.
What is the expected correct behavior?
Vulnerabilities have their own issue (if created).
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
Possible fixes
To fix this issue it is needed to investigate why feedback is duplicated when Gitlab::Vulnerabilities::FindingsPreloader
(https://gitlab.com/gitlab-org/gitlab/blob/master/ee/lib/api/vulnerability_findings.rb#L75) is used. When you are turning commenting out this line everything is working as expected.
/cc @matt_wilson @lkerr @thiagocsf for prioritization.