Kaspersky Endpoint Security 11 for Linux

Request to scan Docker images

December 12, 2023

ID 213879

Content-Type

text/plain

Request body

Link to the Docker images to scan.

The following values are available:

  • Path to an image in the repository (for example, https://index.docker.io/jerbi/eicar:latest).
  • Path mask for multiple images (for example, https://index.docker.io/<name mask>:<tag mask>). You can use the ? and * symbols to indicate a mask.

Response example:

{

"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"

]

}

Possible errors

A request using the Docker REST API is used to get a list of images by mask.

However, on many public servers it is disabled for security reasons. An attempt to scan images by mask on such servers results in an error.

Error example:

{

"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.