Agent skill

Investigating GCP Incidents

by trilwu in trilwu/secskills

Investigate a security incident in Google Cloud — establishing what audit logging exists before trusting a gap, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth…

MITAuto-check passedSecurity

Install Investigating GCP Incidents

skills CLI
$ npx skills add trilwu/secskills --skill investigating-gcp-incidents -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trilwu/secskills investigating-gcp-incidents --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trilwu/secskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/secskills-defense/skills/investigating-gcp-incidents .claude/skills/investigating-gcp-incidents && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
investigating-gcp-incidents
GitHub stars
157
Token cost
~2.2k tokens
SKILL.md length
1,019 words
Files
1
Skills in repo
50
Repo updated
First seen
Licence
MIT

At a glance

Investigate a security incident in Google Cloud — establishing what audit logging exists before trusting a gap, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth…

  • Responding to a suspected GCP compromise
  • SKILL.md covers When to Use, When NOT to Use, Establish Visibility Before… and Reconstructing Activity, plus 5 more sections
  • Calls gcloud, jq and curl; reaches defuddle.md
  • Investigating a leaked service-account key

What it does

Investigating GCP Incidents is an agent skill from trilwu/secskills. Investigate a security incident in Google Cloud — establishing what audit logging exists before trusting a gap, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth abuse, following Security Command Center findings, and scoping IAM and resource changes. Use when responding to a suspected GCP compromise, investigating a leaked service-account key, working a Security Command Center or Event Threat Detection alert, or reconstructing what a principal did across a GCP organization.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Security, covering Security operations and OAuth and OpenID Connect. It works with Google Cloud, Amazon Web Services and Microsoft Azure. The repository describes itself as: Transform Claude Code into your personal security engineer. The licence is MIT.

When your agent uses it

  • Responding to a suspected GCP compromise
  • Investigating a leaked service-account key
  • Working a Security Command Center
  • Event Threat Detection alert

Example prompts

  • “/investigating-gcp-incidents”

What it can do on your machine

Read from SKILL.md and the folder at commit ca53957. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gcloud
    • jq
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • defuddle.md

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Investigating GCP Incidents loads about 2.2k tokens when it runs. Until then it costs about 135 tokens; SKILL.md has 1,019 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~135
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trilwu/secskills at commit ca53957, republished under its MIT licence (© trilwu). 1,019 words, ~2,171 tokens.

Download SKILL.mdSave it as .claude/skills/investigating-gcp-incidents/SKILL.md (or your agent's skills folder).
name
investigating-gcp-incidents
description
Investigate a security incident in Google Cloud — establishing what audit logging exists before trusting a gap, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth abuse, following Security Command Center findings, and scoping IAM and resource changes. Use when responding to a suspected GCP compromise, investigating a leaked service-account key, working a Security Command Center or Event Threat Detection alert, or reconstructing what a principal did across a GCP organization.
verified
2026-07-27

Investigating GCP Incidents

The completeness of a GCP investigation is decided before the incident, by which audit logs were enabled. The single most damaging mistake is reading an empty query result as "nothing happened" when the real answer is "that log category was never turned on." Establish visibility first; conclude second.

GCP's audit model is not AWS's and not Azure's. Two categories are always on and two are mostly off, and knowing which is which is the difference between a scoped investigation and a false all-clear.

When to Use

  • Responding to a suspected compromise in a GCP project or organization
  • Investigating a leaked or abused service-account key
  • Working a Security Command Center, Event Threat Detection, or Chronicle alert
  • Reconstructing a principal's activity across projects
  • Scoping IAM policy or resource changes after a suspected privilege escalation

When NOT to Use

  • The incident is in AWS — use investigating-aws-incidents; in Azure or Microsoft 365 / Entra — use investigating-azure-incidents or investigating-m365-entra
  • Attacking GCP rather than investigating it — use exploiting-cloud-platforms
  • A GKE cluster compromise specifically — start here for the cloud-plane view, then use defending-kubernetes for the cluster-plane
  • Deciding whether an alert is even an incident — use triaging-security-alerts first

Establish Visibility Before You Conclude

GCP Cloud Audit Logs come in four streams, and their defaults are the whole game:

StreamDefaultCan disable?What it captures
Admin ActivityAlways onNo — written even if the Logging API is disabledConfig and metadata writes: IAM changes, resource create/delete
System EventAlways onNoGoogle-initiated actions on your resources
Data AccessOff (except BigQuery)YesReads and data-plane access — who read the bucket, the secret, the dataset
Policy DeniedOnNo (can exclude from storage)Access blocked by policy — VPC-SC, org policy

The consequence you must internalize: Data Access logging is off by default everywhere except BigQuery. So "did the attacker read the secret / download the bucket / exfiltrate the dataset?" is usually unanswerable from logs unless Data Access logging was enabled in advance. Do not report "no exfiltration occurred" — report "Data Access logging was not enabled, so read activity cannot be confirmed or ruled out." Those are different findings, and only one is honest.

Retention also differs by stream. Admin Activity and System Event land in the _Required bucket — 400 days, not configurable. Data Access and Policy Denied land in _Default — 30 days unless someone extended it or routed a sink to longer storage. Check the retention before assuming history exists.

bash
# What audit config is actually in effect at the org / project level
gcloud organizations get-iam-policy ORG_ID --format=json | jq '.auditConfigs'
gcloud projects get-iam-policy PROJECT_ID --format=json | jq '.auditConfigs'

Reconstructing Activity

bash
# Everything a principal did (Admin Activity is always present)
gcloud logging read \
  'protoPayload.authenticationInfo.principalEmail="attacker@example.com"' \
  --project=PROJECT_ID --freshness=30d --format=json

# IAM policy changes — the escalation signal
gcloud logging read \
  'protoPayload.methodName:"SetIamPolicy"' --freshness=30d --format=json

# Service-account key creation — persistence
gcloud logging read \
  'protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey"' \
  --freshness=30d --format=json

Read the request fields, not just the method name. authenticationInfo carries the principal and, critically, whether a call was made as a service account via impersonation. requestMetadata.callerIp and callerSuppliedUserAgent locate the source; a gcloud user agent from an unexpected ASN on a service account is a strong signal.

Service-Account and OAuth Abuse

Service accounts are the center of most GCP incidents, because they hold durable credentials and are routinely over-privileged.

  • Impersonation chains. iam.serviceAccounts.getAccessToken and ...signJwt/...signBlob let one principal act as another. Trace the chain: who impersonated what, and does the terminal identity hold more than the origin? This is GCP's primary lateral-movement and escalation primitive.
  • Key creation is persistence — a user-managed key survives a password reset and an MFA change. Every CreateServiceAccountKey on a privileged SA during the incident window is a finding.
  • OAuth grants and the Workspace boundary. A domain-wide-delegation grant lets a GCP service account act across Google Workspace; that crosses into investigating-m365-entra-style identity territory and is easy to miss from a pure-GCP view.

Follow Security Command Center, Don't Restart From Zero

If Security Command Center is enabled, Event Threat Detection has likely already correlated some of this — anomalous IAM grants, service-account key abuse, and exfiltration patterns surface as findings. Start from SCC findings to seed the timeline, then corroborate each against the raw audit logs rather than trusting the finding alone. SCC in the Standard tier is far thinner than Premium/Enterprise; confirm which tier is licensed before assuming a detection would have fired.

Show full SKILL.md (369 more words)Show less

Rationalizations to Reject

  • "The logs show no data access, so nothing was exfiltrated." Data Access logging is off by default. Absence of the log is absence of the logging, not absence of the access. Report the visibility gap.
  • "Admin Activity is empty for that window, so the account was idle." Check the principal spelling and the project — activity is logged in the project whose resource was touched, which may not be the one you are querying.
  • "It's only 30 days back." That is the _Default bucket. Admin Activity is 400 days; if the relevant action was an IAM or resource change, the history is longer than you think.
  • "The service account made the call, so it was legitimate automation." Service accounts are exactly what attackers impersonate. Check whether the call came via getAccessToken/impersonation and from what source.
  • "SCC didn't flag it, so it didn't happen." Standard-tier SCC detects a fraction of what Premium does, and Data Access-dependent detections need the logs enabled. A quiet SCC is not an all-clear.

Reading External Sources

Fetch public advisories, specifications, and vendor reports as Markdown:

bash
curl -sL "https://defuddle.md/<url>"      # scheme in the path is optional

This strips page boilerplate — roughly 78% fewer tokens on a prose page — and returns the full text rather than a summary, so you can grep it and trust a negative result.

Three things it is not for. Fetch JSON and API responses raw, because readability extraction mangles structured data. Fetch authenticated or JavaScript-rendered pages directly, because it retrieves them anonymously. And never route adversary infrastructure (phishing links, C2, malware hosting), client-owned hosts, or engagement URLs through it — the request leaves your machine to a third party, and for live adversary infrastructure it also tips off the operator.

Some sites block the extractor and return an error blob rather than the page — {"error":"Failed to fetch: 418 I'm a teapot"} from freedesktop.org, for instance. That is the fetch being refused, not the source saying the thing does not exist. Re-fetch the URL directly before drawing any conclusion from it.

References

  • investigating-aws-incidents, investigating-azure-incidents — the same discipline in the other two clouds
  • defending-kubernetes — the cluster-plane view when the incident is in GKE
  • responding-to-incidents — the overall IR framing this feeds
  • hardening-cloud-posture — enabling the Data Access logging whose absence this skill keeps running into

© trilwu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in secskills-defense/skills/investigating-gcp-incidents of trilwu/secskills.

Open the folder on GitHubat commit ca53957

Compare with similar skills

Investigating GCP Incidents next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Investigating GCP Incidents compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Investigating GCP Incidents this skilltrilwu/secskills157—~2.2kAutomated safety check: PassMIT
Conducting Cloud Incident Responsemukul975/Anthropic-Cybersecurity-Skills34k—~3kAutomated safety check: PassApache-2.0
Atmos Migrationcloudposse/atmos1.4k—~5.1kAutomated safety check: WarnApache-2.0
Hunting For Living Off The Cloud Techniquesmukul975/Anthropic-Cybersecurity-Skills34k—~925Automated safety check: PassApache-2.0
Building Cloud Siem With Sentinelmukul975/Anthropic-Cybersecurity-Skills34k—~3.3kAutomated safety check: PassApache-2.0
Managing Cloud Identity With Oktamukul975/Anthropic-Cybersecurity-Skills34k—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Conducting Cloud Incident Response

    mukul975/Anthropic-Cybersecurity-Skills

    Respond to security incidents in AWS, Azure, and GCP via identity-based containment, cloud-native log analysis (CloudTrail, Azure Activity Logs, GCP Audit Logs), resource isolation, and forensic…

    34k GitHub stars~3k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Atmos Migration

    cloudposse/atmos

    Migrate to Atmos from native Terraform, Terraform Workspaces, Terramate, Terragrunt, Make, Just, or Task; migrate tool versions from mise or Aqua CLI; migrate AWS/GCP/Azure CLI configs, Leapp…

    1.4k GitHub stars~5.1k tokensUpdated today
    DevOps & CloudAuto-check: warnings
  • Hunting For Living Off The Cloud Techniques

    mukul975/Anthropic-Cybersecurity-Skills

    Hunts for adversary abuse of legitimate cloud services (Azure, AWS, GCP, and SaaS platforms) for command-and-control, data staging, and exfiltration, i.e.

    34k GitHub stars~925 tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Building Cloud Siem With Sentinel

    mukul975/Anthropic-Cybersecurity-Skills

    Deploy Microsoft Sentinel as a cloud-native SIEM/SOAR by configuring multi-cloud data connectors (AWS, Azure, GCP), writing KQL detection and hunting queries, and building automated Logic Apps…

    34k GitHub stars~3.3k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Managing Cloud Identity With Okta

    mukul975/Anthropic-Cybersecurity-Skills

    Implement Okta as a centralized cloud identity provider: configure SSO with AWS, Azure, and GCP, deploy phishing-resistant MFA with Okta FastPass, automate user provisioning/deprovisioning, and…

    34k GitHub stars~3.1k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Oma Tf Infra

    first-fluke/oh-my-agent

    Infrastructure-as-code specialist for multi-cloud provisioning using Terraform across any provider (AWS, GCP, Azure, Oracle Cloud).

    1.3k GitHub stars~2.8k tokensUpdated yesterday
    DevOps & CloudAuto-check passed

More from trilwu/secskills

All 50 skills in this repo
  • Audit source code for exploitable vulnerabilities using threat-model-driven review, taint tracing, invariant checking, and variant analysis.

    157 GitHub stars~3.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Perform OSINT, subdomain enumeration, port scanning, web reconnaissance, email harvesting, and cloud asset discovery for initial access.

    157 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check: notes
  • Securing AI Systems

    trilwu/secskills

    Assess and harden LLM applications and agentic systems against prompt injection, tool misuse, excessive agency, memory poisoning, RAG data leakage, and model supply-chain risk, mapped to the OWASP…

    157 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing Binaries

    trilwu/secskills

    Reverse engineer compiled binaries, firmware, and mobile app packages using triage, static disassembly, decompilation, and dynamic instrumentation.

    157 GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing Go Binaries

    trilwu/secskills

    Reverse engineer Go binaries by recovering function names and types from pclntab and moduledata using GoReSym, redress, and IDA/Ghidra Go plugins, and by reading Go's non-standard calling…

    157 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Analyzing iOS Binaries

    trilwu/secskills

    Analyze iOS applications at the binary level — decrypting FairPlay-protected IPAs with frida-ios-dump or bagbak, inspecting Mach-O load commands, recovering Objective-C headers with class-dump, and…

    157 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Investigating GCP Incidents

What does Investigating GCP Incidents do?

Investigate a security incident in Google Cloud — establishing what audit logging exists before trusting a gap, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth…. Investigating GCP Incidents is an agent skill from trilwu/secskills. Investigate a security incident in Google Cloud — establishing what audit logging exists before trusting a gap, reconstructing activity from Cloud Audit Logs, triaging service-account and OAuth abuse, following Security Command Center findings, and scoping IAM and resource changes.

When should I use Investigating GCP Incidents?

Investigating GCP Incidents fits situations like: responding to a suspected GCP compromise; investigating a leaked service-account key; working a Security Command Center; event Threat Detection alert.

How do I install Investigating GCP Incidents in Claude Code?

Run `npx skills add trilwu/secskills --skill investigating-gcp-incidents -a claude-code`. Or copy the skill folder (secskills-defense/skills/investigating-gcp-incidents in trilwu/secskills) into .claude/skills/investigating-gcp-incidents in your project. Claude Code loads it when a task matches its description.

How do I install Investigating GCP Incidents in Codex?

Run `npx skills add trilwu/secskills --skill investigating-gcp-incidents -a codex`. Or copy the skill folder (secskills-defense/skills/investigating-gcp-incidents in trilwu/secskills) into .agents/skills/investigating-gcp-incidents in your project. Codex loads it when a task matches its description.

Can I use Investigating GCP Incidents in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trilwu/secskills --skill investigating-gcp-incidents -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/investigating-gcp-incidents, .gemini/skills/investigating-gcp-incidents, .github/skills/investigating-gcp-incidents and .opencode/skills/investigating-gcp-incidents in your project.

What does Investigating GCP Incidents need to run?

Going by SKILL.md and its folder, Investigating GCP Incidents needs the command-line tools its instructions call (gcloud, jq and curl).

Does Investigating GCP Incidents access the network?

SKILL.md names 1 domain. In commands or code: defuddle.md; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Investigating GCP Incidents safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Investigating GCP Incidents use?

Investigating GCP Incidents is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Investigating GCP Incidents use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Investigating GCP Incidents?

Skills that share tags, products or a category with Investigating GCP Incidents: Conducting Cloud Incident Response (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Atmos Migration (cloudposse/atmos, 1.4k stars), Hunting For Living Off The Cloud Techniques (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Building Cloud Siem With Sentinel (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Investigating GCP Incidents?

trilwu (a GitHub user) maintains it in trilwu/secskills, which has 157 GitHub stars. The repository holds 50 skills in this directory. The repository was last updated on September 4, 2026.

Source: trilwu/secskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.