PROFESSIONAL-CLOUD-DEVOPS-ENGINEER practice question 12 of 25

You use Artifact Registry to store container images built with Cloud Build. You need to ensure that all existing and new images are continuously scanned for vulnerabilities. You also want to track who pushed each image to the registry. What should you do?

Full set: 205 questions
Answer options
A: Configure Artifact Registry to automatically trigger vulnerability scans for new image tags, and view scan results. Use Cloud Audit Logs to track image tag creation events.
B: Configure Artifact Registry to automatically scan new images and periodically re-scan all images. Use Cloud Audit Logs to track image uploads and identify the user who pushed each image. Correct answer
C: Configure Artifact Registry to automatically re-scan images daily. Enable Cloud Audit Logs to track these scans, and use Logs Explorer to identify vulnerabilities.
D: Configure Artifact Registry to send vulnerability scan results to a Cloud Storage bucket. Use a separate script to parse results and notify a security team.
Correct Answer:
B. Configure Artifact Registry to automatically scan new images and periodically re-scan all images. Use Cloud Audit Logs to track image uploads and identify the user who pushed each image.
Explanation

Artifact Registry provides built-in vulnerability scanning that can be enabled per-repository. This service automatically scans newly pushed images and continuously re-scans existing images for new vulnerabilities. To track who pushed an image, Cloud Audit Logs for Artifact Registry should be used. Specifically, the Data Access audit logs for the google.devtools.artifactregistry.v1.ArtifactRegistry service will record Write events, which include the principal (user or service account) that performed the image upload, providing a clear audit trail.

Why Incorrect

A. This is incomplete. Artifact Registry's scanning feature also re-scans existing images, not just new ones, which is a key requirement for continuous security.
C. This misses the critical requirement to scan new images upon upload. Relying only on a daily re-scan leaves a window of vulnerability.
D. While possible to build a custom notification system, it is not the native or recommended way to enable scanning or track user activity within Google Cloud.

References

1. Google Cloud Documentation, "Container scanning overview". "On-demand scanning is a feature of Artifact Analysis. When enabled, it automatically scans for vulnerabilities when you push a new image to Artifact Registry... Artifact Analysis also continuously monitors the metadata for your scanned images for new vulnerabilities."

2. Google Cloud Documentation, "Artifact Registry audit logging". "Google Cloud services write audit logs to help you answer the questions, 'Who did what, where, and when?'... Data Access audit logs contain API calls that read the configuration or metadata of resources, as well as user-driven API calls that create, modify, or read user-provided resource data." The Write operation log entry will contain the authenticationInfo.principalEmail.

Scroll to Top