0
0
GCPcloud~10 mins

Container vulnerability scanning in GCP - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to trigger vulnerability scanning on a Google Cloud container image.

GCP
gcloud container images scan [1]
Drag options to blanks, or click blank then click option'
Agcr.io/my-project/my-image@sha256:abc123
Bgcr.io/my-project/my-image:latest
Cgcr.io/my-project/my-image:vuln-scan
Dgcr.io/my-project/my-image:scan
Attempts:
3 left
💡 Hint
Common Mistakes
Using a tag like ':latest' instead of the image digest.
Using a non-existent tag for scanning.
2fill in blank
medium

Complete the command to list vulnerability scans for a container image in Google Cloud.

GCP
gcloud container images [1] gcr.io/my-project/my-image@sha256:abc123 --format=json
Drag options to blanks, or click blank then click option'
Adescribe
Blist-vulnerabilities
Clist-tags
Dlist-scans
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list-tags' which only lists image tags.
Using 'describe' which shows metadata but not vulnerabilities.
3fill in blank
hard

Complete the command to trigger vulnerability scanning on a container image.

GCP
gcloud container images [1] gcr.io/my-project/my-image:latest
Drag options to blanks, or click blank then click option'
Ascan-enable
Bvulnerability-scan
Cenable-scanning
Dscan
Attempts:
3 left
💡 Hint
Common Mistakes
Using made-up subcommands like 'scan-enable'.
Using incorrect subcommands like 'vulnerability-scan'.
4fill in blank
hard

Fill in the blank to create a filter that lists only HIGH severity vulnerabilities for a container image.

GCP
gcloud container images list-vulnerabilities gcr.io/my-project/my-image@sha256:abc123 --filter='severity[1]HIGH'
Drag options to blanks, or click blank then click option'
A==
B!=
C:
D=
Attempts:
3 left
💡 Hint
Common Mistakes
Using single '=' which is invalid in gcloud filters.
Using ':' which is for substring matching, not exact equality.
5fill in blank
hard

Fill all three blanks to create a command that lists vulnerability scan results in JSON format.

GCP
gcloud container images [1] gcr.io/my-project/my-image@sha256:abc123 --[2] json --[3]
Drag options to blanks, or click blank then click option'
Alist-vulnerabilities
Bformat
Cscan-enable
Dquiet
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'scan-enable' as the action instead of 'list-vulnerabilities'.
Omitting '--quiet' which may cause interactive prompts.