Skip to content

Move Security Reports logic to its own widget

Savas Vedova requested to merge 414464-move-logic-to-widget into master

What does this MR do and why?

This is a small refactoring that moves the internal logic inside the Widget itself.

Screenshots or screen recordings

No visual changes

How to set up and validate locally

There are three steps to validate this.

  1. Fork https://gitlab.com/gitlab-examples/security/security-reports/ (make sure that it's public, we're gonna need it)
  2. Make sure to have an EE license
  3. Create an MR by modifying the Readme.md file

It should display the Security Reports details similar to this:

image

Now, open an Incognito Tab and visit the same page. It should display the CE version (because canReadVulnerabilities is false):

image

Now, create a project that has no Security Reports enabled. Follow the same steps and create an MR. It should look like this:

image

This is because the user can actually read the vulnerabilities, but the project has no enabledReports.

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 #414464 (closed)

Merge request reports