Skip to content

Refactor vulnerability-details component for better reusability

Mark Florian requested to merge 14006-vulnerability-details-prop-ee into master

What does this MR do?

This refactors the vulnerability component to:

This has also involved removing various store mutations and state.

There are only some minor UI changes:

  • In Merge Requests, the component now displays (if available):
    • the project the vulnerability belongs to
    • the report type of the vulnerability
    • the line number information for the file
  • In Security Dashboards, the component now displays (if available):
    • the method in which the vulnerability was detected

This MR thus unifies how vulnerabilities are rendered, regardless of the context. Previously, both contexts were lacking in some way.

Screenshots

Before After
MR context mr_saml2_before mr_saml2_after
Security Dashboard context project_dashboard_axios_before project_dashboard_axios_after

Please do not squash this!

The story of how this MR was developed is conveyed by its commits, and has some useful information that should be preserved. As such, I'd prefer that they be left intact 😄

Unfortunately, viewing the individual commits within GitLab may be tricky, since some are very large due to the temporary snapshot files used in the refactoring process. These are probably best viewed locally in your favourite diff viewer.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Mark Florian

Merge request reports