Generated banner for Google Cloud Scc Remediation
Generated logo for Google Cloud Scc Remediation

Google Cloud Scc Remediation

GoogleOfficialPublished by Google

  • Skill
  • Workflow
  • Security
  • Apache-2.0
  • No issues found

From the author

Remediates Google Cloud Security Command Center findings, including IAM permission fixes, cloud resource misconfigurations, vulnerabilities, and Toxic Combinations. Use when asked to fix, remediate, or mitigate a Security Command Center finding or address attack paths. Don't use for general IAM policy querying without a Security Command Center finding. For runtime threat detections, this skill provides containment and investigation guidance rather than automated configuration fixes.
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured, safety-conscious workflow for remediating security findings identified by Google Cloud Security Command Center. It covers IAM misconfigurations, resource vulnerabilities, and complex attack paths. The skill enforces a strict 'human-in-the-loop' policy, requiring users to review and approve a detailed remediation plan—including verification and rollback steps—before any infrastructure changes are applied. It integrates with specific playbooks to ensure least-privilege principles are followed and provides guidance for runtime threats where automated fixes are not applicable.

What it does

  • Analyzes Security Command Center findings to identify necessary remediation steps.
  • Routes findings to specific playbooks for IAM, misconfiguration, or vulnerability fixes.
  • Generates structured remediation plans including verification and rollback commands.
  • Enforces a mandatory consent gate requiring explicit user approval before any mutation.
  • Provides containment and investigation guidance for runtime threat detections.
  • Ensures all executed commands are properly attributed for telemetry.

When to use it

  • When you need to fix, remediate, or mitigate a specific Security Command Center finding.
  • When addressing identified attack paths or toxic combinations in Google Cloud.
  • When you need to resolve IAM permission issues or resource misconfigurations.
  • When investigating runtime threat alerts that require manual containment steps.

Advantages

  • Prevents accidental outages by requiring explicit approval for all infrastructure changes.
  • Promotes least-privilege security by preferring granular roles over basic ones.
  • Ensures operational safety by requiring verification and rollback plans for every fix.
  • Provides a consistent, repeatable process for handling diverse security findings.
  • Respects existing infrastructure-as-code setups by checking for managed labels.

Usage examples

“Fix the Security Command Center finding regarding an overly permissive IAM role.”
The agent queries the finding details, identifies the appropriate IAM playbook, and presents a plan to replace the broad role with a least-privilege alternative, asking for approval.
“Remediate the public bucket access finding.”
The agent verifies if the public access is intentional, and if not, proposes a command to restrict the bucket's ACLs along with a verification step.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/google/google-cloud-scc-remediation/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip google-cloud-scc-remediation.zip -d .agents/skills

Documentation by Google

Google Cloud Security Command Center Remediation

Usage Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read and follow the instructions in Usage Attribution.

Overview

A unified remediation skill for Google Cloud Security Command Center findings. It handles both single-domain findings and multi-domain Toxic Combinations.

Security Command Center remediations modify infrastructure, access policies, or workload deployments.

  • Mandatory Consent Gate: NEVER execute mutating gcloud, terraform, or API commands without first presenting a structured remediation plan and the exact command/config diff to the user. STOP after presenting the plan and ALWAYS ask: "Do you approve executing this remediation plan?" before execution. Automatic mutation of security policies or resource configurations can cause unintended outages, lockouts, or compliance violations.

  • Confirm the Target Project: Before executing, confirm that the active gcloud account and project match the project of the finding's resource. Every mutating command MUST specify the target explicitly, with --project or a full resource path, rather than relying on the default gcloud project.

  • Verification & Rollback Required: Every proposed remediation plan MUST explicitly include, for each mutating step:

    • the mutating remediation command(s),

    • the verification check command(s) (gcloud ... describe or list), and

    • the rollback command(s) that undo the change, or an explicit statement that the step cannot be undone (for example, service account key deletion).

    Use the commands from the loaded playbook where they exist. If the playbook lacks a verification or rollback command for a step, derive the command and label it as not sourced from a playbook.

  • Dependency & Impact Checks: Every remediation plan MUST state what could break as a result of each change and ask the user to confirm nothing depends on it. For example:

    • IAM role changes or revocations: you MUST explicitly advise the user to verify cross-project dependencies and CI/CD pipeline workflows that rely on the existing permissions before revoking a project-level role binding.

    • Firewall rule changes: other traffic the same rule allows (such as web traffic on ports 80 or 443).

    • External IP removal: inbound access and outbound internet access for the VM.

    • Public Access Prevention on a bucket: sites or users that legitimately read it publicly.

  • CRITICAL WORKFLOW RULE: Do NOT execute any mutating commands in the same turn that you present the remediation plan. You MUST end your turn immediately after asking for approval and wait for the user's next message.

    • If there is no interactive user (for example, a scheduled or pipeline run), stop at the plan and never execute.

    • If the user approves only part of the plan, or the plan changes after approval, present the updated plan and ask for approval again before executing.

  • Narrowly Scoped Changes: Always propose the narrowest possible fix that resolves the finding. When more than one fix would work, prefer reversible changes over irreversible ones (for example, disable a key before deleting it), resource-level changes over project, folder, or organization-level changes, and changes that affect only the finding's resource over changes that affect other resources. Do not bundle fixes for unrelated issues noticed along the way; mention them to the user separately.

2. Intent Router & Progressive Disclosure

Do not load all reference playbooks into memory at once. Analyze the Security Command Center finding's category, findingClass, or attack path, then read ONLY the relevant reference document(s).

Match on the finding's category first, and fall back to findingClass only when no category matches. Routing on findingClass alone misroutes IAM findings: Security Health Analytics IAM findings are MISCONFIGURATION class, and IAM recommender findings are Vulnerability class, so neither would ever reach the IAM playbook.

Match OnValuesTarget Reference Playbook
categoryPRIMITIVE_ROLES_USED,references/remediation_iam.md
: (Security Health : OVER_PRIVILEGED_SERVICE_ACCOUNT_USER, : :
: Analytics) : ADMIN_SERVICE_ACCOUNT, : :
: : SERVICE_ACCOUNT_ROLE_SEPARATION, : :
: : KMS_ROLE_SEPARATION, : :
: : USER_MANAGED_SERVICE_ACCOUNT_KEY, : :
: : SERVICE_ACCOUNT_KEY_NOT_ROTATED : :
categoryIAM_ROLE_HAS_EXCESSIVE_PERMISSIONS,references/remediation_iam.md
: (IAM recommender) : UNUSED_IAM_ROLE, : :
: : SERVICE_AGENT_GRANTED_BASIC_ROLE, : :
: : SERVICE_AGENT_ROLE_REPLACED_WITH_BASIC_ROLE : :
categoryPUBLIC_BUCKET_ACL, PUBLIC_IP_ADDRESS,references/remediation_misconfig.md
: (Security Health : OPEN_FIREWALL, OPEN_SSH_PORT, : :
: Analytics) : OPEN_RDP_PORT, KMS_KEY_NOT_ROTATED : :
categoryOS_VULNERABILITY, SOFTWARE_VULNERABILITY,references/remediation_vuln.md
: : GKE_RUNTIME_OS_VULNERABILITY (CVEs, OS : :
: : patch, container base image upgrade, : :
: : vulnerable package, GKE node pool upgrade). : :
: : Note: Web Security Scanner (WSS) findings : :
: : fall through to no match below. : :
findingClassTOXIC_COMBINATION — attack pathSequential Load: Identify each exposed facet in the attack path and load
: : exposure, multi-domain attack vector : the matching reference playbooks sequentially. :
no matchAny other category or finding classSee Findings Without Dedicated Playbooks below. Do not force a finding
: : : into a playbook that does not cover it. :
Findings Without Dedicated Playbooks & Runtime Threat Detections

When presented with Security Command Center findings that do not have automated configuration remediation playbooks—such as runtime threat detections (e.g., Cloud Run Threat Detection, Agent Platform Threat Detection, Event Threat Detection, Container Threat Detection):

  1. Do NOT execute automated mutation commands: Runtime threat detections represent active alerts or behavioral anomalies rather than static resource misconfigurations.

  2. Provide Documentation & Containment Guidance:

    • Refer the user to the relevant Security Command Center documentation (e.g., Cloud Run Threat Detection, Agent Platform Threat Detection).

    • Recommend manual investigation steps: analyzing audit logs in Cloud Logging, identifying compromised service accounts or API keys, and isolating affected workloads.

    • Advise the user on containment options (e.g., revoking active credentials, blocking malicious IPs at Cloud Armor/firewall).

3. Standard Remediation Workflow

  1. Inspect Finding Details & Intentionality:

    • If the finding's details are not already in the conversation, retrieve them using the google-cloud-scc-query skill. Verify the finding name, affected resource (resourceName), category, and attack exposure score.

    • Before planning a fix, ask the user whether the flagged configuration is intentional (for example, a bucket serving a public website, or a VM that must accept public traffic). If it is, do not propose a remediation. Suggest muting the finding with a documented justification instead; muting changes the finding's state, so it also requires the user's approval.

  2. Route & Load Reference: Read the matching reference playbook(s) from the routing table above.

  3. Formulate Least-Privilege Remediation: Before drafting, check whether the resource is managed by infrastructure as code (ask the user, and check for signals such as the goog-terraform-provisioned label). If it is, draft the change to the Terraform configuration rather than a gcloud command. Otherwise, draft the exact CLI (gcloud) or IAM binding change needed to close the exposure without disrupting business workloads.

  4. Present Plan & Seek Consent: Show the user the plan required by the Safety & Consent Gate: for each step, the remediation command, the verification command, the rollback command, and what could break. STOP execution here and ALWAYS ask the explicit question: "Do you approve executing this remediation plan?"

  5. Execute on Approval: ONLY after receiving explicit user confirmation, execute the remediation commands and run the verification commands to confirm the resource is fixed. If a command fails, stop and report the error; do not try a different command without presenting it and getting approval again. Tell the user that the finding's state in Security Command Center updates on the detector's next scan, which may take some time, and do not manually mark the finding as resolved.

Files

references/remediation_vuln.md

Software Vulnerability Remediation Playbook (remediation_vuln.md)

Use this playbook when remediating Security Command Center findings related to VULNERABILITY, such as unpatched OS packages, vulnerable container base images, or outdated GKE node pools.

Usage and consent: This playbook is a reference for the google-cloud-scc-remediation skill and inherits that skill's consent gate, even if you reached this file directly. Every mutating command below MUST be presented to the user as part of a remediation plan, together with its verification command, and MUST NOT be executed until the user answers "Do you approve executing this remediation plan?". Never execute a mutating command in the same turn you propose it.

Table of Contents

  • 1. GKE Node Pool Vulnerabilities

  • 2. Compute Engine VM OS Package Vulnerabilities

  • 3. Container Image & Artifact Registry Vulnerabilities

1. GKE Node Pool Vulnerabilities

When a Security Command Center vulnerability finding affects a GKE node pool running an outdated or vulnerable Kubernetes version / OS image:

A. Check Current Node Pool Version
gcloud container node-pools describe {NODE_POOL_NAME} \
    --project={PROJECT_ID} \
    --cluster={CLUSTER_NAME} \
    --region={REGION} \
    --format="get(version,config.imageType)"
B. Remediation: Upgrade GKE Node Pool

Note: GKE node pools cannot be upgraded to a Kubernetes version higher than the cluster control plane. If the target patch version requires a newer minor version, upgrade the control plane (--master) first.

# Upgrade the node pool to the latest supported patch version
gcloud container clusters upgrade {CLUSTER_NAME} \
    --project={PROJECT_ID} \
    --node-pool={NODE_POOL_NAME} \
    --region={REGION}

A node pool upgrade cannot be rolled back: GKE does not support downgrading a node pool to an earlier version. Treat this step as irreversible and confirm the target version with the user before executing.

C. Verification

Verify that the node pool has successfully upgraded to the patched version:

gcloud container node-pools describe {NODE_POOL_NAME} \
    --project={PROJECT_ID} \
    --cluster={CLUSTER_NAME} \
    --region={REGION} \
    --format="get(version)"

2. Compute Engine VM OS Package Vulnerabilities

When a Security Command Center finding identifies CVEs in OS packages (e.g., openssl, kernel, glibc) on Compute Engine VMs:

A. Remediation using OS Config Patch Management (Preferred for Production)
# Execute an on-demand OS patch job for the target instance.
# --instance-filter-names requires the URI form; a bare instance name matches
# zero instances and the patch job silently succeeds without patching anything.
gcloud compute os-config patch-jobs execute \
    --project={PROJECT_ID} \
    --instance-filter-names="zones/{ZONE}/instances/{INSTANCE_NAME}" \
    --display-name="patch-{CVE_ID}"

Applying OS package updates cannot be undone by a rollback command. If a patch must be reverted, the user has to restore the VM from a disk snapshot taken before the patch job, so confirm a snapshot exists before executing.

B. Verification

Verify patch completion status:

gcloud compute os-config patch-jobs list \
    --project={PROJECT_ID} \
    --filter="displayName:patch-{CVE_ID}" \
    --limit=1

3. Container Image & Artifact Registry Vulnerabilities

When a vulnerability is detected in a container image stored in Artifact Registry:

A. Remediation: Rebuild and Redeploy Container Image
  1. Identify the affected base image layer or third-party dependency from the finding's CVE details.

  2. Recommend bumping the base image tag in the workload's Dockerfile (e.g., from debian:11-slim to debian:12-slim or the latest security patch release).

  3. Rebuild and publish the container image, then trigger a rolling restart of the deployment.

B. Verification

After rebuilding and publishing the updated container image, verify the newly published image tag in Artifact Registry:

# List recent container images in the repository to verify the updated tag/digest
gcloud artifacts docker images list {LOCATION}-docker.pkg.dev/{PROJECT_ID}/{REPOSITORY}/{IMAGE} \
    --limit=5

If the updated container image tag is published and deployed without the reported CVE, the remediation is successful.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an API key, Needs Node.js

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/google-cloud-scc-remediation · commit 2194d3b
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google or Google.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-scc-remediation.zip