Add `Cluster` filter to the group/security center `Operational vulnerabilities` vulnerability report

Why are we doing this work

  • users want to see operational vulnerabilities and filter by the cluster they come from at the group/security center level

Relevant links

Non-functional requirements

  • Documentation
  • Testing:

Implementation plan

  • frontend extend the cluster_filter

    • group-level
      • update the Group.clusterAgents(hasVulnerabilities: Boolean) vulnerability request to filter by clusterAgentId: [ClustersAgentID!]
      • modify Group.vulnerabilitySeveritiesCount to be used with clusterAgentId
    • security center
      • update the InstanceSecurityDashboard.clusterAgents(hasVulnerabilities: Boolean) vulnerability request to filter by clusterAgentId: [ClustersAgentID!]
      • modify InstanceSecurityDashboard.vulnerabilitySeveritiesCount to be used with clusterAgentId
  • backend

    • group
      • modify Group.vulnerabilitySeveritiesCount to be used with clusterAgentId
    • security center
      • modify InstanceSecurityDashboard.vulnerabilitySeveritiesCount to be used with clusterAgentId

Verification steps

  1. Ensure your GDK has a GitLab Ultimate license
  2. Ensure your GDK is connected to the GitLab Runner
  3. Follow these docs to set up the kubernetes agent
  4. Clone test-cis-with-agentid and run the pipeline
  5. Link the agent to a project
  6. Run the pipeline to generate vulnerabilities
  7. Navigate to the agent/group/security center vulnerability report
  8. View the vulnerabilities
Edited by Alexander Turinske