Containment Strategy
Define containment, eradication, and isolation procedures for "$ARGUMENTS" covering network isolation, account lockout, service isolation, data containment, eradication steps, and recovery criteria.
Prerequisites
Read .metapowers/security/$ARGUMENTS/00-govern.md. If this file does not exist, tell the user:
Phase 0 (Govern) has not been completed for "$ARGUMENTS". Run a Govern skill first (e.g., /security:security-policy $ARGUMENTS), or use --skip-checks to bypass.
If --skip-checks is present in $ARGUMENTS, skip this check and log to .metapowers/security/$ARGUMENTS/skip-log.md.
Process
Read context files:
- Read
plugins/security/shared/incident-response-template.md for containment workflow reference
- Read
.metapowers/security/$ARGUMENTS/00-govern.md for organizational context and risk appetite
Define containment strategies by incident type:
Network isolation:
- VLAN segmentation to isolate compromised network segments
- Firewall rule updates to block attacker IP ranges and C2 communication
- DNS sinkholing for known malicious domains
- Network access control (NAC) to quarantine affected endpoints
- Define pre-built isolation rules ready for rapid deployment
Account lockout:
- Disable compromised user accounts and service accounts immediately
- Revoke active sessions and tokens (OAuth, JWT, API keys)
- Force password reset for potentially affected accounts
- Temporarily restrict privilege escalation paths
- Define criteria for account lockout scope (individual, team, organization-wide)
Service isolation:
- Kill switches for individual features or services (feature flags)
- API gateway rate limiting or blocking for compromised endpoints
- Container and pod isolation (Kubernetes network policies)
- Load balancer traffic diversion away from compromised instances
- Define pre-configured isolation mechanisms per service
Data containment:
- Revoke access to compromised data stores
- Encrypt exposed data if not already encrypted
- Block data exfiltration channels (DLP rules, egress filtering)
- Snapshot compromised data stores for forensic analysis before changes
Define eradication steps:
- Patch — apply security patches for exploited vulnerabilities
- Rebuild — reimage compromised systems from known-good baselines
- Credential rotation — rotate all credentials that may have been exposed (passwords, API keys, certificates, tokens)
- Malware removal — scan and clean affected systems, verify with multiple tools
- Configuration hardening — close the attack vector that was exploited
- Dependency update — update or replace compromised third-party components
Define recovery criteria:
- When is it safe to restore? Define specific checkpoints:
- Root cause identified and remediated
- All compromised credentials rotated
- Compromised systems rebuilt or verified clean
- Monitoring enhanced for the specific attack vector
- No further indicators of compromise detected for defined observation period
- Define verification procedures before bringing systems back online
- Plan for phased recovery (internal validation → limited users → full restoration)
Plan for containment trade-offs:
- Document availability vs. security trade-offs for each containment action
- Define decision authority for trade-offs (who can authorize service disruption for containment)
- Pre-approve containment actions for P1 incidents (security team can act without waiting for business approval)
- Define rollback procedures if containment causes unacceptable business impact
- Plan for partial containment when full isolation is not feasible
Write the artifact to .metapowers/security/$ARGUMENTS/04-respond.md with heading:
Containment Strategy
Include sections:
- Containment by Incident Type — network, account, service, and data containment procedures
- Pre-Built Isolation Mechanisms — ready-to-deploy containment rules and configurations
- Eradication Steps — patching, rebuilding, credential rotation, and hardening
- Recovery Criteria — checkpoints and verification procedures for safe restoration
- Containment Trade-Offs — availability vs. security decisions and authority matrix
- Phased Recovery Plan — staged approach to bringing systems back online
Output
The containment strategy written to .metapowers/security/$ARGUMENTS/04-respond.md. Present a summary to the user highlighting:
- Containment strategies per incident type
- Pre-built isolation mechanisms ready for deployment
- Eradication steps and credential rotation plan
- Recovery criteria and phased restoration approach
1---2name: containment-strategy3description: Define containment, eradication, and isolation procedures4---56# Containment Strategy78Define containment, eradication, and isolation procedures for "$ARGUMENTS" covering network isolation, account lockout, service isolation, data containment, eradication steps, and recovery criteria.910## Prerequisites1112Read `.metapowers/security/$ARGUMENTS/00-govern.md`. If this file does not exist, tell the user:1314> Phase 0 (Govern) has not been completed for "$ARGUMENTS". Run a Govern skill first (e.g., `/security:security-policy $ARGUMENTS`), or use `--skip-checks` to bypass.1516If `--skip-checks` is present in $ARGUMENTS, skip this check and log to `.metapowers/security/$ARGUMENTS/skip-log.md`.1718## Process19201. **Read context files:**21 - Read `plugins/security/shared/incident-response-template.md` for containment workflow reference22 - Read `.metapowers/security/$ARGUMENTS/00-govern.md` for organizational context and risk appetite23242. **Define containment strategies by incident type:**2526 **Network isolation:**27 - VLAN segmentation to isolate compromised network segments28 - Firewall rule updates to block attacker IP ranges and C2 communication29 - DNS sinkholing for known malicious domains30 - Network access control (NAC) to quarantine affected endpoints31 - Define pre-built isolation rules ready for rapid deployment3233 **Account lockout:**34 - Disable compromised user accounts and service accounts immediately35 - Revoke active sessions and tokens (OAuth, JWT, API keys)36 - Force password reset for potentially affected accounts37 - Temporarily restrict privilege escalation paths38 - Define criteria for account lockout scope (individual, team, organization-wide)3940 **Service isolation:**41 - Kill switches for individual features or services (feature flags)42 - API gateway rate limiting or blocking for compromised endpoints43 - Container and pod isolation (Kubernetes network policies)44 - Load balancer traffic diversion away from compromised instances45 - Define pre-configured isolation mechanisms per service4647 **Data containment:**48 - Revoke access to compromised data stores49 - Encrypt exposed data if not already encrypted50 - Block data exfiltration channels (DLP rules, egress filtering)51 - Snapshot compromised data stores for forensic analysis before changes52533. **Define eradication steps:**54 - **Patch** — apply security patches for exploited vulnerabilities55 - **Rebuild** — reimage compromised systems from known-good baselines56 - **Credential rotation** — rotate all credentials that may have been exposed (passwords, API keys, certificates, tokens)57 - **Malware removal** — scan and clean affected systems, verify with multiple tools58 - **Configuration hardening** — close the attack vector that was exploited59 - **Dependency update** — update or replace compromised third-party components60614. **Define recovery criteria:**62 - When is it safe to restore? Define specific checkpoints:63 - Root cause identified and remediated64 - All compromised credentials rotated65 - Compromised systems rebuilt or verified clean66 - Monitoring enhanced for the specific attack vector67 - No further indicators of compromise detected for defined observation period68 - Define verification procedures before bringing systems back online69 - Plan for phased recovery (internal validation → limited users → full restoration)70715. **Plan for containment trade-offs:**72 - Document availability vs. security trade-offs for each containment action73 - Define decision authority for trade-offs (who can authorize service disruption for containment)74 - Pre-approve containment actions for P1 incidents (security team can act without waiting for business approval)75 - Define rollback procedures if containment causes unacceptable business impact76 - Plan for partial containment when full isolation is not feasible77786. **Write the artifact** to `.metapowers/security/$ARGUMENTS/04-respond.md` with heading:7980 ## Containment Strategy8182 Include sections:83 - **Containment by Incident Type** — network, account, service, and data containment procedures84 - **Pre-Built Isolation Mechanisms** — ready-to-deploy containment rules and configurations85 - **Eradication Steps** — patching, rebuilding, credential rotation, and hardening86 - **Recovery Criteria** — checkpoints and verification procedures for safe restoration87 - **Containment Trade-Offs** — availability vs. security decisions and authority matrix88 - **Phased Recovery Plan** — staged approach to bringing systems back online8990## Output9192The containment strategy written to `.metapowers/security/$ARGUMENTS/04-respond.md`. Present a summary to the user highlighting:93- Containment strategies per incident type94- Pre-built isolation mechanisms ready for deployment95- Eradication steps and credential rotation plan96- Recovery criteria and phased restoration approach