Kaspersky Endpoint Security 11 for Linux

扫描具有附加设置的 Docker 镜像的请求

2023年4月20日

ID 213880

Content-Type

application/json

请求主体

以下类型的 JSON:

{

"source": "https://index.docker.io/jerbi/eicar:latest",

"params": {

"destination": "https://fake",

"skipimageifexists": true,

"custom_callbacks": {

"on_detect": {

"uri": "http://10.16.42.75:5050",

"content-type": "application/json",

"body": {

"session_id": "100",

"session_init": "20201105T072403+0300",

"infected_items": "$infected"

}

},

"on_complete": {

"body": {

"session_id": "100",

},

"uri": "http://10.16.42.75:5050/on_complete",

}

}

}

}

附加请求设置

params 部分可以包含以下设置:

  • destination(可选)– 扫描的镜像将复制到的服务器。
  • skipimageifexists(可选)– 如果目标服务器已经有具有相同名称和 SHA-256 哈希的镜像,则不扫描或复制镜像。仅当指定 destination 设置时,才能指定此设置。
  • custom_callbacks(可选)– 描述扫描完成时应发送的请求:
    • on_detect – 如果检测到威胁,则发送请求。
    • on_complete – 扫描完成后始终发送请求。

在请求主体的描述中,可以指定 $infected 替换变量。受感染对象的列表将替换此变量。

响应示例:

{

"completed": "Mon, 01 Mar 2021 07:13:49 GMT",

"created": "Mon, 01 Mar 2021 07:13:42 GMT",

"progress": 100,

"scan_errors": [

{

"code": 500,

"message": "Unable to get images hash from destination registry"

}

],

"scan_params": {

"destination": "https://fake",

"skipimageifexists": true

},

"scan_result": {

"jerbi/eicar:latest": {

"started": "2021-03-01 07:13:48",

"stopped": "2021-03-01 07:13:49",

"threats": [

{

"name": "EICAR-Test-File",

"object": "[image:docker.io/jerbi/eicar:latest] /eicar.com.txt"

}

],

"verdict": "infected"

}

},

"status": "completed",

"verdicts": [

"infected"

]

}

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.