agentleFS
ghivelyghively/infra-ops/skills/incident-response/SKILL.md

incident-response

Skill0 starsChanged 6 months agoMITView on GitHub

The bounded playbook for when cardholder data or a secret surfaces where it should not — e.g. the pan-egress-filter hook fires, or PAN appears in a log/file. Covers PCI DSS 12.10.x incident response and 12.10.7 (PAN found in an unexpected location): contain, notify, preserve evidence, and the agent's strictly-limited role. Triggers on: incident, PAN found, secret leaked, data exposure, pan-egress-filter fired, containment, breach, 12.10.7.

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use dora-metrics, cli-development and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • caiaffaSkill

    dora-metrics

    Measure and improve engineering delivery performance using the four DORA metrics — deployment frequency, lead time for changes, change failure rate, and time to restore. Use to assess delivery health and find the next bottleneck.

    Also in 3 projects that use this

  • nimadorostkarSkill

    cli-development

    Use when building command-line tools. Covers argument design, exit codes, streams and piping, progress output, configuration precedence, and behavior that respects the shell.

    Also in 3 projects that use this

  • jessefmooreSkill

    exploit-development

    PoC development, payload crafting, shellcode generation, ROP chains, heap exploitation, bypass techniques for modern mitigations (ASLR, DEP, CFI, stack canaries)

    Also in 3 projects that use this

  • witi-projectsSkill

    react-native-patterns

    Build mobile apps with React Native and Expo — navigation, platform-specific code, performance, and native modules. Use when the user says "/react-native-patterns", "react native patterns", or asks about react native patterns.

    Also in 3 projects that use this

  • mmondoraSkill

    data-modeling

    Schema design, multi-tenant data isolation, and migration management. Firestore and PostgreSQL patterns, RLS, UUID v7 conventions. Use when designing database schemas, writing migrations, or implementing multi-tenant data access.

    Also in 4 projects that use this

  • Robotti-ioSkill

    secure-code-review

    Repeatable process for an application security code review that produces prioritized findings and fix guidance.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the moment cardholder data, a PIN, key material, or a live secret appears where it must not — the pan-egress-filter hook denied a tool …

    line 17
  2. Distinctive:

    No autonomous remediation, no prod action, no cloud egress of sensitive data.

    line 64
  3. Distinctive:

    MUST: Escalate to the security team immediately on confirmation of CHD exposure

    line 76
  4. Distinctive:

    Do not access or copy the SAD — it is evidence

    line 83
  5. Very specific:

    When documenting an incident, write to docs/incidents/<ISO-date>-<slug>.md:

    line 89

“Common” is measured: kept by at least 6 in 10 of the 50 edited versions of this file we could read. “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

Incident Response Skill

When to Use

Use the moment cardholder data, a PIN, key material, or a live secret appears where it must not — the pan-egress-filter hook denied a tool call, a scan flagged a PAN, or PAN/SAD turns up in a log, file, or output. This skill defines the agent's narrow, safe role in a PCI incident; it does not make the agent an incident commander.

How It Works

The agent's role is stop, preserve, escalate — never exfiltrate or remediate unilaterally.

  1. Contain (do no harm) — stop the action that surfaced the data. Do not copy, echo, paste, transmit, or "clean up" the value; do not delete the evidence. Any further handling moves to authorized humans out-of-band.
  2. Do not expand scope — do not read more of the offending file/log than already surfaced; do not pull the data into the model context or any cloud path. CHD-adjacent material routes to the local lane only.
  3. Preserve evidence — note where it was found (path, log, job id, line) without reproducing the value. The governance ledger already has a fingerprinted record; reference it.
  4. Notify / escalate — surface a concise, redacted incident record to the human operator and the security/compliance owner. For PAN in an unexpected location this is PCI DSS 12.10.7; broader handling follows the org's 12.10.x incident response plan (roles, timelines, evidence handling, post-incident review).
  5. Record — ensure the event reaches the tamper-evident audit trail / SIEM (governance-ledger forwards when configured). Recommend the follow-up: rotate any exposed credential, hunt for other copies, and a post-incident review.

Examples

Redacted incident record (what the agent emits)

INCIDENT: suspected CHD/secret exposure
Class: PAN-in-unexpected-location (PCI DSS 12.10.7) | leaked-credential | key-material
Where: <path / job-id / log line>   (VALUE NOT REPRODUCED)
Detected by: pan-egress-filter | secrets-scanner | manual
Containment taken: action halted; value not copied/transmitted; evidence preserved
Escalated to: <human operator / security owner>
Recommended follow-up: rotate exposed credential, search for other copies,
  open IR per 12.10.x, post-incident review
Governance ledger ref: <id>

Trust boundary

  • Never reproduce, transmit, or delete the exposed PAN/SAD/key/PIN. Cite location only.
  • The agent contains and escalates; humans run the PCI incident-response plan.
  • No autonomous remediation, no prod action, no cloud egress of sensitive data.
  • HSA incidents are handled entirely in-zone under dual control — route, do not act.

Deep Reference — PCI 12.10.x Incident Response

Agent Role Boundary (critical)

The agent's role in an incident is: Contain → Preserve → Escalate. The agent:

  • MAY: Read logs, identify affected systems from metadata, propose containment steps
  • MAY NOT: Execute containment actions without human approval
  • MAY NOT: Handle any evidence that contains PAN, SAD, or key material
  • MUST: Escalate to the security team immediately on confirmation of CHD exposure

PCI 12.10.7 — Unauthorized SAD Storage Response

  1. Immediately isolate the system from the network (human action, agent proposes)
  2. Preserve all logs (do not rotate or delete)
  3. Notify the security team and legal counsel
  4. Do not access or copy the SAD — it is evidence
  5. Engage QSA/CPSA for forensic investigation
  6. File SAR if required by card brand rules

Incident Record Format

When documenting an incident, write to docs/incidents/<ISO-date>-<slug>.md:

incident_id: INC-<YYYYMMDD>-<seq>
detected_at: <ISO datetime>
detected_by: <agent/human>
scope: <systems affected>
classification: <SAD-exposure | unauthorized-access | malware | other>
chd_involved: true | false   # if true: CPSA involvement required
containment_proposed:
  - <step 1>
  - <step 2>
evidence_preserved:
  - path: <log file path>
    hash: <sha256>
escalated_to: <security team contact>
qsa_engaged: false | true
status: open | contained | resolved

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.