> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybedefend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get CICD vulnerabilities grouped by rule ID

> Returns CICD vulnerabilities consolidated by rule with occurrence counts and severity breakdown.



## OpenAPI

````yaml get /project/{projectId}/results/cicd/grouped
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /project/{projectId}/results/cicd/grouped:
    get:
      tags:
        - Results & Vulnerabilities
      summary: Get CICD vulnerabilities grouped by rule ID
      description: >-
        Returns CICD vulnerabilities consolidated by rule with occurrence counts
        and severity breakdown.
      operationId: ResultController_getGroupedCicdVulnerabilities
      parameters:
        - name: projectId
          required: true
          in: path
          schema:
            format: uuid
            type: string
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            default: 1
            example: 1
            type: number
        - name: perPage
          required: false
          in: query
          description: Page size
          schema:
            default: 10
            example: 10
            type: number
        - name: sort
          required: false
          in: query
          description: Sort field
          schema:
            default: occurrenceCount
            example: occurrenceCount
            type: string
            enum:
              - occurrenceCount
              - highestSeverity
              - lastSeen
              - currentSeverity
              - currentPriority
              - createdAt
        - name: order
          required: false
          in: query
          description: Sort order
          schema:
            default: DESC
            example: DESC
            type: string
            enum:
              - ASC
              - DESC
              - asc
              - desc
        - name: severityFilter
          required: false
          in: query
          description: >-
            Filter by severity (repeat the param for multiple values, e.g.
            severityFilter=critical&severityFilter=high)
          schema:
            type: array
            items:
              type: string
              enum:
                - critical
                - high
                - medium
                - low
        - name: statusFilter
          required: false
          in: query
          description: >-
            Filter by status (repeat the param for multiple values, e.g.
            statusFilter=to_verify&statusFilter=confirmed)
          schema:
            type: array
            items:
              type: string
              enum:
                - to_verify
                - resolved
                - confirmed
                - ignored
        - name: priorityFilter
          required: false
          in: query
          description: >-
            Filter by priority (repeat the param for multiple values, e.g.
            priorityFilter=critical_urgent&priorityFilter=urgent)
          schema:
            type: array
            items:
              type: string
              enum:
                - critical_urgent
                - urgent
                - normal
                - low
                - very_low
        - name: searchQuery
          required: false
          in: query
          description: Search query
          schema:
            example: SQL Injection
            type: string
        - name: branch
          required: false
          in: query
          description: Filter by branch
          schema:
            example: main
            type: string
        - name: hasAutofix
          required: false
          in: query
          description: >-
            Filter by autofix availability: true = only with autofix, false =
            only without autofix, omit = all
          schema:
            type: boolean
            example: true
      responses:
        '200':
          description: Grouped CICD vulnerabilities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetGroupedVulnerabilitiesResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                example:
                  message: Unauthorized
                  statusCode: 401
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                example:
                  message: Forbidden
                  statusCode: 403
                  timestamp: '2025-02-18T12:31:18.491Z'
                  path: /example/path
components:
  schemas:
    GetGroupedVulnerabilitiesResponseDto:
      type: object
      properties:
        projectId:
          type: string
          description: Project ID
          format: uuid
        projectName:
          type: string
          description: Project name
          example: my-project
        page:
          type: number
          description: Current page number
          example: 1
        limit:
          type: number
          description: Page size
          example: 10
        totalPages:
          type: number
          description: Total number of pages
          example: 5
        sort:
          type: string
          description: Sort field
          example: occurrenceCount
        order:
          type: string
          description: Sort order
          example: DESC
        severity:
          description: Applied severity filters
          type: array
          items:
            type: string
        status:
          description: Applied status filters
          type: array
          items:
            type: string
        priority:
          description: Applied priority filters
          type: array
          items:
            type: string
        groupedVulnerabilities:
          description: Grouped vulnerabilities
          type: array
          items:
            $ref: '#/components/schemas/GroupedVulnerabilityDto'
        total:
          type: number
          description: Total number of groups
          example: 50
        totalOccurrences:
          type: number
          description: Total number of occurrences across all groups
          example: 200
        scanProjectInfo:
          type: object
          description: Scan project info
        vulnCountByType:
          type: object
          description: Vulnerability count by type
        isProjectParsed:
          type: boolean
          description: Whether project has been parsed
        autofixCountByType:
          type: object
          description: Autofix count by type
      required:
        - projectId
        - projectName
        - page
        - limit
        - totalPages
        - sort
        - order
        - severity
        - status
        - priority
        - groupedVulnerabilities
        - total
        - totalOccurrences
    ErrorDto:
      type: object
      properties:
        timestamp:
          type: string
          example: '2025-02-18T12:31:18.491Z'
          description: Timestamp of the error
        service:
          type: string
          example: AiService
          description: Name of the service where the error occurred
        method:
          type: string
          example: startConversation
          description: Method name where the error occurred
        message:
          type: string
          example: Invalid parameters provided
          description: Error message
        code:
          type: number
          example: 400
          description: HTTP status code
          minimum: 100
          maximum: 599
      required:
        - timestamp
        - service
        - method
        - message
        - code
    GroupedVulnerabilityDto:
      type: object
      properties:
        ruleId:
          type: string
          description: Rule/Vulnerability ID
          format: uuid
        vulnerability:
          type: object
          description: Vulnerability metadata
        occurrenceCount:
          type: number
          description: Number of occurrences
          example: 5
        severityBreakdown:
          description: Severity breakdown
          allOf:
            - $ref: '#/components/schemas/SeverityBreakdownDto'
        highestSeverity:
          type: string
          description: Highest severity among occurrences
          example: critical
        language:
          type: string
          description: Programming language
          example: javascript
        occurrences:
          description: All occurrences
          type: array
          items:
            $ref: '#/components/schemas/VulnerabilityOccurrenceDto'
        hasAutofix:
          type: boolean
          description: Whether any occurrence has autofix
          example: true
        firstSeen:
          type: string
          description: First detection date
        lastSeen:
          type: string
          description: Last detection date
      required:
        - ruleId
        - occurrenceCount
        - severityBreakdown
        - highestSeverity
        - language
        - occurrences
        - hasAutofix
        - firstSeen
        - lastSeen
    SeverityBreakdownDto:
      type: object
      properties:
        critical:
          type: number
          description: Number of critical vulnerabilities
          example: 5
        high:
          type: number
          description: Number of high vulnerabilities
          example: 10
        medium:
          type: number
          description: Number of medium vulnerabilities
          example: 20
        low:
          type: number
          description: Number of low vulnerabilities
          example: 15
      required:
        - critical
        - high
        - medium
        - low
    VulnerabilityOccurrenceDto:
      type: object
      properties:
        id:
          type: string
          description: Detection ID
          format: uuid
        path:
          type: string
          description: File path
          example: src/controllers/user.ts
        vulnerableStartLine:
          type: number
          description: Start line of vulnerable code
          example: 42
        vulnerableEndLine:
          type: number
          description: End line of vulnerable code
          example: 50
        currentState:
          type: string
          description: Current state
          example: to_verify
        currentSeverity:
          type: string
          description: Current severity
          example: high
        currentPriority:
          type: string
          description: Current priority
          example: urgent
        createdAt:
          type: string
          description: Detection creation date
        autofixRecords:
          description: Autofix records if available
          type: array
          items:
            type: string
      required:
        - id
        - path
        - vulnerableStartLine
        - vulnerableEndLine
        - currentState
        - currentSeverity
        - currentPriority
        - createdAt

````