Fix error when applying scanner suggestion
What does this MR do and why?
VulnerabilityFeedback::CreateService always tries to create
remediations. If there is already an existing remediation, it will fail
due to uniqueness constraints. This change fixes the issue by changing
Remediations::CreateService to use find_or_create_by
.
References
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Clone the Yarn Remediation repo
- Run a pipeline on the
cureable
branch. - Navigate to the project security dashboard select a vulnerability and view the details page. The
Resolve with MR
button should be available. - Click on the
Resolve with MR
button.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Brian Williams