> ## 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 SCA AutoFix job results

> Get the full results of a completed SCA AutoFix job. Returns all analysis results including fix candidates and PR information.



## OpenAPI

````yaml get /project/{projectId}/results/sca/autofix/{jobId}
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/sca/autofix/{jobId}:
    get:
      tags:
        - Results & Vulnerabilities
      summary: Get SCA AutoFix job results
      description: >-
        Get the full results of a completed SCA AutoFix job. Returns all
        analysis results including fix candidates and PR information.
      operationId: ResultController_getScaAutoFixJobResult
      parameters:
        - name: projectId
          required: true
          in: path
          description: Project identifier
          schema:
            format: uuid
            type: string
        - name: jobId
          required: true
          in: path
          description: Job ID returned from the startScaAutoFix endpoint
          schema:
            type: string
      responses:
        '200':
          description: Job results retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetScaAutoFixJobResultResponseDto'
        '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
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    GetScaAutoFixJobResultResponseDto:
      type: object
      properties:
        jobId:
          type: string
          description: Job ID
          example: sca-autofix-550e8400-e29b-41d4-a716-446655440000-0
        projectId:
          type: string
          description: Project ID
          example: 550e8400-e29b-41d4-a716-446655440000
        status:
          type: string
          description: Job status
          enum:
            - completed
            - failed
            - processing
            - queued
          example: completed
        success:
          type: boolean
          description: Whether the analysis was successful
          example: true
        message:
          type: string
          description: Human-friendly summary
          example: Found fixes for 3 out of 5 vulnerabilities
        results:
          description: Results for each vulnerability
          type: array
          items:
            $ref: '#/components/schemas/ScaAutoFixAnalysisResultDto'
        totalVulnerabilities:
          type: number
          description: Total number of vulnerabilities analyzed
          example: 5
        fixableCount:
          type: number
          description: Number of vulnerabilities with fixes available
          example: 3
        unfixableCount:
          type: number
          description: Number of vulnerabilities without fixes
          example: 1
        errorCount:
          type: number
          description: Number of vulnerabilities that failed analysis
          example: 1
        prResult:
          description: PR creation result
          allOf:
            - $ref: '#/components/schemas/ScaAutoFixPRResultDto'
        createdAt:
          type: string
          description: Job creation timestamp
          example: '2024-01-15T10:30:00.000Z'
        completedAt:
          type: string
          description: Job completion timestamp
          example: '2024-01-15T10:31:30.000Z'
      required:
        - jobId
        - projectId
        - status
        - success
        - message
        - results
        - totalVulnerabilities
        - fixableCount
        - unfixableCount
        - errorCount
        - createdAt
    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
    ScaAutoFixAnalysisResultDto:
      type: object
      properties:
        vulnerabilityId:
          type: string
          description: Database ID of the SCA vulnerability detection
          example: 550e8400-e29b-41d4-a716-446655440000
        cveId:
          type: string
          description: CVE/GHSA ID
          example: CVE-2020-7598
        severity:
          type: string
          description: Severity level
          enum:
            - CRITICAL
            - HIGH
            - MEDIUM
            - LOW
            - INFO
          example: HIGH
        summary:
          type: string
          description: Vulnerability summary from OSV
          example: Prototype Pollution in minimist
        vulnerablePackage:
          type: string
          description: Package name that is vulnerable
          example: minimist
        vulnerableVersion:
          type: string
          description: Current vulnerable version
          example: 0.0.8
        dependencyPath:
          description: >-
            Path from root to vulnerable package (e.g., ["mkdirp@0.5.1",
            "minimist@0.0.8"])
          example:
            - mkdirp@0.5.1
            - minimist@0.0.8
          type: array
          items:
            type: string
        ecosystem:
          type: string
          description: 'Package ecosystem: npm, maven, pip, etc.'
          example: npm
        isTransitive:
          type: boolean
          description: Whether this is a transitive dependency
          example: true
        fileName:
          type: string
          description: Lockfile path (for monorepo support)
          example: package-lock.json
          nullable: true
        fixCandidates:
          description: All possible fixes found
          type: array
          items:
            $ref: '#/components/schemas/ScaFixCandidateDto'
        recommendedFix:
          description: 'Best fix (most conservative: patch > minor > major)'
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ScaFixCandidateDto'
        hasFixAvailable:
          type: boolean
          description: Whether a fix was found
          example: true
        testedVersionsCount:
          type: number
          description: Number of versions tested
          example: 5
        status:
          type: string
          description: 'Analysis status: ok, no_fix, error, or direct_update'
          enum:
            - ok
            - no_fix
            - error
            - direct_update
          example: ok
        errorMessage:
          type: string
          description: Error message if status is "error"
          nullable: true
        installCommand:
          type: string
          description: Command to apply the fix (e.g., "npm install mkdirp@0.5.5")
          example: npm install mkdirp@0.5.5
          nullable: true
      required:
        - vulnerabilityId
        - cveId
        - severity
        - vulnerablePackage
        - vulnerableVersion
        - dependencyPath
        - ecosystem
        - isTransitive
        - fixCandidates
        - hasFixAvailable
        - testedVersionsCount
        - status
    ScaAutoFixPRResultDto:
      type: object
      properties:
        created:
          type: boolean
          description: Whether a PR was created
          example: true
        prUrl:
          type: string
          description: URL of the created PR
          example: https://github.com/org/repo/pull/123
        prNumber:
          type: number
          description: PR number
          example: 123
        branchName:
          type: string
          description: Name of the created branch
          example: fix/sca-autofix-2024-01-15
        error:
          type: string
          description: Error message if PR creation failed
          nullable: true
      required:
        - created
    ScaFixCandidateDto:
      type: object
      properties:
        parentPackage:
          type: string
          description: Parent package to update (the direct dependency)
          example: mkdirp
        currentVersion:
          type: string
          description: Current version of parent
          example: 0.5.1
        proposedVersion:
          type: string
          description: Recommended version to upgrade to
          example: 0.5.5
        vulnerableChild:
          type: string
          description: The transitive vulnerable package
          example: minimist
        vulnerableChildVersion:
          type: string
          description: Current vulnerable version
          example: 0.0.8
        fixedChildVersion:
          type: string
          description: Version of child after parent upgrade (null if removed from tree)
          example: 1.2.6
          nullable: true
        requiredChildVersion:
          type: string
          description: Minimum version required to fix
          example: 1.2.2
        updateType:
          type: string
          description: 'Type of update: patch, minor, or major'
          enum:
            - patch
            - minor
            - major
          example: patch
        isValid:
          type: boolean
          description: Whether this fix actually resolves the vulnerability
          example: true
      required:
        - parentPackage
        - currentVersion
        - proposedVersion
        - vulnerableChild
        - vulnerableChildVersion
        - requiredChildVersion
        - updateType
        - isValid

````