Kaspersky Endpoint Security 11 for Linux

扫描 Docker 镜像的请求

2023年4月20日

ID 213879

Content-Type

text/plain

请求主体

要扫描的 Docker 镜像的链接。

可以是以下值:

  • 存储库中镜像的路径(例如,https://index.docker.io/jerbi/eicar:latest)。
  • 多个镜像的路径掩码(例如,https://index.docker.io/<名称掩码>:<标签掩码>)。您可以使用 ? 和 * 符号表示掩码。

响应示例:

{

"completed": "Sun, 31 Jan 2021 10:29:26 GMT",

"created": "Sun, 31 Jan 2021 10:29:20 GMT",

"progress": 100,

"scan_result": {

"jerbi/eicar:latest": {

"started": "2021-01-31 10:29:25",

"stopped": "2021-01-31 10:29:26",

"threats": [

{

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

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

}

],

"verdict": "infected"

}

},

"status": "completed",

"verdicts": [

"infected"

]

}

可能的错误

一个使用 Docker REST API 的请求被用于按掩码获取镜像列表。

但是,在许多公共服务器上,出于安全原因已将其禁用。尝试在此类服务器上按掩码扫描镜像会导致错误。

错误示例:

{

"completed": "Mon, 01 Mar 2021 07:02:24 GMT",

"created": "Mon, 01 Mar 2021 07:02:22 GMT",

"scan_errors": [

{

"code": 401,

"details": {

"context": {

"image_mask": "/jerbi/eic*:latest",

"repository": "index.docker.io",

"repository_base": "index.docker.io"

},

"errors": [

"Unauthorized"

]

},

"message": "Invalid source"

},

[

"Unauthorized"

]

],

"status": "completed"

}

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.