Create a GraphQL query to get severity override in vulnerability report page
What does this MR do and why?
Create a GraphQL fragment to get the severity override in the vulnerability report page only.
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.
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
- Enable the feature flag (
echo "Feature.enable(:vulnerability_severity_override)" | rails c) and (echo "Feature.enable(:enhanced_vulnerability_bulk_actions)" | rails c) - Navigate to the vulnerability details page (
http://gdk.test:3000/[path/to/project]/-/security/vulnerabilities/[id])- navigate to a project that has detected vulnerabilities
- need a test project? clone this project and run a pipeline to generate some vulnerabilities
- in the sidebar, choose
Secure=>Vulnerability report
- navigate to a project that has detected vulnerabilities
- The mutation is still is another open MR, so you can mutate in you local GraphQL:
vulnerabilitiesSeverityOverride(
input: {
severity: CRITICAL
vulnerabilityIds: [
"gid://gitlab/Vulnerability/XXX"
]
comment: "This is a comment"
}
) {
errors
vulnerabilities {
id
title
severity
webUrl
}
}
}
- Verify you see an icon and tooltip on
Vulnerability reportpage
Numbered steps to set up and validate the change are strongly suggested.
Related to #517832 (closed)
