- NAME
-
- gcloud artifacts docker images scan - perform a vulnerability scan on a container image
- SYNOPSIS
-
-
gcloud artifacts docker images scan
RESOURCE_URI
[--additional-package-types
=[ADDITIONAL_PACKAGE_TYPES
,…]] [--async
] [--location
=LOCATION
; default="us"] [--remote
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
You can scan a container image in a Google Cloud registry (Artifact Registry or
Container Registry), or a local container image.
Reference an image by tag or digest using any of the formats:
Artifact Registry: LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE[:tag] LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE@sha256:digest
Container Registry: [LOCATION.]gcr.io/PROJECT-ID/REPOSITORY-ID/IMAGE[:tag] [LOCATION.]gcr.io/PROJECT-ID/REPOSITORY-ID/IMAGE@sha256:digest
Local: IMAGE[:tag]
- EXAMPLES
-
Start a scan of a container image stored in Artifact Registry:
gcloud artifacts docker images scan us-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyz --remote
Start a scan of a container image stored in the Container Registry, and perform the analysis in Europe:
gcloud artifacts docker images scan eu.gcr.io/my-project/my-repository/my-image:latest --remote --location=europe
Start a scan of a container image stored locally, and perform the analysis in Asia:
gcloud artifacts docker images scan ubuntu:latest --location=asia
- POSITIONAL ARGUMENTS
-
RESOURCE_URI
- A container image in a Google Cloud registry (Artifact Registry or Container Registry), or a local container image.
- FLAGS
-
--additional-package-types
=[ADDITIONAL_PACKAGE_TYPES
,…]-
A comma-separated list of package types to scan in addition to OS packages.
ADDITIONAL_PACKAGE_TYPES
must be one of:GO
- Go standard library and third party packages.
MAVEN
- Maven package.
--async
- Return immediately, without waiting for the operation in progress to complete.
--location
=LOCATION
; default="us"-
The API location in which to perform package analysis. Consider choosing a
location closest to where you are located. Proximity to the container image does
not affect response time.
LOCATION
must be one of:asia
- Perform analysis in Asia
europe
- Perform analysis in Europe
us
- Perform analysis in the US
--remote
- Whether the container image is located remotely or on your local machine.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file
,--account
,--billing-project
,--configuration
,--flags-file
,--flatten
,--format
,--help
,--impersonate-service-account
,--log-http
,--project
,--quiet
,--trace-token
,--user-output-enabled
,--verbosity
.Run
$ gcloud help
for details. - NOTES
-
This variant is also available:
gcloud beta artifacts docker images scan
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"lastModified": "Last updated 2024-02-06 UTC.",
"confidential": False
}