Google Professional Cloud DevOps Engineer Question 87
Select 3Google Cloud PlatformYour organization is using Artifact Registry to store container images. As part of your security strategy, you want to ensure that all images are regularly scanned for vulnerabilities. What steps must you take to enable vulnerability analysis for your container images in Artifact Registry?
- A
Ensure that the Artifact Registry repository is configured with the vulnerability scanning feature enabled.
- B
Grant the necessary IAM permissions, such as
roles/containeranalysis.occurrences.viewer, to appropriate users or services. - C
Enable the Container Analysis API for your project.
- D
Manually trigger vulnerability scans for each image after they are pushed to the registry.
- E
Update the Dockerfile of each image to include a specific security scanning tool.
Show answer and explanation
Correct answers: A, B, C
Explanation
To enable vulnerability analysis in Artifact Registry, you need to configure the repository to allow vulnerability scanning, ensure proper IAM permissions are granted, and enable the Container Analysis API. Once configured, Artifact Registry automatically scans images upon push, and additional modifications to Dockerfiles or manual scans are not required.
- A. Correct.
Correct. Enabling vulnerability scanning in your Artifact Registry repository is required to analyze images for vulnerabilities.
- B. Correct.
Correct. Granting IAM permissions like
roles/containeranalysis.occurrences.vieweris necessary for viewing and managing vulnerability findings. - C. Correct.
Correct. The Container Analysis API must be enabled to support vulnerability scanning and reporting in Artifact Registry.
- D. Incorrect.
Incorrect. Scans are triggered automatically when images are pushed to a repository with vulnerability scanning enabled, so manual triggering is unnecessary.
- E. Incorrect.
Incorrect. There is no need to modify Dockerfiles to include security tools because the scanning is performed by Artifact Registry's built-in functionality.