Start a public container scan
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/scan/container/start \
--header 'Content-Type: application/json' \
--data '
{
"imageToScan": "node:18-alpine",
"branch": "main",
"vulnerabilityTypes": [
"CRITICAL",
"HIGH"
],
"sourceType": "manual"
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/scan/container/start"
payload = {
"imageToScan": "node:18-alpine",
"branch": "main",
"vulnerabilityTypes": ["CRITICAL", "HIGH"],
"sourceType": "manual"
}
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({
imageToScan: 'node:18-alpine',
branch: 'main',
vulnerabilityTypes: ['CRITICAL', 'HIGH'],
sourceType: 'manual'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/scan/container/start', 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}/scan/container/start",
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([
'imageToScan' => 'node:18-alpine',
'branch' => 'main',
'vulnerabilityTypes' => [
'CRITICAL',
'HIGH'
],
'sourceType' => 'manual'
]),
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}/scan/container/start"
payload := strings.NewReader("{\n \"imageToScan\": \"node:18-alpine\",\n \"branch\": \"main\",\n \"vulnerabilityTypes\": [\n \"CRITICAL\",\n \"HIGH\"\n ],\n \"sourceType\": \"manual\"\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}/scan/container/start")
.header("Content-Type", "application/json")
.body("{\n \"imageToScan\": \"node:18-alpine\",\n \"branch\": \"main\",\n \"vulnerabilityTypes\": [\n \"CRITICAL\",\n \"HIGH\"\n ],\n \"sourceType\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/scan/container/start")
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 \"imageToScan\": \"node:18-alpine\",\n \"branch\": \"main\",\n \"vulnerabilityTypes\": [\n \"CRITICAL\",\n \"HIGH\"\n ],\n \"sourceType\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"scanId": "<string>",
"detectedLanguages": [
"<string>"
]
}{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}Scanning
Start a public container scan
Initiates a container image vulnerability scan for a public Docker image.
POST
/
project
/
{projectId}
/
scan
/
container
/
start
Start a public container scan
curl --request POST \
--url https://api-eu.cybedefend.com/project/{projectId}/scan/container/start \
--header 'Content-Type: application/json' \
--data '
{
"imageToScan": "node:18-alpine",
"branch": "main",
"vulnerabilityTypes": [
"CRITICAL",
"HIGH"
],
"sourceType": "manual"
}
'import requests
url = "https://api-eu.cybedefend.com/project/{projectId}/scan/container/start"
payload = {
"imageToScan": "node:18-alpine",
"branch": "main",
"vulnerabilityTypes": ["CRITICAL", "HIGH"],
"sourceType": "manual"
}
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({
imageToScan: 'node:18-alpine',
branch: 'main',
vulnerabilityTypes: ['CRITICAL', 'HIGH'],
sourceType: 'manual'
})
};
fetch('https://api-eu.cybedefend.com/project/{projectId}/scan/container/start', 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}/scan/container/start",
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([
'imageToScan' => 'node:18-alpine',
'branch' => 'main',
'vulnerabilityTypes' => [
'CRITICAL',
'HIGH'
],
'sourceType' => 'manual'
]),
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}/scan/container/start"
payload := strings.NewReader("{\n \"imageToScan\": \"node:18-alpine\",\n \"branch\": \"main\",\n \"vulnerabilityTypes\": [\n \"CRITICAL\",\n \"HIGH\"\n ],\n \"sourceType\": \"manual\"\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}/scan/container/start")
.header("Content-Type", "application/json")
.body("{\n \"imageToScan\": \"node:18-alpine\",\n \"branch\": \"main\",\n \"vulnerabilityTypes\": [\n \"CRITICAL\",\n \"HIGH\"\n ],\n \"sourceType\": \"manual\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eu.cybedefend.com/project/{projectId}/scan/container/start")
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 \"imageToScan\": \"node:18-alpine\",\n \"branch\": \"main\",\n \"vulnerabilityTypes\": [\n \"CRITICAL\",\n \"HIGH\"\n ],\n \"sourceType\": \"manual\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"scanId": "<string>",
"detectedLanguages": [
"<string>"
]
}{
"timestamp": "2025-02-18T12:31:18.491Z",
"service": "AiService",
"method": "startConversation",
"message": "Invalid parameters provided",
"code": 400
}Path Parameters
The unique identifier of the project to scan
Example:
"550e8400-e29b-41d4-a716-446655440000"
Body
application/json
The public Docker image to scan (e.g., "alpine:latest", "node:18-alpine")
Example:
"node:18-alpine"
Branch name for tracking purposes
Example:
"main"
Types of vulnerabilities to look for.
Example:
["CRITICAL", "HIGH"]Source type of the scan (manual, cli, github, gitlab). Defaults to manual if not provided.
Available options:
manual, cli, github, gitlab, jetbrains, vscode Example:
"manual"
Response
Container scan initiated successfully
⌘I