Skip to content

Add non-nested generic report types to GraphQL finding modal

What does this MR do and why?

Adds the remaining (non-nested) generic report types to the new, GraphQL version of the finding modal:

  • ModuleLocation
  • Commit
  • Text
  • Markdown
  • Boolean
  • Int

It also includes a small refactor that moves the GraphQL-type -> component map out of a shared constants file.

Screenshots or screen recordings

Screenshot_2023-01-23_at_3.25.38_pm

How to set up and validate locally

Setup

  1. Have the related FF enabled: echo "Feature.enable(:pipeline_security_dashboard_graphql)" | rails c
  2. You'll need an EE License
  3. You'll need to have runners enabled (See $2408961 for setting up a runner)
  4. Import https://gitlab.com/gitlab-examples/security/security-reports
  5. Run a pipeline on master

Validation

  1. Go to the pipeline's security report tab
  2. Click on the finding with the title "X-Frame-Options Header Not Set"
  3. Verify that all the fields render as-expected

Note: The current test data only renders a subset of types, but once the list and table types are rendered, we should have a full picture.

MR acceptance checklist

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

Edited by David Pisek

Merge request reports

Loading