[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A8MWF8W9BR68RRTB0MBK7D":3,"skill-same:01M7A8MWF8W9BR68RRTB0MBK7D":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},"01M7A8MWF8W9BR68RRTB0MBK7D","implementing-soar-automation-with-phantom",null,"Implements Security Orchestration, Automation, and Response (SOAR) workflows using Splunk SOAR (formerly Phantom) to automate alert triage, IOC enrichment, containment actions, and incident response playbooks. Use when SOC teams need to reduce manual analyst work, standardize response procedures, or integrate multiple security tools into automated workflows.","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-soar-automation-with-phantom\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-soar-automation-with-phantom\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: implementing-soar-automation-with-phantom\ndescription: 'Implements Security Orchestration, Automation, and Response (SOAR) workflows\n  using Splunk SOAR (formerly Phantom) to automate alert triage, IOC enrichment, containment\n  actions, and incident response playbooks. Use when SOC teams need to reduce manual\n  analyst work, standardize response procedures, or integrate multiple security tools\n  into automated workflows.\n\n  '\ndomain: cybersecurity\nsubdomain: soc-operations\ntags:\n- soc\n- soar\n- phantom\n- splunk-soar\n- automation\n- playbook\n- orchestration\n- incident-response\nmitre_attack:\n- T1078\n- T1685.002\n- T1685.005\n- T1566\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\n---\n# Implementing SOAR Automation with Phantom\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to automate repetitive triage and enrichment tasks for high-volume alerts\n- Manual response times exceed SLA requirements and automation can reduce MTTR\n- Multiple security tools (SIEM, EDR, firewall, TIP) need orchestrated response actions\n- Playbook standardization is required to ensure consistent analyst response across shifts\n\n**Do not use** for fully autonomous containment without human approval gates — always include analyst decision points for high-impact actions like account disabling or host isolation.\n\n## Prerequisites\n\n- Splunk SOAR (Phantom) 6.x+ deployed with web interface access\n- App connectors configured: VirusTotal, CrowdStrike, ServiceNow, Active Directory, Splunk ES\n- Splunk ES integration for ingesting notable events as SOAR events\n- API credentials for each integrated tool stored in SOAR asset configuration\n- Python knowledge for custom playbook actions\n\n## Workflow\n\n### Step 1: Configure Asset Connections\n\nSet up integrations with security tools via SOAR Apps:\n\n**VirusTotal Asset Configuration:**\n```json\n{\n  \"app\": \"VirusTotal v3\",\n  \"asset_name\": \"virustotal_prod\",\n  \"configuration\": {\n    \"api_key\": \"YOUR_VT_API_KEY\",\n    \"rate_limit\": true,\n    \"max_requests_per_minute\": 4\n  },\n  \"product_vendor\": \"VirusTotal\",\n  \"product_name\": \"VirusTotal\"\n}\n```\n\n**CrowdStrike Falcon Asset:**\n```json\n{\n  \"app\": \"CrowdStrike Falcon\",\n  \"asset_name\": \"crowdstrike_prod\",\n  \"configuration\": {\n    \"client_id\": \"CS_CLIENT_ID\",\n    \"client_secret\": \"CS_CLIENT_SECRET\",\n    \"base_url\": \"https:\u002F\u002Fapi.crowdstrike.com\"\n  }\n}\n```\n\n**Active Directory Asset:**\n```json\n{\n  \"app\": \"Active Directory\",\n  \"asset_name\": \"ad_prod\",\n  \"configuration\": {\n    \"server\": \"dc01.company.com\",\n    \"username\": \"soar_service@company.com\",\n    \"password\": \"SERVICE_ACCOUNT_PASSWORD\",\n    \"ssl\": true\n  }\n}\n```\n\n### Step 2: Build Phishing Triage Playbook\n\nCreate an automated phishing response playbook in Python (Phantom playbook format):\n\n```python\n\"\"\"\nPhishing Triage Automation Playbook\nTrigger: New phishing email reported via Splunk ES notable or email ingestion\n\"\"\"\n\nimport phantom.rules as phantom\nimport json\n\ndef on_start(container):\n    # Extract artifacts (URLs, file hashes, sender) from the container\n    artifacts = phantom.get_artifacts(container_id=container[\"id\"])\n\n    for artifact in artifacts:\n        artifact_type = artifact.get(\"cef\", {}).get(\"type\", \"\")\n\n        if artifact_type == \"url\":\n            phantom.act(\"url reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=url_reputation_callback,\n                        name=\"url_reputation\")\n\n        elif artifact_type == \"hash\":\n            phantom.act(\"file reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=hash_reputation_callback,\n                        name=\"file_reputation\")\n\n        elif artifact_type == \"ip\":\n            phantom.act(\"ip reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=ip_reputation_callback,\n                        name=\"ip_reputation\")\n\ndef url_reputation_callback(action, success, container, results, handle):\n    if not success:\n        phantom.comment(container, \"URL reputation check failed\")\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious_count = data.get(\"summary\", {}).get(\"malicious\", 0)\n        total_engines = data.get(\"summary\", {}).get(\"total_engines\", 0)\n\n        if malicious_count > 5:\n            # High confidence malicious — auto-block and escalate\n            phantom.act(\"block url\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_url\")\n\n            phantom.set_severity(container, \"high\")\n            phantom.set_status(container, \"open\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Blocked on firewall. Escalating to Tier 2.\")\n\n            # Create ServiceNow ticket\n            phantom.act(\"create ticket\", targets=container,\n                        assets=[\"servicenow_prod\"],\n                        parameters=[{\n                            \"short_description\": f\"Phishing - Malicious URL detected\",\n                            \"urgency\": \"2\",\n                            \"impact\": \"2\"\n                        }],\n                        name=\"create_incident_ticket\")\n\n        elif malicious_count > 0:\n            # Medium confidence — request analyst review\n            phantom.promote(container, template=\"Phishing Investigation\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Requires analyst review.\")\n\n        else:\n            # Clean — close with comment\n            phantom.set_status(container, \"closed\")\n            phantom.comment(container,\n                f\"URL clean: 0\u002F{total_engines} engines flagged. Auto-closed.\")\n\ndef hash_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        positives = data.get(\"summary\", {}).get(\"positives\", 0)\n\n        if positives > 10:\n            # Known malware — quarantine and block\n            phantom.act(\"quarantine device\", targets=result,\n                        assets=[\"crowdstrike_prod\"],\n                        name=\"isolate_endpoint\")\n            phantom.set_severity(container, \"high\")\n\ndef ip_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious = data.get(\"summary\", {}).get(\"malicious\", 0)\n\n        if malicious > 3:\n            phantom.act(\"block ip\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_ip\")\n```\n\n### Step 3: Build Alert Enrichment Playbook\n\nAutomate enrichment for all incoming SIEM alerts:\n\n```python\n\"\"\"\nUniversal Alert Enrichment Playbook\nRuns on every new event to add context before analyst review\n\"\"\"\n\nimport phantom.rules as phantom\n\ndef on_start(container):\n    # Get all artifacts\n    success, message, artifacts = phantom.get_artifacts(\n        container_id=container[\"id\"], full_data=True\n    )\n\n    ip_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"sourceAddress\")]\n    domain_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"destinationDnsDomain\")]\n\n    # Enrich IPs in parallel\n    for artifact in ip_artifacts:\n        ip = artifact[\"cef\"][\"sourceAddress\"]\n\n        # VirusTotal lookup\n        phantom.act(\"ip reputation\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"virustotal_prod\"],\n                    callback=enrich_ip_callback,\n                    name=f\"vt_ip_{ip}\")\n\n        # GeoIP lookup\n        phantom.act(\"geolocate ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"maxmind_prod\"],\n                    callback=geoip_callback,\n                    name=f\"geo_{ip}\")\n\n        # Whois lookup\n        phantom.act(\"whois ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"whois_prod\"],\n                    name=f\"whois_{ip}\")\n\n    # Enrich domains\n    for artifact in domain_artifacts:\n        domain = artifact[\"cef\"][\"destinationDnsDomain\"]\n        phantom.act(\"domain reputation\",\n                    parameters=[{\"domain\": domain}],\n                    assets=[\"virustotal_prod\"],\n                    name=f\"vt_domain_{domain}\")\n\ndef enrich_ip_callback(action, success, container, results, handle):\n    \"\"\"Update container with enrichment data\"\"\"\n    if success:\n        for result in results:\n            summary = result.get(\"summary\", {})\n            phantom.add_artifact(container, {\n                \"cef\": {\n                    \"vt_malicious\": summary.get(\"malicious\", 0),\n                    \"vt_suspicious\": summary.get(\"suspicious\", 0),\n                    \"enrichment_source\": \"VirusTotal\"\n                },\n                \"label\": \"enrichment\",\n                \"name\": \"VT IP Enrichment\"\n            })\n```\n\n### Step 4: Implement Approval Gates for High-Impact Actions\n\nAdd human-in-the-loop for critical actions:\n\n```python\ndef containment_decision(action, success, container, results, handle):\n    \"\"\"Present analyst with containment options\"\"\"\n    phantom.prompt(\n        container=container,\n        user=\"soc_tier2\",\n        message=(\n            \"Confirmed malicious activity detected.\\n\"\n            f\"Host: {container['artifacts'][0]['cef'].get('sourceAddress')}\\n\"\n            f\"Threat: {results[0]['summary'].get('threat_name')}\\n\\n\"\n            \"Select containment action:\"\n        ),\n        respond_in_mins=15,\n        options=[\"Isolate Host\", \"Disable Account\", \"Both\", \"Monitor Only\"],\n        callback=execute_containment\n    )\n\ndef execute_containment(action, success, container, results, handle):\n    response = results.get(\"response\", \"Monitor Only\")\n\n    if response in [\"Isolate Host\", \"Both\"]:\n        phantom.act(\"quarantine device\",\n                    parameters=[{\"hostname\": container[\"artifacts\"][0][\"cef\"][\"sourceHostName\"]}],\n                    assets=[\"crowdstrike_prod\"],\n                    name=\"isolate_host\")\n\n    if response in [\"Disable Account\", \"Both\"]:\n        phantom.act(\"disable user\",\n                    parameters=[{\"username\": container[\"artifacts\"][0][\"cef\"][\"sourceUserName\"]}],\n                    assets=[\"ad_prod\"],\n                    name=\"disable_account\")\n\n    phantom.comment(container, f\"Analyst approved: {response}\")\n```\n\n### Step 5: Configure Playbook Scheduling and Triggers\n\nSet up event triggers in SOAR:\n\n```json\n{\n  \"playbook_name\": \"phishing_triage_automation\",\n  \"trigger\": {\n    \"type\": \"event_created\",\n    \"conditions\": {\n      \"label\": [\"phishing\", \"notable\"],\n      \"severity\": [\"high\", \"medium\"]\n    }\n  },\n  \"active\": true,\n  \"run_as\": \"automation_user\"\n}\n```\n\n### Step 6: Monitor Playbook Performance\n\nTrack automation effectiveness with SOAR metrics:\n\n```python\n# Query SOAR API for playbook execution stats\nimport requests\n\nheaders = {\"ph-auth-token\": \"YOUR_SOAR_TOKEN\"}\nresponse = requests.get(\n    \"https:\u002F\u002Fsoar.company.com\u002Frest\u002Fplaybook_run\",\n    headers=headers,\n    params={\n        \"page_size\": 100,\n        \"filter\": '{\"status\":\"success\"}',\n        \"sort\": \"create_time\",\n        \"order\": \"desc\"\n    }\n)\nruns = response.json()[\"data\"]\n\n# Calculate automation metrics\ntotal_runs = len(runs)\navg_duration = sum(r[\"end_time\"] - r[\"start_time\"] for r in runs) \u002F total_runs\nauto_closed = sum(1 for r in runs if r.get(\"auto_resolved\"))\nprint(f\"Total runs: {total_runs}\")\nprint(f\"Avg duration: {avg_duration:.1f}s\")\nprint(f\"Auto-resolved: {auto_closed}\u002F{total_runs} ({auto_closed\u002Ftotal_runs*100:.0f}%)\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **SOAR** | Security Orchestration, Automation, and Response — platform integrating security tools with automated playbooks |\n| **Playbook** | Automated workflow defining sequential and parallel actions triggered by security events |\n| **Asset** | SOAR configuration for a connected security tool (API endpoint, credentials, connection parameters) |\n| **Container** | SOAR event object containing artifacts (IOCs) from an ingested alert or incident |\n| **Artifact** | Individual IOC or data point within a container (IP, hash, URL, domain, email) |\n| **Approval Gate** | Human-in-the-loop step requiring analyst decision before executing high-impact automated actions |\n\n## Tools & Systems\n\n- **Splunk SOAR (Phantom)**: Enterprise SOAR platform with 300+ app integrations and visual playbook editor\n- **Splunk ES**: SIEM platform feeding notable events into SOAR as containers for automated triage\n- **CrowdStrike Falcon**: EDR platform integrated via SOAR for automated host isolation and threat hunting\n- **ServiceNow**: ITSM platform integrated for automated incident ticket creation and tracking\n- **Palo Alto NGFW**: Firewall integrated for automated IP\u002FURL blocking via SOAR playbooks\n\n## Common Scenarios\n\n- **Phishing Triage**: Auto-extract URLs\u002Fattachments, detonate in sandbox, block malicious, create ticket\n- **Malware Alert Enrichment**: Auto-enrich file hashes across VT\u002FMalwareBazaar, isolate if confirmed malicious\n- **Brute Force Response**: Auto-check if attack succeeded, disable account if compromised, block source IP\n- **Threat Intel IOC Processing**: Auto-ingest TI feed IOCs, check against internal logs, create blocks for matches\n- **Vulnerability Alert Response**: Auto-query asset database for affected systems, create patching ticket with priority\n\n## Output Format\n\n```\nSOAR PLAYBOOK EXECUTION REPORT\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nPlaybook:     Phishing Triage Automation v2.3\nContainer:    SOAR-2024-08921\nTrigger:      Notable event from Splunk ES (phishing)\n\nActions Executed:\n  [1] URL Reputation (VirusTotal)     — 14\u002F90 engines malicious    [2.1s]\n  [2] IP Reputation (AbuseIPDB)       — Confidence: 85%            [1.3s]\n  [3] Block URL (Palo Alto)           — Blocked on PA-5260         [0.8s]\n  [4] Block IP (Palo Alto)            — Blocked on PA-5260         [0.7s]\n  [5] Create Ticket (ServiceNow)      — INC0012345 created         [1.5s]\n  [6] Prompt Analyst (Tier 2)         — Response: \"Isolate Host\"   [4m 12s]\n  [7] Quarantine Device (CrowdStrike) — WORKSTATION-042 isolated   [3.2s]\n\nTotal Duration:    4m 22s (vs 35min avg manual triage)\nTime Saved:        ~31 minutes\nDisposition:       True Positive — Escalated to IR\n```\n","# Implementing SOAR Automation with Phantom\n\n## When to Use\n\nUse this skill when:\n- SOC teams need to automate repetitive triage and enrichment tasks for high-volume alerts\n- Manual response times exceed SLA requirements and automation can reduce MTTR\n- Multiple security tools (SIEM, EDR, firewall, TIP) need orchestrated response actions\n- Playbook standardization is required to ensure consistent analyst response across shifts\n\n**Do not use** for fully autonomous containment without human approval gates — always include analyst decision points for high-impact actions like account disabling or host isolation.\n\n## Prerequisites\n\n- Splunk SOAR (Phantom) 6.x+ deployed with web interface access\n- App connectors configured: VirusTotal, CrowdStrike, ServiceNow, Active Directory, Splunk ES\n- Splunk ES integration for ingesting notable events as SOAR events\n- API credentials for each integrated tool stored in SOAR asset configuration\n- Python knowledge for custom playbook actions\n\n## Workflow\n\n### Step 1: Configure Asset Connections\n\nSet up integrations with security tools via SOAR Apps:\n\n**VirusTotal Asset Configuration:**\n```json\n{\n  \"app\": \"VirusTotal v3\",\n  \"asset_name\": \"virustotal_prod\",\n  \"configuration\": {\n    \"api_key\": \"YOUR_VT_API_KEY\",\n    \"rate_limit\": true,\n    \"max_requests_per_minute\": 4\n  },\n  \"product_vendor\": \"VirusTotal\",\n  \"product_name\": \"VirusTotal\"\n}\n```\n\n**CrowdStrike Falcon Asset:**\n```json\n{\n  \"app\": \"CrowdStrike Falcon\",\n  \"asset_name\": \"crowdstrike_prod\",\n  \"configuration\": {\n    \"client_id\": \"CS_CLIENT_ID\",\n    \"client_secret\": \"CS_CLIENT_SECRET\",\n    \"base_url\": \"https:\u002F\u002Fapi.crowdstrike.com\"\n  }\n}\n```\n\n**Active Directory Asset:**\n```json\n{\n  \"app\": \"Active Directory\",\n  \"asset_name\": \"ad_prod\",\n  \"configuration\": {\n    \"server\": \"dc01.company.com\",\n    \"username\": \"soar_service@company.com\",\n    \"password\": \"SERVICE_ACCOUNT_PASSWORD\",\n    \"ssl\": true\n  }\n}\n```\n\n### Step 2: Build Phishing Triage Playbook\n\nCreate an automated phishing response playbook in Python (Phantom playbook format):\n\n```python\n\"\"\"\nPhishing Triage Automation Playbook\nTrigger: New phishing email reported via Splunk ES notable or email ingestion\n\"\"\"\n\nimport phantom.rules as phantom\nimport json\n\ndef on_start(container):\n    # Extract artifacts (URLs, file hashes, sender) from the container\n    artifacts = phantom.get_artifacts(container_id=container[\"id\"])\n\n    for artifact in artifacts:\n        artifact_type = artifact.get(\"cef\", {}).get(\"type\", \"\")\n\n        if artifact_type == \"url\":\n            phantom.act(\"url reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=url_reputation_callback,\n                        name=\"url_reputation\")\n\n        elif artifact_type == \"hash\":\n            phantom.act(\"file reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=hash_reputation_callback,\n                        name=\"file_reputation\")\n\n        elif artifact_type == \"ip\":\n            phantom.act(\"ip reputation\", targets=artifact,\n                        assets=[\"virustotal_prod\"],\n                        callback=ip_reputation_callback,\n                        name=\"ip_reputation\")\n\ndef url_reputation_callback(action, success, container, results, handle):\n    if not success:\n        phantom.comment(container, \"URL reputation check failed\")\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious_count = data.get(\"summary\", {}).get(\"malicious\", 0)\n        total_engines = data.get(\"summary\", {}).get(\"total_engines\", 0)\n\n        if malicious_count > 5:\n            # High confidence malicious — auto-block and escalate\n            phantom.act(\"block url\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_url\")\n\n            phantom.set_severity(container, \"high\")\n            phantom.set_status(container, \"open\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Blocked on firewall. Escalating to Tier 2.\")\n\n            # Create ServiceNow ticket\n            phantom.act(\"create ticket\", targets=container,\n                        assets=[\"servicenow_prod\"],\n                        parameters=[{\n                            \"short_description\": f\"Phishing - Malicious URL detected\",\n                            \"urgency\": \"2\",\n                            \"impact\": \"2\"\n                        }],\n                        name=\"create_incident_ticket\")\n\n        elif malicious_count > 0:\n            # Medium confidence — request analyst review\n            phantom.promote(container, template=\"Phishing Investigation\")\n            phantom.comment(container,\n                f\"URL flagged by {malicious_count}\u002F{total_engines} engines. \"\n                f\"Requires analyst review.\")\n\n        else:\n            # Clean — close with comment\n            phantom.set_status(container, \"closed\")\n            phantom.comment(container,\n                f\"URL clean: 0\u002F{total_engines} engines flagged. Auto-closed.\")\n\ndef hash_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        positives = data.get(\"summary\", {}).get(\"positives\", 0)\n\n        if positives > 10:\n            # Known malware — quarantine and block\n            phantom.act(\"quarantine device\", targets=result,\n                        assets=[\"crowdstrike_prod\"],\n                        name=\"isolate_endpoint\")\n            phantom.set_severity(container, \"high\")\n\ndef ip_reputation_callback(action, success, container, results, handle):\n    if not success:\n        return\n\n    for result in results:\n        data = result.get(\"data\", [{}])[0]\n        malicious = data.get(\"summary\", {}).get(\"malicious\", 0)\n\n        if malicious > 3:\n            phantom.act(\"block ip\", targets=result,\n                        assets=[\"palo_alto_prod\"],\n                        name=\"block_malicious_ip\")\n```\n\n### Step 3: Build Alert Enrichment Playbook\n\nAutomate enrichment for all incoming SIEM alerts:\n\n```python\n\"\"\"\nUniversal Alert Enrichment Playbook\nRuns on every new event to add context before analyst review\n\"\"\"\n\nimport phantom.rules as phantom\n\ndef on_start(container):\n    # Get all artifacts\n    success, message, artifacts = phantom.get_artifacts(\n        container_id=container[\"id\"], full_data=True\n    )\n\n    ip_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"sourceAddress\")]\n    domain_artifacts = [a for a in artifacts if a.get(\"cef\", {}).get(\"destinationDnsDomain\")]\n\n    # Enrich IPs in parallel\n    for artifact in ip_artifacts:\n        ip = artifact[\"cef\"][\"sourceAddress\"]\n\n        # VirusTotal lookup\n        phantom.act(\"ip reputation\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"virustotal_prod\"],\n                    callback=enrich_ip_callback,\n                    name=f\"vt_ip_{ip}\")\n\n        # GeoIP lookup\n        phantom.act(\"geolocate ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"maxmind_prod\"],\n                    callback=geoip_callback,\n                    name=f\"geo_{ip}\")\n\n        # Whois lookup\n        phantom.act(\"whois ip\",\n                    parameters=[{\"ip\": ip}],\n                    assets=[\"whois_prod\"],\n                    name=f\"whois_{ip}\")\n\n    # Enrich domains\n    for artifact in domain_artifacts:\n        domain = artifact[\"cef\"][\"destinationDnsDomain\"]\n        phantom.act(\"domain reputation\",\n                    parameters=[{\"domain\": domain}],\n                    assets=[\"virustotal_prod\"],\n                    name=f\"vt_domain_{domain}\")\n\ndef enrich_ip_callback(action, success, container, results, handle):\n    \"\"\"Update container with enrichment data\"\"\"\n    if success:\n        for result in results:\n            summary = result.get(\"summary\", {})\n            phantom.add_artifact(container, {\n                \"cef\": {\n                    \"vt_malicious\": summary.get(\"malicious\", 0),\n                    \"vt_suspicious\": summary.get(\"suspicious\", 0),\n                    \"enrichment_source\": \"VirusTotal\"\n                },\n                \"label\": \"enrichment\",\n                \"name\": \"VT IP Enrichment\"\n            })\n```\n\n### Step 4: Implement Approval Gates for High-Impact Actions\n\nAdd human-in-the-loop for critical actions:\n\n```python\ndef containment_decision(action, success, container, results, handle):\n    \"\"\"Present analyst with containment options\"\"\"\n    phantom.prompt(\n        container=container,\n        user=\"soc_tier2\",\n        message=(\n            \"Confirmed malicious activity detected.\\n\"\n            f\"Host: {container['artifacts'][0]['cef'].get('sourceAddress')}\\n\"\n            f\"Threat: {results[0]['summary'].get('threat_name')}\\n\\n\"\n            \"Select containment action:\"\n        ),\n        respond_in_mins=15,\n        options=[\"Isolate Host\", \"Disable Account\", \"Both\", \"Monitor Only\"],\n        callback=execute_containment\n    )\n\ndef execute_containment(action, success, container, results, handle):\n    response = results.get(\"response\", \"Monitor Only\")\n\n    if response in [\"Isolate Host\", \"Both\"]:\n        phantom.act(\"quarantine device\",\n                    parameters=[{\"hostname\": container[\"artifacts\"][0][\"cef\"][\"sourceHostName\"]}],\n                    assets=[\"crowdstrike_prod\"],\n                    name=\"isolate_host\")\n\n    if response in [\"Disable Account\", \"Both\"]:\n        phantom.act(\"disable user\",\n                    parameters=[{\"username\": container[\"artifacts\"][0][\"cef\"][\"sourceUserName\"]}],\n                    assets=[\"ad_prod\"],\n                    name=\"disable_account\")\n\n    phantom.comment(container, f\"Analyst approved: {response}\")\n```\n\n### Step 5: Configure Playbook Scheduling and Triggers\n\nSet up event triggers in SOAR:\n\n```json\n{\n  \"playbook_name\": \"phishing_triage_automation\",\n  \"trigger\": {\n    \"type\": \"event_created\",\n    \"conditions\": {\n      \"label\": [\"phishing\", \"notable\"],\n      \"severity\": [\"high\", \"medium\"]\n    }\n  },\n  \"active\": true,\n  \"run_as\": \"automation_user\"\n}\n```\n\n### Step 6: Monitor Playbook Performance\n\nTrack automation effectiveness with SOAR metrics:\n\n```python\n# Query SOAR API for playbook execution stats\nimport requests\n\nheaders = {\"ph-auth-token\": \"YOUR_SOAR_TOKEN\"}\nresponse = requests.get(\n    \"https:\u002F\u002Fsoar.company.com\u002Frest\u002Fplaybook_run\",\n    headers=headers,\n    params={\n        \"page_size\": 100,\n        \"filter\": '{\"status\":\"success\"}',\n        \"sort\": \"create_time\",\n        \"order\": \"desc\"\n    }\n)\nruns = response.json()[\"data\"]\n\n# Calculate automation metrics\ntotal_runs = len(runs)\navg_duration = sum(r[\"end_time\"] - r[\"start_time\"] for r in runs) \u002F total_runs\nauto_closed = sum(1 for r in runs if r.get(\"auto_resolved\"))\nprint(f\"Total runs: {total_runs}\")\nprint(f\"Avg duration: {avg_duration:.1f}s\")\nprint(f\"Auto-resolved: {auto_closed}\u002F{total_runs} ({auto_closed\u002Ftotal_runs*100:.0f}%)\")\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|-----------|\n| **SOAR** | Security Orchestration, Automation, and Response — platform integrating security tools with automated playbooks |\n| **Playbook** | Automated workflow defining sequential and parallel actions triggered by security events |\n| **Asset** | SOAR configuration for a connected security tool (API endpoint, credentials, connection parameters) |\n| **Container** | SOAR event object containing artifacts (IOCs) from an ingested alert or incident |\n| **Artifact** | Individual IOC or data point within a container (IP, hash, URL, domain, email) |\n| **Approval Gate** | Human-in-the-loop step requiring analyst decision before executing high-impact automated actions |\n\n## Tools & Systems\n\n- **Splunk SOAR (Phantom)**: Enterprise SOAR platform with 300+ app integrations and visual playbook editor\n- **Splunk ES**: SIEM platform feeding notable events into SOAR as containers for automated triage\n- **CrowdStrike Falcon**: EDR platform integrated via SOAR for automated host isolation and threat hunting\n- **ServiceNow**: ITSM platform integrated for automated incident ticket creation and tracking\n- **Palo Alto NGFW**: Firewall integrated for automated IP\u002FURL blocking via SOAR playbooks\n\n## Common Scenarios\n\n- **Phishing Triage**: Auto-extract URLs\u002Fattachments, detonate in sandbox, block malicious, create ticket\n- **Malware Alert Enrichment**: Auto-enrich file hashes across VT\u002FMalwareBazaar, isolate if confirmed malicious\n- **Brute Force Response**: Auto-check if attack succeeded, disable account if compromised, block source IP\n- **Threat Intel IOC Processing**: Auto-ingest TI feed IOCs, check against internal logs, create blocks for matches\n- **Vulnerability Alert Response**: Auto-query asset database for affected systems, create patching ticket with priority\n\n## Output Format\n\n```\nSOAR PLAYBOOK EXECUTION REPORT\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nPlaybook:     Phishing Triage Automation v2.3\nContainer:    SOAR-2024-08921\nTrigger:      Notable event from Splunk ES (phishing)\n\nActions Executed:\n  [1] URL Reputation (VirusTotal)     — 14\u002F90 engines malicious    [2.1s]\n  [2] IP Reputation (AbuseIPDB)       — Confidence: 85%            [1.3s]\n  [3] Block URL (Palo Alto)           — Blocked on PA-5260         [0.8s]\n  [4] Block IP (Palo Alto)            — Blocked on PA-5260         [0.7s]\n  [5] Create Ticket (ServiceNow)      — INC0012345 created         [1.5s]\n  [6] Prompt Analyst (Tier 2)         — Response: \"Isolate Host\"   [4m 12s]\n  [7] Quarantine Device (CrowdStrike) — WORKSTATION-042 isolated   [3.2s]\n\nTotal Duration:    4m 22s (vs 35min avg manual triage)\nTime Saved:        ~31 minutes\nDisposition:       True Positive — Escalated to IR\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","soar","phantom","splunk-soar","automation","playbook","orchestration","incident-response","mahipal","cybersecurity","1.0",[38,39,40,41],"DE.CM-01","DE.AE-02","RS.MA-01","DE.AE-06","soc-operations","Implements Security Orchestration, Automation, and Response (SOAR) workflows using Splunk SOAR (formerly Phantom) to automate alert triage, IOC enrichment, containment actions, and incident response playbooks. Use when SOC teams need to reduce manual analyst work, standardize response procedures, or integrate multiple security tools into automated workflows.\n",[45,46,47,48],"T1078","T1685.002","T1685.005","T1566","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fimplementing-soar-automation-with-phantom","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-soar-automation-with-phantom",{"tool":62,"command":63},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill implementing-soar-automation-with-phantom",{"tool":65,"command":66},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill implementing-soar-automation-with-phantom","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-soar-automation-with-phantom\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","参考文档",2620,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-soar-automation-with-phantom\u002Freferences\u002Fapi-reference.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fagent.py","SCRIPT","脚本",9597,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimplementing-soar-automation-with-phantom\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",[],[]]