[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A8PP1ZMSJ8AHTDKYFK37Y8":3,"skill-same:01M7A8PP1ZMSJ8AHTDKYFK37Y8":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":14,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M7A8PP1ZMSJ8AHTDKYFK37Y8","implementing-ticketing-system-for-incidents",null,"Implements an integrated incident ticketing system connecting SIEM alerts to ServiceNow, Jira, or TheHive for structured incident tracking, SLA management, escalation workflows, and compliance documentation. Use when SOC teams need formalized incident lifecycle management with automated ticket creation, assignment routing, and resolution tracking.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-ticketing-system-for-incidents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-ticketing-system-for-incidents\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: implementing-ticketing-system-for-incidents\ndescription: 'Implements an integrated incident ticketing system connecting SIEM alerts\n  to ServiceNow, Jira, or TheHive for structured incident tracking, SLA management,\n  escalation workflows, and compliance documentation. Use when SOC teams need formalized\n  incident lifecycle management with automated ticket creation, assignment routing,\n  and resolution tracking.\n\n  '\ndomain: cybersecurity\nsubdomain: soc-operations\ntags:\n- soc\n- ticketing\n- servicenow\n- jira\n- thehive\n- incident-management\n- sla\n- workflow\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.CM-01\n- DE.AE-02\n- RS.MA-01\n- DE.AE-06\nmitre_attack:\n- T1078\n- T1685.002\n- T1685.005\n- T1566\n---\n# Implementing Ticketing System for Incidents\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to formalize incident tracking beyond SIEM notable event management\n- Compliance requirements mandate documented incident lifecycle with timestamps and audit trails\n- Multi-team coordination requires ticket-based workflows with assignment and escalation\n- SLA tracking needs automated measurement of response and resolution times\n- Post-incident reviews require structured data for trend analysis and reporting\n\n**Do not use** for individual alert triage — ticketing is for confirmed incidents requiring multi-step investigation and remediation, not every SIEM alert.\n\n## Prerequisites\n\n- Ticketing platform: ServiceNow ITSM, Jira Service Management, or TheHive\n- SIEM integration capability (REST API, webhook, or SOAR connector)\n- Incident classification taxonomy (categories, severity levels, escalation paths)\n- On-call rotation schedule for analyst assignment\n- SLA definitions aligned to incident severity\n\n## Workflow\n\n### Step 1: Define Incident Classification Taxonomy\n\nEstablish standardized incident categories and severity:\n\n```yaml\nincident_taxonomy:\n  categories:\n    - malware_infection\n    - phishing_campaign\n    - unauthorized_access\n    - data_exfiltration\n    - denial_of_service\n    - ransomware\n    - insider_threat\n    - vulnerability_exploitation\n    - account_compromise\n    - policy_violation\n\n  severity_levels:\n    critical:\n      definition: \"Active data breach, ransomware, or business-critical system compromise\"\n      response_sla: 15 minutes\n      resolution_sla: 4 hours\n      escalation: immediate to Tier 3 + CISO notification\n      examples: [\"Active ransomware\", \"Domain admin compromise\", \"Customer data breach\"]\n\n    high:\n      definition: \"Confirmed compromise of business systems or multiple user accounts\"\n      response_sla: 30 minutes\n      resolution_sla: 8 hours\n      escalation: Tier 2 immediate, Tier 3 if unresolved in 2 hours\n      examples: [\"Malware with C2\", \"Lateral movement detected\", \"Phishing with credential theft\"]\n\n    medium:\n      definition: \"Confirmed security event requiring investigation and remediation\"\n      response_sla: 2 hours\n      resolution_sla: 24 hours\n      escalation: Tier 2 within 4 hours\n      examples: [\"Single phishing click\", \"Unauthorized software\", \"Policy violation\"]\n\n    low:\n      definition: \"Minor security event with limited impact\"\n      response_sla: 8 hours\n      resolution_sla: 72 hours\n      escalation: Tier 1 standard queue\n      examples: [\"Scan attempt\", \"Failed brute force (no compromise)\", \"Info disclosure\"]\n```\n\n### Step 2: Automate Ticket Creation from SIEM\n\n**ServiceNow Integration via REST API:**\n\n```python\nimport requests\nimport json\nfrom datetime import datetime\n\nclass IncidentTicketManager:\n    def __init__(self, snow_url, snow_user, snow_password):\n        self.snow_url = snow_url\n        self.auth = (snow_user, snow_password)\n        self.headers = {\n            \"Content-Type\": \"application\u002Fjson\",\n            \"Accept\": \"application\u002Fjson\"\n        }\n\n    def create_incident(self, alert_data):\n        \"\"\"Create ServiceNow incident from SIEM alert\"\"\"\n        severity_map = {\n            \"critical\": \"1\",\n            \"high\": \"2\",\n            \"medium\": \"3\",\n            \"low\": \"4\"\n        }\n\n        payload = {\n            \"short_description\": f\"[SEC] {alert_data['rule_name']} — {alert_data['src']}\",\n            \"description\": self._build_description(alert_data),\n            \"category\": \"Security\",\n            \"subcategory\": alert_data.get(\"category\", \"Investigation\"),\n            \"urgency\": severity_map.get(alert_data[\"severity\"], \"3\"),\n            \"impact\": severity_map.get(alert_data[\"severity\"], \"3\"),\n            \"assignment_group\": self._get_assignment_group(alert_data[\"severity\"]),\n            \"caller_id\": \"soc_automation\",\n            \"u_siem_event_id\": alert_data.get(\"notable_id\", \"\"),\n            \"u_mitre_technique\": alert_data.get(\"mitre_technique\", \"\"),\n            \"u_affected_hosts\": \", \".join(alert_data.get(\"affected_hosts\", [])),\n            \"u_iocs\": json.dumps(alert_data.get(\"iocs\", {}))\n        }\n\n        response = requests.post(\n            f\"{self.snow_url}\u002Fapi\u002Fnow\u002Ftable\u002Fincident\",\n            auth=self.auth,\n            headers=self.headers,\n            json=payload\n        )\n        result = response.json()[\"result\"]\n        return {\n            \"ticket_number\": result[\"number\"],\n            \"sys_id\": result[\"sys_id\"],\n            \"state\": result[\"state\"]\n        }\n\n    def _build_description(self, alert_data):\n        return f\"\"\"\nSECURITY INCIDENT — Auto-generated from SIEM\n================================================\nAlert Rule:       {alert_data['rule_name']}\nSIEM Event ID:    {alert_data.get('notable_id', 'N\u002FA')}\nDetection Time:   {alert_data['detection_time']}\nSeverity:         {alert_data['severity'].upper()}\nMITRE ATT&CK:    {alert_data.get('mitre_technique', 'N\u002FA')}\n\nSource:           {alert_data.get('src', 'N\u002FA')}\nDestination:      {alert_data.get('dest', 'N\u002FA')}\nUser:             {alert_data.get('user', 'N\u002FA')}\n\nInitial Context:\n{alert_data.get('description', 'See SIEM for details.')}\n\nIOCs:\n{json.dumps(alert_data.get('iocs', {}), indent=2)}\n\"\"\"\n\n    def _get_assignment_group(self, severity):\n        if severity in (\"critical\", \"high\"):\n            return \"SOC Tier 2\"\n        return \"SOC Tier 1\"\n\n    def update_incident(self, ticket_number, updates):\n        \"\"\"Update an existing incident\"\"\"\n        # First get sys_id from ticket number\n        response = requests.get(\n            f\"{self.snow_url}\u002Fapi\u002Fnow\u002Ftable\u002Fincident\",\n            auth=self.auth,\n            headers=self.headers,\n            params={\"sysparm_query\": f\"number={ticket_number}\", \"sysparm_limit\": 1}\n        )\n        sys_id = response.json()[\"result\"][0][\"sys_id\"]\n\n        # Update\n        response = requests.patch(\n            f\"{self.snow_url}\u002Fapi\u002Fnow\u002Ftable\u002Fincident\u002F{sys_id}\",\n            auth=self.auth,\n            headers=self.headers,\n            json=updates\n        )\n        return response.json()[\"result\"]\n\n    def add_work_note(self, ticket_number, note):\n        \"\"\"Add investigation note to incident\"\"\"\n        self.update_incident(ticket_number, {\"work_notes\": note})\n\n    def escalate_incident(self, ticket_number, reason):\n        \"\"\"Escalate to next tier\"\"\"\n        self.update_incident(ticket_number, {\n            \"assignment_group\": \"SOC Tier 3\",\n            \"urgency\": \"1\",\n            \"work_notes\": f\"ESCALATED: {reason}\"\n        })\n\n    def resolve_incident(self, ticket_number, resolution):\n        \"\"\"Resolve and close incident\"\"\"\n        self.update_incident(ticket_number, {\n            \"state\": \"6\",  # Resolved\n            \"close_code\": \"Resolved\",\n            \"close_notes\": resolution,\n            \"u_incident_disposition\": resolution.split(\":\")[0] if \":\" in resolution else \"Resolved\"\n        })\n```\n\n### Step 3: Configure TheHive for Security-Focused Ticketing\n\n**TheHive Case Creation (alternative to ServiceNow):**\n\n```python\nimport requests\n\nclass TheHiveCaseManager:\n    def __init__(self, thehive_url, api_key):\n        self.url = thehive_url\n        self.headers = {\n            \"Authorization\": f\"Bearer {api_key}\",\n            \"Content-Type\": \"application\u002Fjson\"\n        }\n\n    def create_case(self, alert_data):\n        \"\"\"Create case in TheHive from SIEM alert\"\"\"\n        case = {\n            \"title\": f\"[{alert_data['severity'].upper()}] {alert_data['rule_name']}\",\n            \"description\": self._build_markdown_description(alert_data),\n            \"severity\": {\"critical\": 4, \"high\": 3, \"medium\": 2, \"low\": 1}.get(\n                alert_data[\"severity\"], 2\n            ),\n            \"tlp\": 2,  # TLP:AMBER\n            \"pap\": 2,  # PAP:AMBER\n            \"tags\": [\n                alert_data.get(\"mitre_technique\", \"\"),\n                alert_data.get(\"category\", \"\"),\n                f\"source:{alert_data.get('src', 'unknown')}\"\n            ],\n            \"tasks\": self._generate_tasks(alert_data[\"severity\"]),\n            \"customFields\": {\n                \"siem-event-id\": {\"string\": alert_data.get(\"notable_id\", \"\")},\n                \"mitre-technique\": {\"string\": alert_data.get(\"mitre_technique\", \"\")},\n                \"detection-source\": {\"string\": \"Splunk ES\"}\n            }\n        }\n\n        response = requests.post(\n            f\"{self.url}\u002Fapi\u002Fcase\",\n            headers=self.headers,\n            json=case\n        )\n        return response.json()\n\n    def _generate_tasks(self, severity):\n        \"\"\"Generate investigation tasks based on severity\"\"\"\n        tasks = [\n            {\"title\": \"Initial Triage\", \"group\": \"Phase 1\", \"description\": \"Review SIEM alert and validate findings\"},\n            {\"title\": \"IOC Enrichment\", \"group\": \"Phase 1\", \"description\": \"Enrich all IOCs with VT, AbuseIPDB\"},\n            {\"title\": \"Scope Assessment\", \"group\": \"Phase 2\", \"description\": \"Determine affected systems and users\"},\n        ]\n        if severity in (\"critical\", \"high\"):\n            tasks.extend([\n                {\"title\": \"Containment Actions\", \"group\": \"Phase 2\", \"description\": \"Isolate affected systems\"},\n                {\"title\": \"Evidence Collection\", \"group\": \"Phase 3\", \"description\": \"Preserve forensic artifacts\"},\n                {\"title\": \"Eradication\", \"group\": \"Phase 3\", \"description\": \"Remove threat from environment\"},\n                {\"title\": \"Recovery\", \"group\": \"Phase 4\", \"description\": \"Restore systems to normal operations\"},\n                {\"title\": \"Post-Incident Review\", \"group\": \"Phase 4\", \"description\": \"Document lessons learned\"},\n            ])\n        else:\n            tasks.append(\n                {\"title\": \"Resolution and Documentation\", \"group\": \"Phase 2\", \"description\": \"Document findings and close\"}\n            )\n        return tasks\n\n    def add_observable(self, case_id, ioc_type, ioc_value, description=\"\"):\n        \"\"\"Add IOC observable to case\"\"\"\n        observable = {\n            \"dataType\": ioc_type,\n            \"data\": ioc_value,\n            \"message\": description,\n            \"tlp\": 2,\n            \"ioc\": True,\n            \"tags\": [\"auto-extracted\"]\n        }\n        response = requests.post(\n            f\"{self.url}\u002Fapi\u002Fcase\u002F{case_id}\u002Fartifact\",\n            headers=self.headers,\n            json=observable\n        )\n        return response.json()\n```\n\n### Step 4: Implement SLA Tracking and Escalation\n\n**Splunk SLA Monitoring Dashboard:**\n```spl\n--- Active incidents approaching SLA breach\nindex=servicenow sourcetype=\"snow:incident\" category=\"Security\" state IN (\"New\", \"In Progress\")\n| eval sla_minutes = case(\n    urgency=\"1\", 15,\n    urgency=\"2\", 30,\n    urgency=\"3\", 120,\n    urgency=\"4\", 480\n  )\n| eval age_minutes = round((now() - strptime(opened_at, \"%Y-%m-%d %H:%M:%S\")) \u002F 60, 0)\n| eval sla_remaining = sla_minutes - age_minutes\n| eval sla_status = case(\n    sla_remaining \u003C 0, \"BREACHED\",\n    sla_remaining \u003C sla_minutes * 0.25, \"AT RISK\",\n    1=1, \"ON TRACK\"\n  )\n| where sla_status IN (\"BREACHED\", \"AT RISK\")\n| sort sla_remaining\n| table number, short_description, urgency, assignment_group, assigned_to,\n        age_minutes, sla_minutes, sla_remaining, sla_status\n```\n\n**Auto-Escalation Logic:**\n```python\ndef check_sla_breaches(ticket_manager):\n    \"\"\"Check for SLA breaches and auto-escalate\"\"\"\n    open_incidents = ticket_manager.get_open_incidents()\n\n    for incident in open_incidents:\n        age_minutes = (datetime.utcnow() - incident[\"opened_at\"]).total_seconds() \u002F 60\n        sla_minutes = {\"1\": 15, \"2\": 30, \"3\": 120, \"4\": 480}[incident[\"urgency\"]]\n\n        if age_minutes > sla_minutes and incident[\"state\"] == \"New\":\n            ticket_manager.escalate_incident(\n                incident[\"number\"],\n                f\"SLA BREACH: {int(age_minutes)}min elapsed, {sla_minutes}min SLA. Auto-escalating.\"\n            )\n```\n\n### Step 5: Build Reporting and Metrics\n\n```spl\n--- Monthly incident metrics\nindex=servicenow sourcetype=\"snow:incident\" category=\"Security\"\nopened_at > \"2024-03-01\" opened_at \u003C \"2024-04-01\"\n| stats count AS total,\n        avg(eval((resolved_at - opened_at) \u002F 3600)) AS avg_resolution_hours,\n        sum(eval(if(urgency=\"1\", 1, 0))) AS critical,\n        sum(eval(if(urgency=\"2\", 1, 0))) AS high,\n        sum(eval(if(urgency=\"3\", 1, 0))) AS medium,\n        sum(eval(if(urgency=\"4\", 1, 0))) AS low\n| eval avg_resolution = round(avg_resolution_hours, 1)\n\n--- SLA compliance rate\nindex=servicenow sourcetype=\"snow:incident\" category=\"Security\" state=\"Resolved\"\n| eval sla_target = case(urgency=\"1\", 4, urgency=\"2\", 8, urgency=\"3\", 24, urgency=\"4\", 72)\n| eval resolution_hours = (resolved_at - opened_at) \u002F 3600\n| eval sla_met = if(resolution_hours \u003C= sla_target, 1, 0)\n| stats sum(sla_met) AS met, count AS total\n| eval compliance_pct = round(met \u002F total * 100, 1)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **Incident Ticket** | Formal tracking record for a confirmed security incident with lifecycle management |\n| **SLA** | Service Level Agreement defining maximum response and resolution times by severity |\n| **Escalation Path** | Defined routing from Tier 1 to Tier 2\u002F3 based on severity, time elapsed, or analyst request |\n| **Disposition** | Final classification of a closed incident (true positive, false positive, duplicate, policy violation) |\n| **MTTR** | Mean Time to Resolve — average time from ticket creation to resolution across all incidents |\n| **Case Management** | Structured approach to managing complex incidents with tasks, observables, and audit trails |\n\n## Tools & Systems\n\n- **ServiceNow ITSM**: Enterprise IT service management platform with security incident module and SLA tracking\n- **Jira Service Management**: Atlassian's service management platform with customizable incident workflows\n- **TheHive**: Open-source security incident response platform with case management and Cortex integration\n- **PagerDuty**: On-call management and incident notification platform for SOC analyst alerting\n- **Splunk ITSI**: IT Service Intelligence module for SLA tracking and service health dashboards\n\n## Common Scenarios\n\n- **SIEM-to-Ticket Automation**: Auto-create ServiceNow ticket for every critical\u002Fhigh notable event in Splunk ES\n- **Multi-Team Coordination**: Route malware incidents to SOC for triage, IT for remediation, Legal for notification\n- **Compliance Documentation**: Generate incident reports from ticket data for PCI DSS, HIPAA audit evidence\n- **On-Call Alerting**: Page on-call analyst via PagerDuty when critical ticket created after hours\n- **Post-Incident Review**: Query closed tickets to identify recurring incident types and systemic gaps\n\n## Output Format\n\n```\nINCIDENT TICKET — INC0012567\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\nTitle:        [SEC] Cobalt Strike C2 Beacon Detected — WORKSTATION-042\nCategory:     Security > Malware Infection\nSeverity:     Critical (P1)\nSLA:          Response: 15 min | Resolution: 4 hours\n\nTimeline:\n  14:23  Ticket created (auto from Splunk ES NE-2024-08921)\n  14:25  Assigned to analyst_jdoe (Tier 2)\n  14:28  Work note: \"VT confirms Cobalt Strike beacon, hash a1b2c3...\"\n  14:35  Work note: \"Host isolated via CrowdStrike, C2 domain blocked\"\n  15:00  Work note: \"Enterprise IOC scan — 2 additional hosts found\"\n  15:30  Escalated to Tier 3 for forensic analysis\n  16:00  Work note: \"All affected hosts contained and cleaned\"\n  18:00  Resolved: \"Malware eradicated, systems restored, monitoring for 72h\"\n\nMetrics:\n  Time to Acknowledge: 2 minutes\n  Time to Contain:     12 minutes\n  Time to Resolve:     3 hours 37 minutes\n  SLA Status:          MET (within 4-hour resolution target)\n```\n","# Implementing Ticketing System for Incidents\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to formalize incident tracking beyond SIEM notable event management\n- Compliance requirements mandate documented incident lifecycle with timestamps and audit trails\n- Multi-team coordination requires ticket-based workflows with assignment and escalation\n- SLA tracking needs automated measurement of response and resolution times\n- Post-incident reviews require structured data for trend analysis and reporting\n\n**Do not use** for individual alert triage — ticketing is for confirmed incidents requiring multi-step investigation and remediation, not every SIEM alert.\n\n## Prerequisites\n\n- Ticketing platform: ServiceNow ITSM, Jira Service Management, or TheHive\n- SIEM integration capability (REST API, webhook, or SOAR connector)\n- Incident classification taxonomy (categories, severity levels, escalation paths)\n- On-call rotation schedule for analyst assignment\n- SLA definitions aligned to incident severity\n\n## Workflow\n\n### Step 1: Define Incident Classification Taxonomy\n\nEstablish standardized incident categories and severity:\n\n```yaml\nincident_taxonomy:\n  categories:\n    - malware_infection\n    - phishing_campaign\n    - unauthorized_access\n    - data_exfiltration\n    - denial_of_service\n    - ransomware\n    - insider_threat\n    - vulnerability_exploitation\n    - account_compromise\n    - policy_violation\n\n  severity_levels:\n    critical:\n      definition: \"Active data breach, ransomware, or business-critical system compromise\"\n      response_sla: 15 minutes\n      resolution_sla: 4 hours\n      escalation: immediate to Tier 3 + CISO notification\n      examples: [\"Active ransomware\", \"Domain admin compromise\", \"Customer data breach\"]\n\n    high:\n      definition: \"Confirmed compromise of business systems or multiple user accounts\"\n      response_sla: 30 minutes\n      resolution_sla: 8 hours\n      escalation: Tier 2 immediate, Tier 3 if unresolved in 2 hours\n      examples: [\"Malware with C2\", \"Lateral movement detected\", \"Phishing with credential theft\"]\n\n    medium:\n      definition: \"Confirmed security event requiring investigation and remediation\"\n      response_sla: 2 hours\n      resolution_sla: 24 hours\n      escalation: Tier 2 within 4 hours\n      examples: [\"Single phishing click\", \"Unauthorized software\", \"Policy violation\"]\n\n    low:\n      definition: \"Minor security event with limited impact\"\n      response_sla: 8 hours\n      resolution_sla: 72 hours\n      escalation: Tier 1 standard queue\n      examples: [\"Scan attempt\", \"Failed brute force (no compromise)\", \"Info disclosure\"]\n```\n\n### Step 2: Automate Ticket Creation from SIEM\n\n**ServiceNow Integration via REST API:**\n\n```python\nimport requests\nimport json\nfrom datetime import datetime\n\nclass IncidentTicketManager:\n    def __init__(self, snow_url, snow_user, snow_password):\n        self.snow_url = snow_url\n        self.auth = (snow_user, snow_password)\n        self.headers = {\n            \"Content-Type\": \"application\u002Fjson\",\n            \"Accept\": \"application\u002Fjson\"\n        }\n\n    def create_incident(self, alert_data):\n        \"\"\"Create ServiceNow incident from SIEM alert\"\"\"\n        severity_map = {\n            \"critical\": \"1\",\n            \"high\": \"2\",\n            \"medium\": \"3\",\n            \"low\": \"4\"\n        }\n\n        payload = {\n            \"short_description\": f\"[SEC] {alert_data['rule_name']} — {alert_data['src']}\",\n            \"description\": self._build_description(alert_data),\n            \"category\": \"Security\",\n            \"subcategory\": alert_data.get(\"category\", \"Investigation\"),\n            \"urgency\": severity_map.get(alert_data[\"severity\"], \"3\"),\n            \"impact\": severity_map.get(alert_data[\"severity\"], \"3\"),\n            \"assignment_group\": self._get_assignment_group(alert_data[\"severity\"]),\n            \"caller_id\": \"soc_automation\",\n            \"u_siem_event_id\": alert_data.get(\"notable_id\", \"\"),\n            \"u_mitre_technique\": alert_data.get(\"mitre_technique\", \"\"),\n            \"u_affected_hosts\": \", \".join(alert_data.get(\"affected_hosts\", [])),\n            \"u_iocs\": json.dumps(alert_data.get(\"iocs\", {}))\n        }\n\n        response = requests.post(\n            f\"{self.snow_url}\u002Fapi\u002Fnow\u002Ftable\u002Fincident\",\n            auth=self.auth,\n            headers=self.headers,\n            json=payload\n        )\n        result = response.json()[\"result\"]\n        return {\n            \"ticket_number\": result[\"number\"],\n            \"sys_id\": result[\"sys_id\"],\n            \"state\": result[\"state\"]\n        }\n\n    def _build_description(self, alert_data):\n        return f\"\"\"\nSECURITY INCIDENT — Auto-generated from SIEM\n================================================\nAlert Rule:       {alert_data['rule_name']}\nSIEM Event ID:    {alert_data.get('notable_id', 'N\u002FA')}\nDetection Time:   {alert_data['detection_time']}\nSeverity:         {alert_data['severity'].upper()}\nMITRE ATT&CK:    {alert_data.get('mitre_technique', 'N\u002FA')}\n\nSource:           {alert_data.get('src', 'N\u002FA')}\nDestination:      {alert_data.get('dest', 'N\u002FA')}\nUser:             {alert_data.get('user', 'N\u002FA')}\n\nInitial Context:\n{alert_data.get('description', 'See SIEM for details.')}\n\nIOCs:\n{json.dumps(alert_data.get('iocs', {}), indent=2)}\n\"\"\"\n\n    def _get_assignment_group(self, severity):\n        if severity in (\"critical\", \"high\"):\n            return \"SOC Tier 2\"\n        return \"SOC Tier 1\"\n\n    def update_incident(self, ticket_number, updates):\n        \"\"\"Update an existing incident\"\"\"\n        # First get sys_id from ticket number\n        response = requests.get(\n            f\"{self.snow_url}\u002Fapi\u002Fnow\u002Ftable\u002Fincident\",\n            auth=self.auth,\n            headers=self.headers,\n            params={\"sysparm_query\": f\"number={ticket_number}\", \"sysparm_limit\": 1}\n        )\n        sys_id = response.json()[\"result\"][0][\"sys_id\"]\n\n        # Update\n        response = requests.patch(\n            f\"{self.snow_url}\u002Fapi\u002Fnow\u002Ftable\u002Fincident\u002F{sys_id}\",\n            auth=self.auth,\n            headers=self.headers,\n            json=updates\n        )\n        return response.json()[\"result\"]\n\n    def add_work_note(self, ticket_number, note):\n        \"\"\"Add investigation note to incident\"\"\"\n        self.update_incident(ticket_number, {\"work_notes\": note})\n\n    def escalate_incident(self, ticket_number, reason):\n        \"\"\"Escalate to next tier\"\"\"\n        self.update_incident(ticket_number, {\n            \"assignment_group\": \"SOC Tier 3\",\n            \"urgency\": \"1\",\n            \"work_notes\": f\"ESCALATED: {reason}\"\n        })\n\n    def resolve_incident(self, ticket_number, resolution):\n        \"\"\"Resolve and close incident\"\"\"\n        self.update_incident(ticket_number, {\n            \"state\": \"6\",  # Resolved\n            \"close_code\": \"Resolved\",\n            \"close_notes\": resolution,\n            \"u_incident_disposition\": resolution.split(\":\")[0] if \":\" in resolution else \"Resolved\"\n        })\n```\n\n### Step 3: Configure TheHive for Security-Focused Ticketing\n\n**TheHive Case Creation (alternative to ServiceNow):**\n\n```python\nimport requests\n\nclass TheHiveCaseManager:\n    def __init__(self, thehive_url, api_key):\n        self.url = thehive_url\n        self.headers = {\n            \"Authorization\": f\"Bearer {api_key}\",\n            \"Content-Type\": \"application\u002Fjson\"\n        }\n\n    def create_case(self, alert_data):\n        \"\"\"Create case in TheHive from SIEM alert\"\"\"\n        case = {\n            \"title\": f\"[{alert_data['severity'].upper()}] {alert_data['rule_name']}\",\n            \"description\": self._build_markdown_description(alert_data),\n            \"severity\": {\"critical\": 4, \"high\": 3, \"medium\": 2, \"low\": 1}.get(\n                alert_data[\"severity\"], 2\n            ),\n            \"tlp\": 2,  # TLP:AMBER\n            \"pap\": 2,  # PAP:AMBER\n            \"tags\": [\n                alert_data.get(\"mitre_technique\", \"\"),\n                alert_data.get(\"category\", \"\"),\n                f\"source:{alert_data.get('src', 'unknown')}\"\n            ],\n            \"tasks\": self._generate_tasks(alert_data[\"severity\"]),\n            \"customFields\": {\n                \"siem-event-id\": {\"string\": alert_data.get(\"notable_id\", \"\")},\n                \"mitre-technique\": {\"string\": alert_data.get(\"mitre_technique\", \"\")},\n                \"detection-source\": {\"string\": \"Splunk ES\"}\n            }\n        }\n\n        response = requests.post(\n            f\"{self.url}\u002Fapi\u002Fcase\",\n            headers=self.headers,\n            json=case\n        )\n        return response.json()\n\n    def _generate_tasks(self, severity):\n        \"\"\"Generate investigation tasks based on severity\"\"\"\n        tasks = [\n            {\"title\": \"Initial Triage\", \"group\": \"Phase 1\", \"description\": \"Review SIEM alert and validate findings\"},\n            {\"title\": \"IOC Enrichment\", \"group\": \"Phase 1\", \"description\": \"Enrich all IOCs with VT, AbuseIPDB\"},\n            {\"title\": \"Scope Assessment\", \"group\": \"Phase 2\", \"description\": \"Determine affected systems and users\"},\n        ]\n        if severity in (\"critical\", \"high\"):\n            tasks.extend([\n                {\"title\": \"Containment Actions\", \"group\": \"Phase 2\", \"description\": \"Isolate affected systems\"},\n                {\"title\": \"Evidence Collection\", \"group\": \"Phase 3\", \"description\": \"Preserve forensic artifacts\"},\n                {\"title\": \"Eradication\", \"group\": \"Phase 3\", \"description\": \"Remove threat from environment\"},\n                {\"title\": \"Recovery\", \"group\": \"Phase 4\", \"description\": \"Restore systems to normal operations\"},\n                {\"title\": \"Post-Incident Review\", \"group\": \"Phase 4\", \"description\": \"Document lessons learned\"},\n            ])\n        else:\n            tasks.append(\n                {\"title\": \"Resolution and Documentation\", \"group\": \"Phase 2\", \"description\": \"Document findings and close\"}\n            )\n        return tasks\n\n    def add_observable(self, case_id, ioc_type, ioc_value, description=\"\"):\n        \"\"\"Add IOC observable to case\"\"\"\n        observable = {\n            \"dataType\": ioc_type,\n            \"data\": ioc_value,\n            \"message\": description,\n            \"tlp\": 2,\n            \"ioc\": True,\n            \"tags\": [\"auto-extracted\"]\n        }\n        response = requests.post(\n            f\"{self.url}\u002Fapi\u002Fcase\u002F{case_id}\u002Fartifact\",\n            headers=self.headers,\n            json=observable\n        )\n        return response.json()\n```\n\n### Step 4: Implement SLA Tracking and Escalation\n\n**Splunk SLA Monitoring Dashboard:**\n```spl\n--- Active incidents approaching SLA breach\nindex=servicenow sourcetype=\"snow:incident\" category=\"Security\" state IN (\"New\", \"In Progress\")\n| eval sla_minutes = case(\n    urgency=\"1\", 15,\n    urgency=\"2\", 30,\n    urgency=\"3\", 120,\n    urgency=\"4\", 480\n  )\n| eval age_minutes = round((now() - strptime(opened_at, \"%Y-%m-%d %H:%M:%S\")) \u002F 60, 0)\n| eval sla_remaining = sla_minutes - age_minutes\n| eval sla_status = case(\n    sla_remaining \u003C 0, \"BREACHED\",\n    sla_remaining \u003C sla_minutes * 0.25, \"AT RISK\",\n    1=1, \"ON TRACK\"\n  )\n| where sla_status IN (\"BREACHED\", \"AT RISK\")\n| sort sla_remaining\n| table number, short_description, urgency, assignment_group, assigned_to,\n        age_minutes, sla_minutes, sla_remaining, sla_status\n```\n\n**Auto-Escalation Logic:**\n```python\ndef check_sla_breaches(ticket_manager):\n    \"\"\"Check for SLA breaches and auto-escalate\"\"\"\n    open_incidents = ticket_manager.get_open_incidents()\n\n    for incident in open_incidents:\n        age_minutes = (datetime.utcnow() - incident[\"opened_at\"]).total_seconds() \u002F 60\n        sla_minutes = {\"1\": 15, \"2\": 30, \"3\": 120, \"4\": 480}[incident[\"urgency\"]]\n\n        if age_minutes > sla_minutes and incident[\"state\"] == \"New\":\n            ticket_manager.escalate_incident(\n                incident[\"number\"],\n                f\"SLA BREACH: {int(age_minutes)}min elapsed, {sla_minutes}min SLA. Auto-escalating.\"\n            )\n```\n\n### Step 5: Build Reporting and Metrics\n\n```spl\n--- Monthly incident metrics\nindex=servicenow sourcetype=\"snow:incident\" category=\"Security\"\nopened_at > \"2024-03-01\" opened_at \u003C \"2024-04-01\"\n| stats count AS total,\n        avg(eval((resolved_at - opened_at) \u002F 3600)) AS avg_resolution_hours,\n        sum(eval(if(urgency=\"1\", 1, 0))) AS critical,\n        sum(eval(if(urgency=\"2\", 1, 0))) AS high,\n        sum(eval(if(urgency=\"3\", 1, 0))) AS medium,\n        sum(eval(if(urgency=\"4\", 1, 0))) AS low\n| eval avg_resolution = round(avg_resolution_hours, 1)\n\n--- SLA compliance rate\nindex=servicenow sourcetype=\"snow:incident\" category=\"Security\" state=\"Resolved\"\n| eval sla_target = case(urgency=\"1\", 4, urgency=\"2\", 8, urgency=\"3\", 24, urgency=\"4\", 72)\n| eval resolution_hours = (resolved_at - opened_at) \u002F 3600\n| eval sla_met = if(resolution_hours \u003C= sla_target, 1, 0)\n| stats sum(sla_met) AS met, count AS total\n| eval compliance_pct = round(met \u002F total * 100, 1)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **Incident Ticket** | Formal tracking record for a confirmed security incident with lifecycle management |\n| **SLA** | Service Level Agreement defining maximum response and resolution times by severity |\n| **Escalation Path** | Defined routing from Tier 1 to Tier 2\u002F3 based on severity, time elapsed, or analyst request |\n| **Disposition** | Final classification of a closed incident (true positive, false positive, duplicate, policy violation) |\n| **MTTR** | Mean Time to Resolve — average time from ticket creation to resolution across all incidents |\n| **Case Management** | Structured approach to managing complex incidents with tasks, observables, and audit trails |\n\n## Tools & Systems\n\n- **ServiceNow ITSM**: Enterprise IT service management platform with security incident module and SLA tracking\n- **Jira Service Management**: Atlassian's service management platform with customizable incident workflows\n- **TheHive**: Open-source security incident response platform with case management and Cortex integration\n- **PagerDuty**: On-call management and incident notification platform for SOC analyst alerting\n- **Splunk ITSI**: IT Service Intelligence module for SLA tracking and service health dashboards\n\n## Common Scenarios\n\n- **SIEM-to-Ticket Automation**: Auto-create ServiceNow ticket for every critical\u002Fhigh notable event in Splunk ES\n- **Multi-Team Coordination**: Route malware incidents to SOC for triage, IT for remediation, Legal for notification\n- **Compliance Documentation**: Generate incident reports from ticket data for PCI DSS, HIPAA audit evidence\n- **On-Call Alerting**: Page on-call analyst via PagerDuty when critical ticket created after hours\n- **Post-Incident Review**: Query closed tickets to identify recurring incident types and systemic gaps\n\n## Output Format\n\n```\nINCIDENT TICKET — INC0012567\n━━━━━━━━━━━━━━━━━━━━━━━━━━━\nTitle:        [SEC] Cobalt Strike C2 Beacon Detected — WORKSTATION-042\nCategory:     Security > Malware Infection\nSeverity:     Critical (P1)\nSLA:          Response: 15 min | Resolution: 4 hours\n\nTimeline:\n  14:23  Ticket created (auto from Splunk ES NE-2024-08921)\n  14:25  Assigned to analyst_jdoe (Tier 2)\n  14:28  Work note: \"VT confirms Cobalt Strike beacon, hash a1b2c3...\"\n  14:35  Work note: \"Host isolated via CrowdStrike, C2 domain blocked\"\n  15:00  Work note: \"Enterprise IOC scan — 2 additional hosts found\"\n  15:30  Escalated to Tier 3 for forensic analysis\n  16:00  Work note: \"All affected hosts contained and cleaned\"\n  18:00  Resolved: \"Malware eradicated, systems restored, monitoring for 72h\"\n\nMetrics:\n  Time to Acknowledge: 2 minutes\n  Time to Contain:     12 minutes\n  Time to Resolve:     3 hours 37 minutes\n  SLA Status:          MET (within 4-hour resolution target)\n```\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"nist_csf":37,"subdomain":42,"description":43,"mitre_attack":44},[26,27,28,29,30,31,32,33],"soc","ticketing","servicenow","jira","thehive","incident-management","sla","workflow","mahipal","cybersecurity","1.0",[38,39,40,41],"DE.CM-01","DE.AE-02","RS.MA-01","DE.AE-06","soc-operations","Implements an integrated incident ticketing system connecting SIEM alerts to ServiceNow, Jira, or TheHive for structured incident tracking, SLA management, escalation workflows, and compliance documentation. Use when SOC teams need formalized incident lifecycle management with automated ticket creation, assignment routing, and resolution tracking.\n",[45,46,47,48],"T1078","T1685.002","T1685.005","T1566","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fimplementing-ticketing-system-for-incidents","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add NeelakshSaxena\u002FVayu --skill implementing-ticketing-system-for-incidents",{"tool":62,"command":63},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill implementing-ticketing-system-for-incidents",{"tool":65,"command":66},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill implementing-ticketing-system-for-incidents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-ticketing-system-for-incidents\u002FSKILL.md",true,[70,74,80],{"path":71,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fapi-reference.md","REFERENCE","参考文档",2413,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-ticketing-system-for-incidents\u002Freferences\u002Fapi-reference.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fagent.py","SCRIPT","脚本",10045,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-ticketing-system-for-incidents\u002Fscripts\u002Fagent.py",[87,94,101,108,115,122],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]