All Products
Search
Document Center

Container Registry:ListScanMaliciousFileByTask

Last Updated:Aug 28, 2026

Queries malicious files detected in a scan task, with paginated results.

Operation description

Before you call this operation, use a Security Center scan engine to scan the image.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cr:ListScanMaliciousFile

get

*Instance

acs:cr:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

No

The instance ID.

cri-gu94qynvpwk*****

PageNo

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page. Maximum value: 100. Values greater than 100 cause a parameter error or are capped at 100.

30

Level

string

No

The severity of the malicious file.

serious、suspicious、remind

RepoId

string

No

The image repository ID.

crr-h1y4l279wb8*****

Tag

string

No

The image tag.

V6.11

Digest

string

No

The image digest.

sha256:aa4bffff6406785e930dab1f94c9a1297ba22xxxx71d71504a015764*********

ScanTaskId

string

No

The ID of the image scan task.

79ee6bc2-3288-4c56-b967-**********

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

52AE49C8-B91A-5C1A-821F-C34324B42F7C

Code

integer

The return value.

success

PageNo

integer

The page number. Default value: 1.

1

IsSuccess

boolean

Whether the request succeeded. Valid values:

  • true: successful

  • false: failed

true

PageSize

integer

The number of entries per page.

30

TotalCount

integer

The total number of entries returned.

13

ScanMaliciousFiles

array<object>

The queried malicious files.

object

ScanTaskId

string

The ID of the image scan task.

fe2d8980-de45-4f55-b57d-e438e6d2e972

MaliciousName

string

The type of the malicious file.

疑似含有Webshell代码

MaliciousMd5

string

The MD5 hash value of the malicious file.

e76c9759783cbbc9be0ff91ca3xxxxxx

FirstScanTime

integer

The time when the image was first scanned.

2023-04-10 11:42:06

Level

string

The severity of the malicious file.

remind

FilePath

string

The path of the file.

tenant/0000000000000000/

CreateTime

integer

The time when the image was created.

2023-04-10 11:42:06

UpdateTime

integer

The time when the image was updated.

2023-04-10 11:42:06

Examples

Success response

JSON format

{
  "RequestId": "52AE49C8-B91A-5C1A-821F-C34324B42F7C",
  "Code": 0,
  "PageNo": 1,
  "IsSuccess": true,
  "PageSize": 30,
  "TotalCount": 13,
  "ScanMaliciousFiles": [
    {
      "ScanTaskId": "fe2d8980-de45-4f55-b57d-e438e6d2e972",
      "MaliciousName": "疑似含有Webshell代码",
      "MaliciousMd5": "e76c9759783cbbc9be0ff91ca3xxxxxx",
      "FirstScanTime": 0,
      "Level": "remind",
      "FilePath": "tenant/0000000000000000/",
      "CreateTime": 0,
      "UpdateTime": 0
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.