Cloud Digital Leader Trust and security with Google Cloud Practice Question
An organization uses Security Command Center (SCC) premium tier and wants to automatically remediate a specific finding type by disabling public access to Cloud Storage buckets. What is the recommended approach?
⚠ Common exam trap
Google Cloud often tests the distinction between event-driven automation (Cloud Functions + Pub/Sub) and scheduled or manual approaches, so candidates mistakenly choose Cloud Scheduler or IAM deny policies because they think 'automation' means periodic checks or preventive controls, rather than reactive, real-time remediation.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Set up a Cloud Function triggered by SCC findings to remove public access
Security Command Center (SCC) premium tier can publish findings to Cloud Pub/Sub, which can trigger a Cloud Function via a push subscription. The Cloud Function can then use the Google Cloud Storage API (specifically, the `storage.buckets.setIamPolicy` method) to remove the `allUsers` or `allAuthenticatedUsers` bindings that grant public access, enabling automated, event-driven remediation without manual intervention.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Cloud Pub/Sub alone to listen for SCC findings and then manually remediate
Why it's wrong here
Pub/Sub alone is a messaging/transport layer, not an executor: it can receive SCC findings delivered via a notification config, but it has no built-in compute to process them. Someone would have to run a subscriber and manually interpret each finding to revoke public access, which creates a human-in-the-loop delay and scalability problem. In the proper automated pattern, Pub/Sub delivers the finding payload to a Cloud Function, which then performs the remediation—so using Pub/Sub without an automated subscriber is only half of the needed pipeline.
- ✗
Use IAM to deny all users except project owners from making buckets public
Why it's wrong here
IAM restrictions are a preventive control that blocks future changes to bucket policies, but SCC findings detect existing buckets that are already public—those must be actively remediated. This approach does nothing for buckets that were made public before the policy was applied, nor does it respond to the findings themselves. Additionally, overly restrictive IAM could break legitimate uses of public access and does not provide the real-time, automated resolution the scenario demands.
- ✓
Set up a Cloud Function triggered by SCC findings to remove public access
Why this is correct
This is the correct event-driven pattern: SCC publishes findings to Cloud Pub/Sub via a notification config, and a Cloud Function can be subscribed to that Pub/Sub topic using the background-trigger mechanism. The function receives the finding JSON, parses the bucket name, and uses the Cloud Resource Manager or Cloud Asset API to remove the public IAM binding or the public ACL. This happens within milliseconds of detection, is fully automated, and scales naturally with findings, making it the right fit for real-time security remediation.
- ✗
Configure a Cloud Scheduler job to run a script that checks and removes public access
Why it's wrong here
Cloud Scheduler executes jobs on a fixed time schedule (e.g., cron), so it cannot react immediately to an SCC finding—it will only run at the next scheduled interval, leaving a window of exposure. Repeatedly scanning all buckets on a schedule is also wasteful and may miss short-lived public access changes that occur between runs. This is a polling-based approach rather than an event-driven one, which conflicts with the need to remediate findings as soon as they are generated.
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
Pub/Sub
Pub/Sub is a messaging pattern where publishers send messages without knowing who receives them, and subscribers receive only the messages they care about.
Key term
Google Cloud
Google Cloud is a suite of cloud computing services offered by Google that provides infrastructure, platform, and software solutions over the internet.
About these practice questions
Courseiva writes every GCDL question from scratch — 829 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.