Overview and What You Will Learn
Security Command Center (SCC) continuously scans your deployed GCP resources against security best practices and reports specific findings, each with a category, a severity, and the resource affected. It gives you a prioritized to-do list instead of a single opaque score.
In this lab, you will:
- Deliberately create a publicly readable Cloud Storage bucket
- Watch SCC flag it as a finding
- Fix it, and prevent it from recurring with public access prevention
- Confirm the finding resolves, and learn to filter by severity
Why This Matters in Production
A team assumes its GCP environment is reasonably secure because nothing has gone wrong yet, without checking whether basic protections are in place across every project. Public bucket access and over-broad service account roles are the classic gaps, and a company like Cloudflare or Datadog treats them as routine findings to triage weekly. SCC turns that vague assumption into a specific list of exactly what to fix.
Core Principles
SCC compares the real configuration of your resources against detectors, such as Security Health Analytics, and records each mismatch as a finding. A finding has a state: ACTIVE while the problem exists, and INACTIVE once a later scan sees it fixed.
configuration] SC --> D{Matches a
detector?} D -->|Yes| F[Finding
state ACTIVE] D -->|No| OK([No finding]) F --> FX[You fix it] FX --> RS([Finding INACTIVE]) classDef store fill:#475569,color:#FFFFFF classDef tool fill:#326CE5,color:#FFFFFF classDef decision fill:#F59E0B,color:#111827 classDef bad fill:#EF4444,color:#FFFFFF classDef good fill:#10B981,color:#FFFFFF class R store class SC,FX tool class D decision class F bad class OK,RS good
RememberSCC is activated at the organization level, so the findings commands in this lab need an Organization. The Standard tier gives basic misconfiguration findings, and Premium and Enterprise add deeper threat detection and vulnerability scanning. Check which tier is active, because it decides which findings you will see.
Detailed Step-by-Step Practical Lab
Set the variables used throughout the lab. Project IDs are globally unique, so change the suffix if the create command fails.
export PROJECT_ID=gcp-scc-lab-mumbai-2026export ORG_ID=$(gcloud organizations list --format="value(ID)")export BUCKET=gs://scc-lab-public-bucket-mumbai-2026- Create a project in your Organization and enable the APIs:
gcloud projects create $PROJECT_ID --name="SCC Lab" --organization=$ORG_IDgcloud config set project $PROJECT_IDgcloud services enable storage.googleapis.com securitycenter.googleapis.com- Deliberately make a bucket publicly readable, so SCC has something to flag. Use only throwaway content:
gcloud storage buckets create $BUCKET \ --location=asia-south1 \ --uniform-bucket-level-access gcloud storage buckets add-iam-policy-binding $BUCKET \ --member=allUsers \ --role=roles/storage.objectViewerCommon MistakeExpecting step 2 to work in every organization. Many orgs enforce the
storage.publicAccessPreventionpolicy, which blocksallUsersgrants. If it fails, ask an admin to relax it on this lab project only, or read through the lab without running this step.
- Wait for the scan, which can take from minutes to several hours. Then list active findings for the bucket:
gcloud scc findings list organizations/$ORG_ID \ --filter="resourceName:\"scc-lab-public-bucket-mumbai-2026\" AND state=\"ACTIVE\""- Narrow to the public bucket finding category and show the key fields. The category is
PUBLIC_BUCKET_ACL:
gcloud scc findings list organizations/$ORG_ID \ --filter="category=\"PUBLIC_BUCKET_ACL\" AND state=\"ACTIVE\"" \ --format="table(finding.severity,finding.category,finding.resourceName)"- Fix the misconfiguration by removing public access:
gcloud storage buckets remove-iam-policy-binding $BUCKET \ --member=allUsers \ --role=roles/storage.objectViewer- Prevent the problem from coming back. Public access prevention blocks any future
allUsersorallAuthenticatedUsersgrant on this bucket:
gcloud storage buckets update $BUCKET --public-access-prevention- After the next scan, the finding should show as
INACTIVE. SCC re-evaluates on its own schedule, so re-check later:
gcloud scc findings list organizations/$ORG_ID \ --filter="category=\"PUBLIC_BUCKET_ACL\" AND state=\"INACTIVE\""- Practice prioritizing as you would in a large environment, with high-severity active findings first:
gcloud scc findings list organizations/$ORG_ID \ --filter="severity=\"HIGH\" AND state=\"ACTIVE\"" \ --format="table(finding.severity,finding.category,finding.resourceName)"- Clean up:
gcloud storage rm --recursive $BUCKETgcloud projects delete $PROJECT_ID --quietProduction Best Practices & Common Pitfalls
Common MistakeTreating SCC as a count to minimize instead of reading what each finding means. One high-severity finding about public data exposure matters more than ten low-severity ones, even if clearing the ten looks better on a dashboard.
TipReview findings on a regular schedule, not once at setup. New resources appear and configurations drift, so a finding that did not exist last month may exist today.
- Fix the cause, not only the symptom. Removing one public grant helps, but an Organization Policy such as public access prevention stops the whole class of mistake.
- Triage by severity and exposure. Start with high-severity findings on internet-facing or data-bearing resources, then work down.
- Not every finding applies to every environment. A finding about a service you genuinely do not use can be muted or dismissed with a recorded reason instead of chased for the count.
- Route findings to people. Send high-severity findings to a chat channel or ticket queue through notifications, so someone owns each one.
Quick Reference & Troubleshooting Commands
| Command | Description |
|---|---|
gcloud scc findings list organizations/ORG_ID |
List current findings |
gcloud scc findings list --filter="severity=\"HIGH\"" |
Filter findings by severity |
gcloud scc findings list --filter="state=\"ACTIVE\"" |
Show only unresolved findings |
gcloud storage buckets remove-iam-policy-binding |
Remove a public access grant from a bucket |
gcloud storage buckets update --public-access-prevention |
Block public grants on a bucket |