> ## 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 vulnerability by ID with similar occurrences

> Returns a vulnerability and all similar occurrences (same rule for SAST/IAC/CICD/Secret, same CVE for SCA).



## OpenAPI

````yaml get /project/{projectId}/results/{vulnerabilityId}/similar
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/{vulnerabilityId}/similar:
    get:
      tags:
        - Results & Vulnerabilities
      summary: Get vulnerability by ID with similar occurrences
      description: >-
        Returns a vulnerability and all similar occurrences (same rule for
        SAST/IAC/CICD/Secret, same CVE for SCA).
      operationId: ResultController_getVulnerabilityWithSimilar
      parameters:
        - name: projectId
          required: true
          in: path
          schema:
            format: uuid
            type: string
        - name: vulnerabilityId
          required: true
          in: path
          schema:
            format: uuid
            type: string
        - name: pathFilter
          required: false
          in: query
          description: Optional filter to narrow similar occurrences by path
          schema:
            type: string
      responses:
        '200':
          description: Vulnerability with similar occurrences
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVulnerabilityWithSimilarResponseDto'
        '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:
    GetVulnerabilityWithSimilarResponseDto:
      type: object
      properties:
        projectId:
          type: string
          description: Project ID
          format: uuid
        vulnerabilityId:
          type: string
          description: Vulnerability ID
          format: uuid
        sast:
          type: object
          description: SAST vulnerability if applicable
        iac:
          type: object
          description: IAC vulnerability if applicable
        sca:
          type: object
          description: SCA vulnerability if applicable
        cicd:
          type: object
          description: CICD vulnerability if applicable
        secret:
          type: object
          description: Secret vulnerability if applicable
        isProjectParsed:
          type: boolean
          description: Whether project has been parsed
        similarOccurrences:
          description: Similar occurrences
          type: array
          items:
            $ref: '#/components/schemas/VulnerabilityOccurrenceDto'
        totalSimilar:
          type: number
          description: Total number of similar occurrences
          example: 5
      required:
        - projectId
        - vulnerabilityId
        - similarOccurrences
        - totalSimilar
    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
    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

````