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.
An enterprise is establishing an automated CI/CD pipeline using Cloud Build, Artifact Registry, Artifact Analysis, and Binary Authorization to deploy containerized workloads to Google Kubernetes Engine (GKE).
The security team mandates the following security gates:
CRITICAL or HIGH are discovered.Which workflow sequence in Cloud Build should the security team implement to satisfy these requirements?
gcloud artifacts docker images scan to perform On-Demand Scanning, and check effective severity levels with gcloud artifacts docker images list-vulnerabilities to fail the build if CRITICAL or HIGH findings exist.gcloud beta container binauthz attestations sign-and-create using the image digest, the target attestor, and the Cloud KMS key version to register the attestation.This workflow integrates Artifact Analysis On-Demand Scanning API, Cloud Key Management Service (Cloud KMS), and Binary Authorization directly into a Cloud Build pipeline to enforce shift-left security and cryptographic provenance across the software supply chain.
gcloud artifacts docker images scan. It inspects vulnerability.effectiveSeverity with gcloud artifacts docker images list-vulnerabilities, parsing findings with an exit code condition (grep -Exq 'CRITICAL|HIGH') that terminates the build before pushing unauthorized artifacts to Artifact Registry.sha256), the pipeline guarantees that the attestation and the deployed artifact are immutably linked, eliminating time-of-check to time-of-use (TOCTOU) tag mutation risks.gcloud beta container binauthz attestations sign-and-create, Cloud Build invokes an asymmetric signing key in Cloud KMS to sign the image digest payload and records the signed attestation as an occurrence under the attestor's Artifact Analysis Note.This architecture establishes a strict gatekeeper mechanism inside CI/CD, preventing vulnerable or non-compliant containers from reaching deployment targets by cryptographically binding policy compliance to immutable image digests.
:latest tag.roles/binaryauthorization.attestorsViewer permissions.This option relies on asynchronous registry vulnerability scanning, applies mutable image tags (:latest), grants broad view permissions to the Compute Engine default service account, and signs tag names rather than writing attestation occurrences to Artifact Analysis.
:latest allows downstream tampering and tag-swapping vulnerabilities. Binary Authorization policies strictly require attestations to be generated over immutable image digests (@sha256:...).roles/binaryauthorization.attestorsViewer does not allow the pipeline to sign attestations or create metadata occurrences.containeranalysis.notes.attachingOrgs.attachOccurrence and KMS signing roles) rather than generic viewer roles.The goal were simply to inspect vulnerability scan reports retrospectively on existing container repositories without blocking deployment pipelines or enforcing cryptographic admission policies in GKE.
verify: true using a custom Skaffold verification test container to check vulnerabilities at runtime.evaluation_mode: ALWAYS_ALLOW and rely on Cloud Deploy verification job rollbacks.This option combines build scanning with dependency lock file verification, delegates vulnerability checks to a Cloud Deploy verification stage using Skaffold, and sets the Binary Authorization policy to ALWAYS_ALLOW.
ALWAYS_ALLOW disables admission control enforcement entirely, allowing any unsigned or vulnerable image to be deployed to GKE clusters by anyone with cluster access.verify: true stage runs integration and smoke tests after a deployment rollout occurs in a target environment, rather than acting as a cryptographic pre-deployment admission control barrier.kubectl or another tool, the ALWAYS_ALLOW policy will permit it because admission checks have been disabled.ALWAYS_ALLOW completely neuters Binary Authorization admission security.The organization wanted to run post-deployment integration tests in staging environments without enforcing strict cryptographic admission policies on GKE workloads.
kubectl apply --dry-run=server.clouddeploy-operations Pub/Sub topic to detect deployment errors.This option attempts to sign the source build context directory, pushes unverified images to Artifact Registry, tests admission with a server-side dry run, monitors Pub/Sub logs, and writes an unsigned generic note to Artifact Analysis.
The team needed to perform build provenance attestation on raw Git repositories (such as SLSA Level 1 source tracking) rather than deploy-time image attestation and vulnerability gating for Kubernetes clusters.
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