Google Cloud Professional Cloud Developer — Question 226
You are reviewing and updating your Cloud Build steps to adhere to best practices. Currently, your build steps include:
1. Pull the source code from a source repository.
2. Build a container image
3. Upload the built image to Artifact Registry.
You need to add a step to perform a vulnerability scan of the built container image, and you want the results of the scan to be available to your deployment pipeline running in Google Cloud. You want to minimize changes that could disrupt other teams’ processes. What should you do?
Answer options
- A. Enable Binary Authorization, and configure it to attest that no vulnerabilities exist in a container image.
- B. Upload the built container images to your Docker Hub instance, and scan them for vulnerabilities.
- C. Enable the Container Scanning API in Artifact Registry, and scan the built container images for vulnerabilities.
- D. Add Artifact Registry to your Aqua Security instance, and scan the built container images for vulnerabilities.
Correct answer: C
Explanation
The correct answer is C because enabling the Container Scanning API in Artifact Registry allows you to scan images for vulnerabilities directly within the same environment where they are stored, streamlining the process. Option A, while related to security, does not perform a vulnerability scan but rather attests to the absence of vulnerabilities. Option B involves using Docker Hub, which may not be suitable for your workflow, and Option D requires additional integration with Aqua Security, potentially complicating the process.