Migrate generic report item to GraphQL: "FileLocation"
Intro
We want to render the "FileLocation" report type within the GraphQL version of the pipeline's security modal:
example screenshot |
---|
How to set this up locally
- Import this project https://gitlab.com/gitlab-examples/security/security-reports
- Run a pipeline on master
- Navigate to the pipeline's security tab
- Filter for "DAST" tool
- Click on the "X-Frame-Options Header Not Set" vulnerability; the generic report section is within the "Evidence" section
The GraphQL migration work is currently behind a feature flag, to enable it run:
echo "Feature.enable(:pipeline_security_dashboard_graphql)" | rails c
Once enabled, refreshing the report and clicking on the same finding mentioned above, will load the GraphQL version of the modal.
Implementation plan
- Add query for fetching
VulnerabilityDetailFileLocation
types toee/app/assets/javascripts/security_dashboard/graphql/queries/security_report_finding.query.graphql
- an example approach can be found here:!107574 (diffs) - Make sure that the behavior is exactly the same as on the current modal
- Add specs
Edited by David Pisek