Make `vulnerability-details` receive a vulnerability as a prop

Summary

The vulnerability-details Vue component currently receives a details prop, which is a processed form of the modal data set by the security reports store and the security dashboard store, which is based almost entirely on a given vulnerability.

That indirection is unnecessary, and it'd be simpler for the vulnerability-details component to receive the vulnerability directly and do whatever processing it needs. This indirection also makes it more likely for there to be inconsistencies (see https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15682/diffs#d4be8977041303fda2557b41f39409d48f67a3c2_110_113 for an example).

This might also be a good opportunity to make it less dynamic and "smart" (unless https://gitlab.com/gitlab-org/gitlab-ee/issues/11940 makes this all redundant). In the interests of iteration, this issue does not include the effort to make the vulnerability-details component less "smart".

Improvements

  • Less indirection
  • Simpler (fewer?) store mutations
  • Less inconsistency

Risks

Involved components

cc @samdbeckham @pgascouvaillancourt

Edited by Mark Florian