Skip to content

Add links to vulnerability bulk status updates error message

What does this MR do and why?

Relates to #410687 (closed)

Add links to vulnerability bulk status updates error message.

For each vulnerability that failed to update, the ID is now a link which redirects to its detail page.

Changelog: added EE: true

Screenshots or screen recordings

error-vulnerabilities-bulk

How to set up and validate locally

Prerequisites

  1. You'll need an EE license
  2. You'll need to have runners enabled (See $2408961 for setting up a runner)
  3. Import https://gitlab.com/gitlab-examples/security/security-reports
  4. Run a pipeline on master

Validate error

  1. Go to the vulnerability report page of security-reports project
  2. Set-up an error to occur by e.g. going into network tab, find a /api/graphql call, right click on it and click block .../api/graphql
  3. Select some vulnerabilities and change the status
  4. Validate that error message appears.

Extra: if you use a dev tool like tweak it's possible to actually intercept a specific graphql request and let if fail with a certain delay. That's what you can see in the screen recording. By selecting 20 vulnerabilities, this will result in 2 batched API calls. I've added two intercepts in the tweak devtool. One for the first 10 selected vulnerabilities and one for the other 10. The both have a different delay. This is the reason you can see the error message change, it first fails for 1 api call and shows 10 IDs, later it shows the 20 IDs.

MR acceptance checklist

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

Merge request reports