Fix dismissal not showing for dismissed findings on MR security widget
What does this MR do and why?
This MR fixes an issue where in the MR security widget, dismissed findings do not show as dismissed, and the finding modal shows the Dismiss
button instead of Undo Dismiss
:
How to set up and validate locally
- Create a MR that has security vulnerabilities so that the MR security widget will show findings. The easiest way to do this is:
- Clone this project: https://gitlab.com/gitlab-examples/security/security-reports
- Edit
.gitlab-ci.yml
to disable one (or more) of the scan jobs. - Create a MR that re-enables the scan jobs.
- Dismiss a finding using the finding modal and refresh the page.
- Verify that the finding has the dismissed badge and that the finding modal shows "Undo Dismiss". Note that you may have to wait some time for the finding to update due to a separate issue where the finding data is cached.
- Undismiss the finding and refresh the page. Verify that the finding no longer shows the dismissed badget and that the finding modal shows "Dismiss vulnerability".
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #388274 (closed)
Edited by Daniel Tian