curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix \
--header 'Content-Type: application/json' \
--data '
{
"vulnerabilityIds": [
"550e8400-e29b-41d4-a716-446655440000"
],
"updateLevel": "auto",
"singleFix": false,
"createPr": false,
"targetBranch": "main"
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix"
payload = {
"vulnerabilityIds": ["550e8400-e29b-41d4-a716-446655440000"],
"updateLevel": "auto",
"singleFix": False,
"createPr": False,
"targetBranch": "main"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vulnerabilityIds: ['550e8400-e29b-41d4-a716-446655440000'],
updateLevel: 'auto',
singleFix: false,
createPr: false,
targetBranch: 'main'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vulnerabilityIds' => [
'550e8400-e29b-41d4-a716-446655440000'
],
'updateLevel' => 'auto',
'singleFix' => false,
'createPr' => false,
'targetBranch' => 'main'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix"
payload := strings.NewReader("{\n \"vulnerabilityIds\": [\n \"550e8400-e29b-41d4-a716-446655440000\"\n ],\n \"updateLevel\": \"auto\",\n \"singleFix\": false,\n \"createPr\": false,\n \"targetBranch\": \"main\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix")
.header("Content-Type", "application/json")
.body("{\n \"vulnerabilityIds\": [\n \"550e8400-e29b-41d4-a716-446655440000\"\n ],\n \"updateLevel\": \"auto\",\n \"singleFix\": false,\n \"createPr\": false,\n \"targetBranch\": \"main\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vulnerabilityIds\": [\n \"550e8400-e29b-41d4-a716-446655440000\"\n ],\n \"updateLevel\": \"auto\",\n \"singleFix\": false,\n \"createPr\": false,\n \"targetBranch\": \"main\"\n}"
response = http.request(request)
puts response.read_body{
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"status": "ok",
"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": [
"mkdirp@0.5.1",
"minimist@0.0.8"
],
"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 mkdirp@0.5.5"
}
],
"totalVulnerabilities": 5,
"fixableCount": 3,
"unfixableCount": 1,
"errorCount": 1,
"jobId": "sca-autofix-550e8400-e29b-41d4-a716-446655440000-0"
}{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}Analyze SCA vulnerabilities for autofix candidates
Analyzes SCA vulnerabilities using DeepFix to find fix candidates. For transitive dependencies, determines which version of the direct dependency will resolve the vulnerable package to a safe version. Returns the dependency path showing the import chain and recommended fixes.
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix \
--header 'Content-Type: application/json' \
--data '
{
"vulnerabilityIds": [
"550e8400-e29b-41d4-a716-446655440000"
],
"updateLevel": "auto",
"singleFix": false,
"createPr": false,
"targetBranch": "main"
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix"
payload = {
"vulnerabilityIds": ["550e8400-e29b-41d4-a716-446655440000"],
"updateLevel": "auto",
"singleFix": False,
"createPr": False,
"targetBranch": "main"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vulnerabilityIds: ['550e8400-e29b-41d4-a716-446655440000'],
updateLevel: 'auto',
singleFix: false,
createPr: false,
targetBranch: 'main'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vulnerabilityIds' => [
'550e8400-e29b-41d4-a716-446655440000'
],
'updateLevel' => 'auto',
'singleFix' => false,
'createPr' => false,
'targetBranch' => 'main'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix"
payload := strings.NewReader("{\n \"vulnerabilityIds\": [\n \"550e8400-e29b-41d4-a716-446655440000\"\n ],\n \"updateLevel\": \"auto\",\n \"singleFix\": false,\n \"createPr\": false,\n \"targetBranch\": \"main\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix")
.header("Content-Type", "application/json")
.body("{\n \"vulnerabilityIds\": [\n \"550e8400-e29b-41d4-a716-446655440000\"\n ],\n \"updateLevel\": \"auto\",\n \"singleFix\": false,\n \"createPr\": false,\n \"targetBranch\": \"main\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/results/sca/autofix")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vulnerabilityIds\": [\n \"550e8400-e29b-41d4-a716-446655440000\"\n ],\n \"updateLevel\": \"auto\",\n \"singleFix\": false,\n \"createPr\": false,\n \"targetBranch\": \"main\"\n}"
response = http.request(request)
puts response.read_body{
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"status": "ok",
"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": [
"mkdirp@0.5.1",
"minimist@0.0.8"
],
"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 mkdirp@0.5.5"
}
],
"totalVulnerabilities": 5,
"fixableCount": 3,
"unfixableCount": 1,
"errorCount": 1,
"jobId": "sca-autofix-550e8400-e29b-41d4-a716-446655440000-0"
}{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}Path Parameters
Project identifier
Body
Array of SCA vulnerability detection IDs to analyze
["550e8400-e29b-41d4-a716-446655440000"]
Maximum update level allowed: patch, minor, major, or auto (auto-escalates from patch to major)
patch, minor, major, auto "auto"
If true, stop at first valid fix found (faster). If false, find all possible fixes.
false
If true, create a Pull Request with the fixes. Requires project to be linked to GitHub/GitLab.
false
Target branch name for the PR. If not specified, uses the default branch.
"main"
Response
SCA AutoFix analysis completed successfully
Project ID
"550e8400-e29b-41d4-a716-446655440000"
True if at least one vulnerability has a fix
true
Overall status: ok, partial, no_fix, or error
ok, partial, no_fix, error "ok"
Human-friendly summary
"Found fixes for 3 out of 5 vulnerabilities"
Results for each vulnerability
Show child attributes
Show child attributes
Total number of vulnerabilities analyzed
5
Number of vulnerabilities with fixes available
3
Number of vulnerabilities without fixes
1
Number of vulnerabilities that failed analysis
1
Job ID for polling status (only set when status is "queued" or "processing")
"sca-autofix-550e8400-e29b-41d4-a716-446655440000-0"