Org Policy and Security Command Center Triage With AI
Security Command Center floods you with findings and Org Policy is a maze of constraints. Here's how I use AI to triage SCC findings and write GCP organization policies that hold.
- #gcp
- #ai
- #security
- #org-policy
- #scc
The first time I opened Security Command Center on a real organization, it showed 1,400 active findings. Public buckets, over-privileged service accounts, default networks, findings from three different detectors saying overlapping things. The natural human response to 1,400 findings is to close the tab. The findings that actually mattered — a genuinely public bucket holding customer data, a service account with org-level admin — were drowned in a sea of “default network exists in an unused project.” SCC’s problem isn’t that it misses things; it’s that it surfaces everything with no sense of what your blast radius actually is. Triage is a prioritization problem over structured data, which is exactly where AI helps, and Org Policy is the preventive control I write afterward to stop the same finding from coming back.
Pull the findings, then make AI prioritize by blast radius
Export active findings and hand them to the model with your actual risk context — the model can’t know what’s sensitive unless you tell it:
gcloud scc findings list organizations/123456789012 \
--filter="state=\"ACTIVE\"" \
--format="json" > scc-findings.json
Prompt: “Here are active Security Command Center findings (JSON). My crown-jewel data lives in projects tagged
data-prodandcustomer-pii. Re-rank these findings by real blast radius, not by SCC’s default severity: a public resource in a crown-jewel project outranks a critical finding in a sandbox. Group duplicates from different detectors. Give me the top 15 to fix this week with a one-line ‘why this matters’ for each. Don’t pad the list to 15 if fewer genuinely matter.”
This reframing is the entire value. SCC severity is generic; your blast radius is specific. Telling the model which projects hold the crown jewels turns 1,400 findings into a ranked worklist of the handful that could actually hurt you — and the “don’t pad to 15” clause keeps it from inventing urgency.
Triage a single finding into an action
For each top finding, I have AI turn the raw finding into a concrete, scoped remediation — and crucially, into the question I should answer before acting:
Prompt: “Here is one SCC finding (JSON) for a service account with
roles/ownerat the project level. Tell me: what can this principal actually do, what’s the minimal remediation that preserves its legitimate function, the exact gcloud command to apply it, and the one question I must answer before I touch it (e.g. ‘is this used by a pipeline?’). Don’t suggest deleting the SA outright.”
That “one question before I touch it” is what keeps an eager remediation from breaking production. AI is great at the mechanical “here’s the tighter binding”; the model can’t know whether removing Owner breaks a nightly job, so it tells me to check and I check.
Org Policy: prevent the finding from recurring
Closing a finding is treating a symptom. Org Policy is the prevention, and its constraint syntax is fiddly enough that AI drafting it saves real time. I describe the guardrail in English:
Prompt: “Write a GCP Organization Policy that prevents Cloud Storage buckets from being made public (no allUsers/allAuthenticatedUsers in IAM). Give me the policy as a YAML for
gcloud org-policies set-policy, scoped to the organization. Then tell me which existing resources would violate it so I can fix those before enforcing, to avoid breaking anything live.”
name: organizations/123456789012/policies/iam.allowedPolicyMemberDomains
spec:
rules:
- values:
allowedValues:
- "C0xxxxxxx" # your Cloud Identity customer ID
For public-access prevention specifically, the constraint I usually reach for is the dedicated one:
gcloud resource-manager org-policies enable-enforce \
storage.publicAccessPrevention \
--organization=123456789012
The “tell me what would violate it first” instruction is non-negotiable. Enforcing an Org Policy org-wide without checking existing resources is how you break a legitimate public website at 3pm on a Friday. AI drafts the policy and the pre-flight check; I run the check and stage the rollout.
Roll out policies safely with dry-run
I never enforce a new constraint cold. Org Policy supports a dry-run mode, and I have AI structure the staged rollout:
Prompt: “Give me the steps to roll out the
storage.publicAccessPreventionconstraint safely: first in dry-run/audit mode to see violations without blocking, how to read the resulting audit logs, and only then enforce. Include the gcloud commands and the logging filter to find dry-run violations.”
# Audit logging filter for would-be violations
gcloud logging read \
'protoPayload.metadata.@type:"OrgPolicyViolationInfo"' \
--limit=50 --format=json
Let AI write the recurring triage report
To keep SCC from re-accumulating, I automate the weekly triage prompt against fresh findings, so I review a ranked digest instead of a raw firehose:
Prompt: “Here are SCC findings that are new since last week (JSON). Categorize them as: needs action now, accept-and-document, or false-positive-to-mute. For the mute candidates, give me the
gcloud scc muteconfigsfilter so the same noise doesn’t return.”
Muting true false positives is part of triage — a finding type that’s noise in your environment should stop demanding attention, and AI writing the mute filter makes that cheap enough to actually do.
The control I keep
SCC triage and Org Policy authoring with AI work because both are structured-data problems — ranking findings, generating constraint YAML — and models are strong at both. What the model can’t supply is your risk context (which it gets only because I tell it) and the operational knowledge of what a remediation might break. So the discipline holds: AI ranks, drafts, and writes the pre-flight checks; I supply the blast-radius context, run the checks, and stage every enforcement through dry-run before it bites. A policy that prevents the right thing can still break the wrong thing if you skip the audit pass.
The reusable prompts are in my prompts library, and the broader GCP with AI series covers the IAM and storage findings SCC loves to flag. You don’t have to read 1,400 findings. You have to read the right 15 — and AI is good at telling them apart.
Download the Free 500-Prompt DevOps AI Toolkit
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.