Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Security Engineer practice bank has 1,343 more like it. Try 10 free: instant score, no account.
A financial services organization is implementing a CI/CD pipeline using Cloud Build and Artifact Registry for containerized microservices. The security team establishes a strict shift-left security policy:
CRITICAL or HIGH severity are identified.Which pipeline orchestration strategy should the security engineer implement in cloudbuild.yaml?
gcloud container images describe --show-package-vulnerability in a post-build step, and initiate a pipeline rollback if CVEs exceed policy thresholds.This option uses legacy Container Registry CLI commands (gcloud container images describe) in a Cloud Build step after executing docker push to query package vulnerability occurrences, attempting to trigger a rollback or cleanup step if vulnerabilities are found.
gcloud container images command group is designed for Container Registry (gcr.io) rather than Artifact Registry (pkg.dev), which uses gcloud artifacts docker images.gcloud container images commands do not natively integrate with Artifact Registry standard repositories.The pipeline was operating on legacy Container Registry environments and required post-deployment audit reporting rather than strict pre-upload build gating.
gcloud artifacts docker images scan on the locally built container image, evaluate the findings with gcloud artifacts docker images list-vulnerabilities, and fail the build step prior to executing docker push if target severities are detected.On-Demand Scanning (ODS) is a feature of Artifact Analysis that allows developers and automated build pipelines to initiate vulnerability scans on local container images before pushing them to a container repository. Unlike automated registry scanning, which triggers only after an image is uploaded, On-Demand Scanning allows scanning directly within the Cloud Build workspace.
cloudbuild.yaml, the image is built locally using docker build. The build pipeline calls gcloud artifacts docker images scan against the local image tag, generating an on-demand scan resource without requiring the image to be uploaded to Artifact Registry.gcloud artifacts docker images list-vulnerabilities with a filter for vulnerability.effectiveSeverity. By checking for regular expression matches against CRITICAL|HIGH, the script exits with code 1 if matched, terminating the Cloud Build execution.docker push step from ever running, ensuring no vulnerable artifacts reach the registry.CRITICAL, HIGH, or MEDIUM) tailored to organizational compliance policies.This approach natively satisfies shift-left security requirements by scanning the artifact inside the build execution environment and conditioning repository publication on passing vulnerability thresholds.
gcr Pub/Sub topic, and delete the image asynchronously if CRITICAL or HIGH vulnerabilities are reported.This approach relies on Automatic Scanning in Artifact Registry combined with asynchronous event-driven remediation. When an image is pushed to Artifact Registry, Artifact Analysis automatically scans the image and publishes metadata change events to a Pub/Sub topic (such as gcr). A downstream subscriber, such as a Cloud Function, processes the vulnerability occurrences and sends an API request to delete the artifact if high-severity CVEs are discovered.
The organization wanted an asynchronous, reactive cleanup mechanism for legacy images or continuous monitoring across existing repositories rather than a synchronous build-time blocker.
Binary Authorization is a deploy-time security control for Google Kubernetes Engine (GKE) and Cloud Run. It integrates with Artifact Analysis attestors to evaluate cryptographic signatures and attestations against organizational policies at admission control time, preventing unverified or non-compliant containers from running on the cluster.
The primary goal was to prevent unverified or un-attested container images from being deployed to production GKE clusters at runtime.
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