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

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 部分可以包含以下设置:

在请求主体的描述中,可以指定 $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"

]

}

页面顶部