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

  1. Upload a GitLab Ultimate license
  2. Enable the feature flag (echo "Feature.enable(:vulnerability_severity_override)" | rails c) and (echo "Feature.enable(:enhanced_vulnerability_bulk_actions)" | rails c)
  3. Navigate to the vulnerability details page (http://gdk.test:3000/[path/to/project]/-/security/vulnerabilities/[id])
    1. navigate to a project that has detected vulnerabilities
      • need a test project? clone this project and run a pipeline to generate some vulnerabilities
    2. in the sidebar, choose Secure => Vulnerability report
  4. 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
    }
  }
}
  1. Verify you see an icon and tooltip on Vulnerability report page

Screenshot_2025-02-09_at_12.27.08

Numbered steps to set up and validate the change are strongly suggested.

Related to #517832 (closed)

Merge request reports

Loading