소스 정보
- 저장소
- ffsshhttiikk/opencode-agents-skills
- 최근 소스 활동
- 2026년 2월 28일 22:51
- 감지된 SKILL.md 언어
- 영어
- 스타
- 2
- 포크
- 2
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill incident-response명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | incident-response |
| description | Security incident handling procedures |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","category":"security"} |
When responding to security breaches, suspicious activities, or potential vulnerabilities.
from enum import Enum
from datetime import datetime
class Severity(Enum):
CRITICAL = "critical"
HIGH = "high"
MEDIUM = "medium"
LOW = "low"
class IncidentType(Enum):
MALWARE = "malware"
PHISHING = "phishing"
DATA_BREACH = "data_breach"
DDOS = "ddos"
UNAUTHORIZED_ACCESS = "unauthorized_access"
INSIDER_THREAT = "insider_threat"
class IncidentResponsePlan:
def __init__(self):
self.escalation_contacts = {}
self.severity_matrix = {
Severity.CRITICAL: {
"response_time": "immediate",
"escalate_to": ["CISO", "CEO", "Legal"],
"external_notification": True
},
Severity.HIGH: {
"response_time": "1 hour",
"escalate_to": ["CISO", "CTO"],
"external_notification": False
},
Severity.MEDIUM: {
"response_time": "4 hours",
"escalate_to": ["Security Lead"],
"external_notification": False
},
Severity.LOW: {
"response_time": "24 hours",
"escalate_to": ["Security Team"],
"external_notification": False
}
}
def create_incident(self, incident_type: IncidentType,
severity: Severity, description: str) -> dict:
incident = {
"id": self._generate_incident_id(),
"type": incident_type.value,
"severity": severity.value,
"description": description,
"status": "open",
"created_at": datetime.now().isoformat(),
"timeline": [{
"timestamp": datetime.now().isoformat(),
"action": "Incident created",
"actor": "Automated detection"
}]
}
# Escalate based on severity
rules = self.severity_matrix[severity]
self._notify_escalation(incident, rules["escalate_to"])
return incident
def _generate_incident_id(self) -> str:
import secrets
return f"INC-{datetime.now().strftime('%Y%m%d')}-{secrets.token_hex(4)}"
class IncidentDetector:
def __init__(self):
self.anomaly_threshold = 3.0 # Standard deviations
def detect_anomalies(self, event: dict) -> list:
"""Detect potential security incidents from events"""
alerts = []
# Failed login detection
if event.get("event_type") == "login_failed":
if self._is_brute_force(event):
alerts.append({
"type": "brute_force",
"severity": Severity.HIGH,
"evidence": event
})
# Data exfiltration
if event.get("event_type") == "data_transfer":
if self._is_unusual_volume(event):
alerts.append({
"type": "data_exfiltration",
"severity": Severity.CRITICAL,
"evidence": event
})
# Privilege escalation
if event.get("event_type") == "permission_change":
alerts.append({
"type": "privilege_escalation",
"severity": Severity.HIGH,
"evidence": event
})
alerts
() -> :
event.get(, ) >
() -> :
event.get(, ) >
class IncidentContainment:
def __init__(self):
self.quarantined_hosts = set()
self.blocked_ips = set()
def contain_incident(self, incident: dict) -> dict:
actions = []
# Isolate affected systems
if incident["type"] == "malware":
for host in self._identify_affected_hosts(incident):
self._isolate_host(host)
actions.append(f"Isolated host {host}")
# Block attacker IPs
if incident["type"] == "unauthorized_access":
for ip in self._identify_attacker_ips(incident):
self._block_ip(ip)
actions.append(f"Blocked IP {ip}")
# Revoke compromised credentials
if incident["type"] in ["phishing", "unauthorized_access"]:
for user in self._identify_compromised_users(incident):
self._revoke_sessions(user)
actions.append()
._capture_forensics(incident)
{: actions, : }
():
.quarantined_hosts.add(host_id)
():
.blocked_ips.add(ip)
class IncidentInvestigator:
def __init__(self):
self.evidence_store = []
def investigate(self, incident: dict) -> dict:
findings = {
"incident_id": incident["id"],
"timeline": self._reconstruct_timeline(incident),
"attack_vector": self._identify_attack_vector(incident),
"scope": self._determine_scope(incident),
"root_cause": self._find_root_cause(incident),
"evidence": self._collect_evidence(incident)
}
return findings
def _reconstruct_timeline(self, incident: dict) -> list:
"""Build chronological timeline of events"""
# Correlate logs from various sources
return sorted(incident.get("related_events", []),
key=lambda x: x["timestamp"])
def _identify_attack_vector(self, incident: dict) -> str:
"""Determine how the attacker gained access"""
vectors = ["phishing", "exploit", ,
, , ]
vectors[]
() -> :
{
: [],
: [],
: ,
:
}
class IncidentRecovery:
def recover_from_incident(self, incident: dict) -> dict:
recovery_steps = []
# 1. Verify threat is contained
if not self._verify_containment(incident):
raise RuntimeError("Cannot recover - threat not contained")
# 2. Restore from clean backups
backup_date = self._find_clean_backup(incident)
self._restore_systems(backup_date)
recovery_steps.append("Systems restored from backup")
# 3. Patch vulnerabilities
self._apply_patches(incident)
recovery_steps.append("Vulnerabilities patched")
# 4. Reset credentials
self._reset_credentials(incident)
recovery_steps.append("Credentials rotated")
# 5. Resume services
self._resume_services()
recovery_steps.append("Services resumed")
return {
"status": "recovered",
"steps": recovery_steps,
"verified_at": datetime.now().isoformat()
}
class PostIncidentReview:
def conduct_review(self, incident: dict, findings: dict) -> dict:
return {
"summary": "Brief incident summary",
"timeline": incident["timeline"],
"root_cause": findings["root_cause"],
"impact": findings["scope"],
"lessons_learned": [
"What went well",
"What could be improved",
"Action items"
],
"recommendations": [
"Technical improvements",
"Process improvements",
"Training needs"
]
}
def update_playbook(self, incident: dict, lessons: list):
"""Update incident response playbook"""
pass