Container Registry API, gRPC: ScannerService
A set of methods for scanning Docker images.
Call | Description |
---|---|
Scan | Executes scanning of specified image. |
Get | Returns the specified ScanResult resource. |
GetLast | Returns the last finished ScanResult for the specified Image. |
List | Retrieves the list of ScanResults for specified Image. |
ListVulnerabilities | Retrieves the list of vulnerabilities found in particular scan. |
Calls ScannerService
Scan
Executes scanning of specified image.
rpc Scan (ScanRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:ScanMetadata
Operation.response:ScanResult
ScanRequest
Field | Description |
---|---|
image_id | string Required. ID of the Image to be scanned for vulnerabilities. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
ScanMetadata
Field | Description |
---|---|
scan_result_id | string ID of the ScanResult that is being created. |
ScanResult
Field | Description |
---|---|
id | string Output only. ID of the ScanResult. |
image_id | string Output only. ID of the Image that the ScanResult belongs to. |
scanned_at | google.protobuf.Timestamp Output only. The timestamp in RFC3339 |
status | enum Status Output only. The status of the ScanResult.
|
vulnerabilities | VulnerabilityStats Output only. Summary information about vulnerabilities found. |
VulnerabilityStats
Field | Description |
---|---|
critical | int64 Count of CRITICAL vulnerabilities. |
high | int64 Count of HIGH vulnerabilities. |
medium | int64 Count of MEDIUM vulnerabilities. |
low | int64 Count of LOW vulnerabilities. |
negligible | int64 Count of NEGLIGIBLE vulnerabilities. |
undefined | int64 Count of other vulnerabilities. |
Get
Returns the specified ScanResult resource.
To get the list of ScanResults for specified Image, make a List request.
rpc Get (GetScanResultRequest) returns (ScanResult)
GetScanResultRequest
Field | Description |
---|---|
scan_result_id | string Required. ID of the ScanResult to return. The maximum string length in characters is 50. |
ScanResult
Field | Description |
---|---|
id | string Output only. ID of the ScanResult. |
image_id | string Output only. ID of the Image that the ScanResult belongs to. |
scanned_at | google.protobuf.Timestamp Output only. The timestamp in RFC3339 |
status | enum Status Output only. The status of the ScanResult.
|
vulnerabilities | VulnerabilityStats Output only. Summary information about vulnerabilities found. |
VulnerabilityStats
Field | Description |
---|---|
critical | int64 Count of CRITICAL vulnerabilities. |
high | int64 Count of HIGH vulnerabilities. |
medium | int64 Count of MEDIUM vulnerabilities. |
low | int64 Count of LOW vulnerabilities. |
negligible | int64 Count of NEGLIGIBLE vulnerabilities. |
undefined | int64 Count of other vulnerabilities. |
GetLast
Returns the last finished ScanResult for the specified Image.
rpc GetLast (GetLastScanResultRequest) returns (ScanResult)
GetLastScanResultRequest
Field | Description |
---|---|
image_id | string ID of the Image to get last finished ScanResult. The maximum string length in characters is 50. |
ScanResult
Field | Description |
---|---|
id | string Output only. ID of the ScanResult. |
image_id | string Output only. ID of the Image that the ScanResult belongs to. |
scanned_at | google.protobuf.Timestamp Output only. The timestamp in RFC3339 |
status | enum Status Output only. The status of the ScanResult.
|
vulnerabilities | VulnerabilityStats Output only. Summary information about vulnerabilities found. |
VulnerabilityStats
Field | Description |
---|---|
critical | int64 Count of CRITICAL vulnerabilities. |
high | int64 Count of HIGH vulnerabilities. |
medium | int64 Count of MEDIUM vulnerabilities. |
low | int64 Count of LOW vulnerabilities. |
negligible | int64 Count of NEGLIGIBLE vulnerabilities. |
undefined | int64 Count of other vulnerabilities. |
List
Retrieves the list of ScanResults for specified Image.
rpc List (ListScanResultsRequest) returns (ListScanResultsResponse)
ListScanResultsRequest
Field | Description |
---|---|
id | oneof: image_id or repository_id ID of the Image or Repository to list ScanResults for. To get the image ID use a containerregistry.v1.ImageService.List request. To get the repository ID use a containerregistry.v1.RepositoryService.List request. |
image_id | string ID of the Image or Repository to list ScanResults for. To get the image ID use a containerregistry.v1.ImageService.List request. To get the repository ID use a containerregistry.v1.RepositoryService.List request. The maximum string length in characters is 50. |
repository_id | string ID of the Image or Repository to list ScanResults for. To get the image ID use a containerregistry.v1.ImageService.List request. To get the repository ID use a containerregistry.v1.RepositoryService.List request. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListRegistriesResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. Acceptable values are 0 to 1000, inclusive. |
page_token | string Page token. To get the next page of results, set page_token to the ListRegistriesResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters resources listed in the response. The expression must specify:
|
order_by | string An order expression that orders resources listed in the response. The expression must specify:
|
ListScanResultsResponse
Field | Description |
---|---|
scan_results[] | ScanResult List of ScanResult resources. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListImagesRequest.page_size, use the next_page_token as the value for the ListImagesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results. |
ScanResult
Field | Description |
---|---|
id | string Output only. ID of the ScanResult. |
image_id | string Output only. ID of the Image that the ScanResult belongs to. |
scanned_at | google.protobuf.Timestamp Output only. The timestamp in RFC3339 |
status | enum Status Output only. The status of the ScanResult.
|
vulnerabilities | VulnerabilityStats Output only. Summary information about vulnerabilities found. |
VulnerabilityStats
Field | Description |
---|---|
critical | int64 Count of CRITICAL vulnerabilities. |
high | int64 Count of HIGH vulnerabilities. |
medium | int64 Count of MEDIUM vulnerabilities. |
low | int64 Count of LOW vulnerabilities. |
negligible | int64 Count of NEGLIGIBLE vulnerabilities. |
undefined | int64 Count of other vulnerabilities. |
ListVulnerabilities
Retrieves the list of vulnerabilities found in particular scan.
rpc ListVulnerabilities (ListVulnerabilitiesRequest) returns (ListVulnerabilitiesResponse)
ListVulnerabilitiesRequest
Field | Description |
---|---|
scan_result_id | string Required. ID of the ScanResult to get list of vulnerabilities for. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListRegistriesResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. Acceptable values are 0 to 1000, inclusive. |
page_token | string Page token. To get the next page of results, set page_token to the ListRegistriesResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters resources listed in the response. The expression must specify:
|
order_by | string An order expression that orders resources listed in the response. The expression must specify:
|
ListVulnerabilitiesResponse
Field | Description |
---|---|
vulnerabilities[] | Vulnerability List of Vulnerability resources. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListImagesRequest.page_size, use the next_page_token as the value for the ListImagesRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results. |
Vulnerability
Field | Description |
---|---|
severity | enum Severity Output only. Severity of the Vulnerability.
|
vulnerability | oneof: package Details of vulnerability depending on type. Only package vulnerability is supported at the moment. |
package | PackageVulnerability Details of vulnerability depending on type. Only package vulnerability is supported at the moment. |
PackageVulnerability
Field | Description |
---|---|
name | string Name of vulnerability in CVE database. |
link | string URL to the page with description of vulnerability. |
package | string The package name where vulnerability has been found. |
source | string The package manager name. Ex.: yum, rpm, dpkg. |
version | string The version of the package where vulnerability has been found. |
fixed_by | string The version of the package where vulnerability has been fixed. |