Queries and retrieves active security findings, external exposures, toxic combinations, vulnerabilities, threats, and sensitive data risks from Security Command Center on Google Cloud. Use when retrieving details for a security finding by its name, validating finding scope (e.g., verifying findingClass is TOXIC_COMBINATION, VULNERABILITY, EXTERNAL_EXPOSURE, or THREAT), or fetching finding details for triage. Don't use to draft remediations, apply patches, or execute configurations.
Written by Google and published in google/skills under the Apache-2.0 license. Treq shows it unchanged except for heading levels and links to files on GitHub.
Provides guidelines and read-only gcloud CLI command patterns for querying and
retrieving security findings, external exposures, toxic combinations,
vulnerabilities, threats, and sensitive data risks from Security Command Center
on Google Cloud.
[!IMPORTANT] There is NO
gcloud scc findings describecommand (Invalid choice: 'describe'). To retrieve details for a specific finding by its name, always usegcloud scc findings listwith a filter onname.
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
gcloud scc findings list or group
command strictly requires an explicit {parent} scope
(organizations/{id}, projects/{id}, or folders/{id}). If the parent
scope is missing from the prompt and cannot be inferred from a full finding
name, DO NOT run any gcloud commands (do not execute queries without
parent, and never inspect gcloud config). Halt immediately before
executing commands and ask the user for the parent resource scope.[], halt immediately. Do not attempt blind
brute-force retries with different flags, and never search the local
workspace for credentials.PERMISSION_DENIED,
IAM_PERMISSION_DENIED, credential expiration, or network timeouts, halt
immediately and report the verbatim error message. Do not search the
workspace for credentials or run diagnostic loops.organizations/{org_id}, projects/{project_id}, or
folders/{folder_id}.{parent}
resource prefix before /sources/...:
organizations/{org_id}/sources/... → {parent} is
organizations/{org_id}folders/{folder_id}/sources/... → {parent} is
folders/{folder_id}projects/{project_id}/sources/... → {parent} is
projects/{project_id} Extract the parent prefix regardless of
whether the finding resource name is global (4-segment) or
location-qualified (5-segment with /locations/{location}/).
Execute the deep dive query using the extracted {parent}. Do not
reject or halt on project- or folder-level findings.When Data Residency (DRZ) is enabled, findings are stored and accessible only
within their designated regional location (us, eu, or me-central2).
Queries across different locations do not return findings from other regions.
All gcloud scc findings commands require specifying the target location via
--location={location}:
global (used when data residency is not enabled or for global
findings).us (United States multi-region)eu (European Union multi-region)me-central2 (Kingdom of Saudi Arabia regional location)When data residency (DRZ) is enabled for an organization in a regional location
(us, eu, or me-central2), configure the regional API endpoint override
before executing finding queries:
gcloud config set api_endpoint_overrides/securitycenter https://securitycenter.{LOCATION}.rep.googleapis.com/
Example for the European Union (eu) region:
gcloud config set api_endpoint_overrides/securitycenter https://securitycenter.eu.rep.googleapis.com/
To reset the endpoint back to default global routing:
gcloud config unset api_endpoint_overrides/securitycenter
Regional finding resource names include the /locations/{location}/ path
segment:
organizations/{org_id}/sources/{source_id}/locations/{location}/findings/{finding_id}folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}projects/{project_id}/sources/{source_id}/locations/{location}/findings/{finding_id}When performing a Deep Dive on a location-qualified finding name:
{parent} scope (the prefix before /sources/..., e.g.,
organizations/{org_id}).{location} from /locations/{location}/ (e.g., eu, us,
me-central2). If not present in the finding name, default to global (or
the user-specified location).--location={location} and
--filter="name=\"{finding_name}\"".Intent: User provides a specific finding name or explicitly asks to retrieve
all details for one finding.
Action: Execute gcloud scc findings list with a strict filter on name
and NO --field-mask to retrieve the complete JSON payload. Specify
--location={location} (default global unless a regional location is
indicated or present in the finding name).
gcloud scc findings list {parent} \
--location={location} \
--filter="name=\"{finding_name}\"" \
--format="json" --limit=1
Intent: User wants to list active findings matching criteria without pulling
full nested payloads.
Action: Use --field-mask projection to restrict output size. Specify
--location={location} (default global unless querying a specific region).
gcloud scc findings list {parent} \
--location={location} \
--filter="{filter_expression}" \
--field-mask="finding.name,finding.parentDisplayName,finding.findingClass,finding.category,finding.state,finding.eventTime,finding.severity,finding.resourceName" \
--format="json" --order-by="severity,event_time desc" --limit=100
| Intent / Target Finding Class | --filter Expression |
|---|---|
| All Active Findings | state="ACTIVE" |
| Vulnerabilities | `state="ACTIVE" AND |
| : : findingClass="VULNERABILITY"` : | |
| Misconfigurations | `state="ACTIVE" AND |
| : : findingClass="MISCONFIGURATION"` : | |
| Toxic Combinations | `state="ACTIVE" AND |
| : : findingClass="TOXIC_COMBINATION"` : | |
| External Exposures | `state="ACTIVE" AND |
| : : findingClass="EXTERNAL_EXPOSURE"` : | |
| Threats | state="ACTIVE" AND findingClass="THREAT" |
| Observations | `state="ACTIVE" AND |
| : : findingClass="OBSERVATION"` : | |
| Sensitive Data Risks | `state="ACTIVE" AND |
| : : findingClass="SENSITIVE_DATA_RISK"` : | |
| Chokepoints | `state="ACTIVE" AND |
| : : findingClass="CHOKEPOINT"` : | |
| Posture Violations | `state="ACTIVE" AND |
| : : findingClass="POSTURE_VIOLATION"` : | |
| Secrets | state="ACTIVE" AND findingClass="SECRET" |
| SCC Errors | `state="ACTIVE" AND |
| : : findingClass="SCC_ERROR"` : | |
| Specific Category | state="ACTIVE" AND category="{category}" |
Intent: User wants high-level counts or landscape overview (e.g., "What are
the most common findings?", "Show me a summary by category").
Action: Use gcloud scc findings group. Specify --location={location}
(default global unless querying a specific region). Allowed fields for
--group-by are strictly: resource_name, category, state, parent.
gcloud scc findings group {parent} \
--location={location} \
--group-by="{group_by_field}" \
--filter="state=\"ACTIVE\"" \
--format="json"
Once the finding JSON payload is retrieved:
TOXIC_COMBINATION Findings:
attackExposure field is present and has a score > 0.attackExposureResult to identify exposed resources and attack
trajectories.VULNERABILITY Findings:
exploitationActivity,
observedInTheWild, zeroDay), upstream fix status
(upstreamFixAvailable), and affected package details from the
vulnerability object to evaluate risk:
vulnerability.cve.idvulnerability.cve.cvssv3.baseScorevulnerability.cve.cvssv3.attackVectorvulnerability.cve.exploitationActivityvulnerability.cve.observedInTheWildvulnerability.cve.zeroDayvulnerability.cve.upstreamFixAvailablevulnerability.offendingPackage.packageNamevulnerability.offendingPackage.packageVersionvulnerability.fixedPackage.packageVersionvulnerability.securityBulletin.suggestedUpgradeVersionSee finding_schema.md for the JSON structure of a Security Command Center finding.
Claude Code and Codex keep each installed skill's name and description in context. When a request matches the description, the agent loads the full SKILL.md. You can also run it yourself: type /google-cloud-scc-query in Claude Code or $google-cloud-scc-query in Codex.
The description says when to use it:
Use when retrieving details for a security finding by its name, validating finding scope (e.g., verifying findingClass is TOXIC_COMBINATION, VULNERABILITY, EXTERNAL_EXPOSURE, or THREAT), or fetching finding details for triage.
Copy the google-cloud-scc-query folder into .claude/skills/ in your project. To use it in every project, copy it into ~/.claude/skills/ instead.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .claude/skills
cp -r /tmp/google-skills/skills/cloud/google-cloud-scc-query .claude/skills/
Codex reads skills from .agents/skills/ in your repository, and from ~/.agents/skills/ for every repository. It detects new skills on its own. Restart Codex if google-cloud-scc-query does not appear.
git clone --depth 1 https://github.com/google/skills.git /tmp/google-skills
mkdir -p .agents/skills
cp -r /tmp/google-skills/skills/cloud/google-cloud-scc-query .agents/skills/
Open Settings and select the Skills tab. The tab appears when Skills installation is on under Settings → Feature Preview. Search for google-cloud-scc-query and choose Install….
Install for repository writes the skill under .treq/skills/ in the current repository. Install for application makes it available to every repository on this machine. Each new workspace gets a copy in .claude/skills/ and .agents/skills/, so Claude Code and Codex both find it. See Installing Skills from the Library.
google-cloud-scc-query ships 3 files, 17.8 KB in total. Select a file to load it from GitHub.