Adds GraphQL queries for vulnerabilities

What does this MR do and why?

Adds GraphQL queries for vulnerabilities

Adds the vulnerability_namespace_statistic field, which exposes the number of vulnerabilities, by severity, for each group, returning zeroes and a null updated_at if there is no record in the vulnerability_namespace_statistics table. Also adds the vulnerability_statistic filed, which exposes the number of vulnerabilities, by severity, for each project.

Changelog: added EE: true

References

How to set up and validate locally

query SubgroupsAndProjects {
  group(fullPath: "gitlab-org") {
    descendantGroups(includeParentDescendants: false, first: 20) {
      nodes {
        name
        vulnerabilityNamespaceStatistic {
          updatedAt
          total
          info
        }
      }
    }
    projects(first: 10) {
      nodes {
        name
        vulnerabilityStatistic {
          updatedAt
          info
        }
      }
    }
  }

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by rossfuhrman

Merge request reports

Loading