GCP Professional Cloud Security Engineer Practice Question
Your organization uses Security Command Center (SCC) Premium. Compliance requires that any Cloud Storage bucket in production projects be flagged in Security Health Analytics (SHA) if its IAM policy grants objectViewer or objectReader access to either "allUsers" or "allAuthenticatedUsers." You need an automated, code-reviewable solution that generates a SHA finding whenever such a bucket exists. Which approach satisfies these requirements?
Enable the organization policy constraint constraints/storage.publicAccessPreventionEnforced and rely on SCC to automatically raise SHA findings when the constraint is violated.
Deploy Policy Controller with an OPA Gatekeeper constraint that denies any bucket whose IAM policy contains allUsers or allAuthenticatedUsers, and store the constraint template YAML in the Git repository.
Create a custom Event Threat Detection rule that filters Cloud Audit Logs for storage.buckets.setIamPolicy calls granting public access and send alerts to the security team.
Commit a YAML file defining a Security Health Analytics custom module with a resourceSelector of storage.googleapis.com/Bucket and a CEL predicate that checks the bucket's IAM bindings for allUsers or allAuthenticatedUsers; deploy it organization-wide with gcloud scc custom-modules create.
Security Health Analytics custom modules are written as YAML that is stored in source control and applied with the gcloud scc custom-modules commands (or API). The YAML must include:
name / displayName / severity
resourceSelector listing the Google Cloud resource types to evaluate (storage.googleapis.com/Bucket for Cloud Storage)
customConfig.predicate containing a CEL expression that returns true when a resource is non-compliant. A correct predicate could be: resource.iamPolicy.bindings.exists(b, (b.role.startsWith("roles/storage.objectViewer") || b.role.startsWith("roles/storage.legacyObjectReader")) && b.members.exists(m, m=="allUsers" || m=="allAuthenticatedUsers")) Deploying this module at the organization level causes SHA to evaluate all buckets in production projects and create findings when the predicate is true.
The other options either rely on Event Threat Detection (which does not support custom rules), assume organization policy automatically produces SHA findings, or use Policy Controller (which blocks deployments rather than creating SHA findings).
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Security Command Center (SCC) Premium?
Open an interactive chat with Bash
What is a CEL expression in Security Health Analytics (SHA)?
Open an interactive chat with Bash
How does gcloud scc custom-modules create work to deploy SHA modules?
Open an interactive chat with Bash
What is Security Command Center (SCC) Premium?
Open an interactive chat with Bash
What is a CEL predicate, and how is it used in SCC custom modules?
Open an interactive chat with Bash
What are 'allUsers' and 'allAuthenticatedUsers' in IAM policies?
Open an interactive chat with Bash
GCP Professional Cloud Security Engineer
Managing operations
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .