Skip to main content
GET
/
project
/
{projectId}
/
results
/
sca
/
autofix
/
{jobId}
Get SCA AutoFix job results
curl --request GET \
  --url https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix/{jobId} \
  --header 'x-api-key: <api-key>'
{
  "jobId": "sca-autofix-550e8400-e29b-41d4-a716-446655440000-0",
  "projectId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "success": true,
  "message": "Found fixes for 3 out of 5 vulnerabilities",
  "results": [
    {
      "vulnerabilityId": "550e8400-e29b-41d4-a716-446655440000",
      "cveId": "CVE-2020-7598",
      "severity": "HIGH",
      "vulnerablePackage": "minimist",
      "vulnerableVersion": "0.0.8",
      "dependencyPath": [
        "[email protected]",
        "[email protected]"
      ],
      "ecosystem": "npm",
      "isTransitive": true,
      "fixCandidates": [
        {
          "parentPackage": "mkdirp",
          "currentVersion": "0.5.1",
          "proposedVersion": "0.5.5",
          "vulnerableChild": "minimist",
          "vulnerableChildVersion": "0.0.8",
          "requiredChildVersion": "1.2.2",
          "updateType": "patch",
          "isValid": true,
          "fixedChildVersion": "1.2.6"
        }
      ],
      "hasFixAvailable": true,
      "testedVersionsCount": 5,
      "status": "ok",
      "summary": "Prototype Pollution in minimist",
      "fileName": "package-lock.json",
      "recommendedFix": {
        "parentPackage": "mkdirp",
        "currentVersion": "0.5.1",
        "proposedVersion": "0.5.5",
        "vulnerableChild": "minimist",
        "vulnerableChildVersion": "0.0.8",
        "requiredChildVersion": "1.2.2",
        "updateType": "patch",
        "isValid": true,
        "fixedChildVersion": "1.2.6"
      },
      "errorMessage": "<string>",
      "installCommand": "npm install [email protected]"
    }
  ],
  "totalVulnerabilities": 5,
  "fixableCount": 3,
  "unfixableCount": 1,
  "errorCount": 1,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "prResult": {
    "created": true,
    "prUrl": "https://github.com/org/repo/pull/123",
    "prNumber": 123,
    "branchName": "fix/sca-autofix-2024-01-15",
    "error": "<string>"
  },
  "completedAt": "2024-01-15T10:31:30.000Z"
}

Authorizations

x-api-key
string
header
required

API Key for authentication. You can generate an API key from your personal settings.

Path Parameters

projectId
string<uuid>
required

Project identifier

jobId
string
required

Job ID returned from the startScaAutoFix endpoint

Response

Job results retrieved successfully

jobId
string
required

Job ID

Example:

"sca-autofix-550e8400-e29b-41d4-a716-446655440000-0"

projectId
string
required

Project ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

status
enum<string>
required

Job status

Available options:
completed,
failed,
processing,
queued
Example:

"completed"

success
boolean
required

Whether the analysis was successful

Example:

true

message
string
required

Human-friendly summary

Example:

"Found fixes for 3 out of 5 vulnerabilities"

results
object[]
required

Results for each vulnerability

totalVulnerabilities
number
required

Total number of vulnerabilities analyzed

Example:

5

fixableCount
number
required

Number of vulnerabilities with fixes available

Example:

3

unfixableCount
number
required

Number of vulnerabilities without fixes

Example:

1

errorCount
number
required

Number of vulnerabilities that failed analysis

Example:

1

createdAt
string
required

Job creation timestamp

Example:

"2024-01-15T10:30:00.000Z"

prResult
object

PR creation result

completedAt
string

Job completion timestamp

Example:

"2024-01-15T10:31:30.000Z"