Fetch dependency paths with GraphQL query on vulnerability details page

What does this MR do and why?

Related #550623 (closed)

Fetch dependency paths with GraphQL query on vulnerability details page

  • The dropdown in the dependency path drawer that is used to select the project on the group-level dependencies page is re-used to select an occurrence on the vulnerability details page
  • The sbomOccurrences are parsed in dependency_path.vue and converted to dropdownItems
  • Manually passing the dependency paths to the drawer is removed in this MR

References

Screenshots or screen recordings

vulnerability-details-dependency-paths

How to set up and validate locally

  1. Enable feature flags: http://gdk.test:3000/rails/features/dependency_paths and http://gdk.test:3000/rails/features/dependency_graph_graphql
  2. Import project in group gitlab-org: https://gitlab.com/gitlab-org/govern/threat-insights-demos/frontend/security-reports-with-dependency-paths/-/dependencies
  3. Run pipeline in that project (run twice due to bug)
  4. On project-level dependencies page, find lodash 4.17.11, expand, and click on a vulnerability
  5. On the vulnerability details page, click "View dependency paths"
  6. Validate the drawer opens and 10 paths load. Verify you see a dropdown for selecting occurrence (only 1 occurrence yarn.lock)
  7. Validate you can use "next" and "previous" pagination buttons

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Lorenz van Herwaarden

Merge request reports

Loading