agentleFS
kryptophonikkryptophonik/SRE-Skills/.claude/skills/sre-security-incident-triage/SKILL.md

sre-security-incident-triage

Skill4 starsChanged 25 days agoMITView on GitHub

Use when a security compromise is suspected: leaked credentials, suspicious access, compromised host or container, unexpected infra changes. Preserve evidence, gated containment, hand off to security.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.

    line 12
  2. Distinctive:

    Do not restart, delete, re-image, or scale down suspected hosts/pods before evidence is captured and security agrees — it destroys evidence.

    line 21
  3. Distinctive:

    Do not paste secrets, tokens, or customer data into chat, tickets, or AI tools.

    line 22
  4. Distinctive:

    Do not tip off a suspected insider in public channels.

    line 23
  5. Distinctive:

    Do not post externally; legal/privacy own customer and regulator notices.

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Incident Triage

Safety gates (REQUIRED)

  1. Read-only diagnosis first.
  2. Propose each change with risk (low/med/high) and reversibility.
  3. Wait for explicit human approval before any prod-changing command, MCP write tool, or external post.
  4. Act only as approved, verify, and stop and escalate if anything gets worse.

Full rules: sre-safety-gates. Read-only MCP setup: sre-safety-gates/references/mcp.md.

Hand off early. Notify the security team / security on-call as soon as compromise is plausible. They own the investigation; SRE supports.

Do not

  • Do not restart, delete, re-image, or scale down suspected hosts/pods before evidence is captured and security agrees — it destroys evidence.
  • Do not paste secrets, tokens, or customer data into chat, tickets, or AI tools. Reference them by name/ID.
  • Do not tip off a suspected insider in public channels; use a private channel.
  • Do not post externally; legal/privacy own customer and regulator notices.

Workflow

  1. Open a private channel, page security on-call, start a timeline (UTC).
  2. Scope (read-only): what is suspected, which accounts/keys/hosts, first and last seen.
  3. Preserve evidence: snapshot disks/volumes, export audit logs, save pod specs and logs, record running processes — through approved tooling.
  4. Propose containment (with security, approval required): rotate/disable leaked keys, isolate host (security group / network policy), revoke sessions, block IPs. Prefer isolate over delete.
  5. Monitor for continued activity after containment.
  6. Hand off with evidence locations and timeline; support recovery.
  7. Postmortem with security (sre-postmortem-templates), keeping sensitive details restricted.

Read-only audit queries

# AWS: recent activity for an access key
aws cloudtrail lookup-events --profile <profile> --region <region> --lookup-attributes AttributeKey=AccessKeyId,AttributeValue=<AKIA...> --max-results 50
# Azure: activity log for a resource group, last 24h
az monitor activity-log list --resource-group <rg> --subscription <subscription-id> --offset 24h -o table
# GCP: admin activity audit log
gcloud logging read 'logName:"cloudaudit.googleapis.com%2Factivity"' --project=<PROJECT_ID> --freshness=1d --limit=50
# Kubernetes: who can do what
kubectl --context <ctx> -n <ns> auth can-i --list --as=<user>

Containment actions (WRITE — security + IC approval)

ActionRiskReversible
Deactivate AWS access key: aws iam update-access-key --profile <profile> --access-key-id <id> --status Inactive --user-name <user>medyes
Isolate pod: apply deny-all NetworkPolicy selecting the podmedyes
Cordon node: kubectl --context <ctx> cordon <node>lowyes
Rotate secret in secret manager and redeploy consumersmedpartial

Output

  • Security triage record: timeline, scope, evidence locations, containment taken (with approver), handoff to security

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.