Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team builds a containerized Go microservice using a multi-stage Dockerfile in Cloud Build, pushes the image to Artifact Registry, and deploys it to Cloud Run. Security Command Center flags an active CRITICAL Container image vulnerability finding for the service.
Evaluating the Artifact Analysis scan results reveals two vulnerabilities with available fixes:
packageType: OS vulnerability in layer index: 0 with buildCommand: FROM debian:12-slimpackageType: GO_STDLIB vulnerability in the compiled application binaryYou need to resolve the active finding and prevent unpatched CRITICAL vulnerabilities from reaching production in future builds. What should you do?
go get -u to update third-party modules in go.mod, push the image with a new tag to trigger an Artifact Analysis rescan, and deploy a new Cloud Run revision receiving 90% of traffic while retaining 10% on the previous revision for rollback.Running go get -u upgrades third-party dependencies listed in go.mod, pushing with a new tag updates image labels in Artifact Registry, and using a 90/10 traffic split performs a gradual rollout in Cloud Run.
GO_STDLIB vulnerabilities: Updating third-party packages in go.mod only addresses external modules reported under packageType: GO. It does not patch vulnerabilities in the Go standard library (GO_STDLIB), which requires upgrading the Go build toolchain itself.packageType: OS vulnerability introduced in layer index: 0 by FROM debian:12-slim.Container image vulnerability finding stays ACTIVE.CRITICAL vulnerabilities.packageType: GO represents third-party Go modules, whereas packageType: GO_STDLIB represents the Go compiler toolchain and standard library.The vulnerability had been reported as packageType: GO in a third-party module rather than GO_STDLIB and OS, and you routed 100% of traffic to the patched revision while adding an On-Demand Scanning check.
This end-to-end approach combines targeted Dockerfile updates based on Artifact Analysis layer metadata, full Cloud Run traffic cutover, and shift-left CI/CD gating with On-Demand Scanning. It resolves both the underlying OS and Go standard library flaws while automating future enforcement.
index: 0): Layer metadata showing FROM debian:12-slim pinpoints the runtime base image as the source of the flaw. Updating to a patched base image tag replaces the vulnerable OS packages.GO_STDLIB vulnerability: A packageType: GO_STDLIB finding indicates a flaw in the Go toolchain or bundled standard library used to compile the binary, so upgrading the Go builder version in the multi-stage Dockerfile is required.Container image vulnerability finding to INACTIVE.CRITICAL vulnerabilities exist before the image is promoted.Unlike updating only third-party modules or splitting traffic partially, this strategy remediates every affected layer, completely removes runtime exposure on Cloud Run, and enforces a repeatable security gate in the CI/CD pipeline.
apt-get upgrade to the Dockerfile while keeping the current Go builder stage, deploy the rebuilt image to Cloud Run, and integrate Web Security Scanner into the Cloud Build pipeline to block builds with critical container vulnerabilities.Adding apt-get upgrade attempts to patch OS packages inside an existing container layer, while Web Security Scanner is a dynamic application security testing tool that crawls live web applications for runtime vulnerabilities.
GO_STDLIB: Keeping the same Go builder stage compiles the application with the same vulnerable Go toolchain and standard library, leaving the CRITICAL GO_STDLIB vulnerability intact.apt-get upgrade on top of an outdated FROM debian:12-slim base image retains the vulnerable base layer index: 0 instead of cleanly upgrading the base image.Your goal was to scan a deployed web application endpoint for OWASP-style runtime flaws like XSS or mixed content after deployment, rather than scanning container packages inside Cloud Build.
To enforce container vulnerability policies in Cloud Build, pair On-Demand Scanning for build-time blocking with Binary Authorization for deployment-time attestation checks.
debian:12-slim base image tag in the Dockerfile, wait for Artifact Analysis continuous analysis to update the running Cloud Run revision, and configure Security Command Center Vulnerability Assessment to fail future Cloud Build pipelines that contain critical CVEs.Updating the debian:12-slim tag fixes the OS layer, Artifact Analysis continuous analysis refreshes stored vulnerability metadata, and Security Command Center Vulnerability Assessment surfaces findings for deployed workloads.
GO_STDLIB unpatched: Updating only the runtime debian:12-slim image in a multi-stage build does not upgrade the Go builder toolchain, so the compiled binary still contains the GO_STDLIB vulnerability.HIGH and CRITICAL findings after images are deployed to runtime environments like Cloud Run or GKE.You only needed passive visibility into newly discovered CVEs on recently pulled images and centralized post-deployment alerting across projects rather than active CI/CD build blocking and runtime remediation.
In a secure software supply chain, Artifact Analysis handles scanning and metadata, Cloud Build enforces build gates via On-Demand Scanning, and Security Command Center provides centralized runtime visibility.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated