Add 'details' object to GraphQL query
What does this MR do and why?
According to this task, this MR is the second step for adding 'details' to MR changes query.
(The first step was added 'details' to Ruby files.)
When gitlab found a vulnerability in 'mr changes page' there is a GraphQL query that brings all the details of the vulnerability.
In this MR:
- I have added a
details
object to GraphQL query. - moving
ee/app/assets/javascripts/security_dashboard/graphql/fragments/vulnerability_detail.fragment.graphql
to a shared folder:app/assets/javascripts/graphql_shared/fragments/vulnerability_detail.fragment.graphql
.
Note: We split Ruby and GraphQL changes because of backward compatibility issue.
References
Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Related issue: #478469
- P1 of this task - !167307 (merged)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Upload a GitLab Ultimate license
- Create an empty project
- Go to your locally project and edit with web IDE
- Create a new file called:
gl-sast-report.json
and copy the content from here: gl-sast-report.json - Create a new file
.gitlab-ci.yml
and pasted this content: gitlab-ci.yml - Create a new folder called
app
and a new file inside calledapp.py
and pasted this content: app.py - Create a new MR
- Go into 'Changes' in your MR and you will see the detected vulnerability using shapes next to the specific rows.
- Open
Inspect element
->Network
-> findgraphql
API request withoperationName: "getMRCodequalityAndSecurityReports"
->Preview
-> Check thatdetails
object exist indata.project.mergeRequest.sastReport.report.added[0]
Numbered steps to set up and validate the change are strongly suggested.
Related to #482849