Designing Automated Alert Triage Playbooks, Enrichment & Containment Workflows, Human Approval Gates & Safe Error Handling
Security operations teams routinely spend hours copying observables between SIEM alerts, threat intelligence lookups, identity directories, and endpoint tools. Security Orchestration, Automation, and Response (SOAR) platforms—such as open-source Shuffle and enterprise Cortex XSOAR—connect security tools through visual playbooks, apps/integrations, and incident war rooms or cases so enrichment, ticket creation, and scoped containment happen consistently and fast.
| Aspect | Shuffle | Cortex XSOAR |
|---|---|---|
| Platform Style | Open-source / self-hosted workflow automation platform with visual workflows, webhooks, and open app integrations. | Enterprise SOAR platform featuring structured incident layouts, playbooks, War Room collaboration, and engine/integration packs. |
| Key Strengths | Flexible self-hosting, webhook-driven automation, and lightweight custom app/API building. | Mature enterprise case/incident management, role-based access controls, and broad out-of-the-box security integrations. |
| Operational Focus | Protect worker/API secrets, validate incoming webhooks, and handle retries/timeouts cleanly. | Standardize incident fields, tune playbook branches, and govern engine/integration permissions and approvals. |
curl -s -X POST "https://soar.example.internal/api/v1/hooks/alert-triage" \
-H "Content-Type: application/json" \
-d '{"alert_id":"ALT-9042","severity":"high","src_ip":"198.51.100.77","user":"j.doe"}'
{"status":"accepted","workflow_execution_id":"exec-7741a9c2"}
def decide_next_step(severity, reputation_score, is_critical_asset):
if severity == "low" and reputation_score < 50:
return "enrich_and_close_benign"
if reputation_score >= 80 and not is_critical_asset:
return "require_human_approval_for_isolation"
return "enrich_and_assign_to_analyst"
print(decide_next_step("high", 88, False))
print(decide_next_step("low", 20, False))
require_human_approval_for_isolation
enrich_and_close_benign
raw_iocs = {
"ips": ["198.51.100.77", "198.51.100.77", "10.20.4.18"],
"users": ["J.DOE", "j.doe"]
}
clean_ips = sorted({ip for ip in raw_iocs["ips"] if not ip.startswith("10.")})
clean_users = sorted({u.lower() for u in raw_iocs["users"]})
print("External IPs:", clean_ips)
print("Normalized users:", clean_users)
External IPs: ['198.51.100.77']
Normalized users: ['j.doe']
{
"execution_id": "exec-7741a9c2",
"playbook": "phishing-and-ip-triage-v2",
"alert_id": "ALT-9042",
"approval_required": true,
"approved_by": "soc-lead-01",
"outcome": "ticket_updated_and_queued"
}
[PLAYBOOK COMPLETE] exec-7741a9c2 | Alert: ALT-9042 | Outcome: ticket_updated_and_queued
def call_enrichment_with_retry(attempts, max_retries=3):
for attempt in range(1, max_retries + 1):
ok = attempts.pop(0) if attempts else False
if ok:
return {"status": "ok", "attempt": attempt}
return {"status": "fallback_error_branch", "attempts_used": max_retries}
print(call_enrichment_with_retry([False, False, True]))
print(call_enrichment_with_retry([False, False, False]))
{'status': 'ok', 'attempt': 3}
{'status': 'fallback_error_branch', 'attempts_used': 3}
SigninLogs
| where TimeGenerated > ago(24h)
| where UserPrincipalName has "soar"
| summarize
Events = count(),
SourceIPs = make_set(IPAddress, 5),
Failures = countif(ResultType != "0")
by UserPrincipalName, AppDisplayName
| order by Events desc
UserPrincipalName AppDisplayName Events SourceIPs Failures
----------------- -------------- ------ --------- --------
svc-soar@example.com SOAR Automation App 312 ["10.20.3.40"] 0
docker ps --format "table {{.Names}}\t{{.Status}}" 2>/dev/null | head -n 6 || echo "shuffle-backend Up 5 days (healthy)"
shuffle-backend Up 5 days (healthy)
SELECT
Pid,
Name,
Exe
FROM pslist()
LIMIT 15
Pid Name Exe
--- ---- ---
1044 explorer.exe C:\Windows\explorer.exe
550
/opt/soar/|/etc/shuffle/
SOAR configuration or workflow file modified on $(agent.name)
** Alert 1795743510.66219: - local,soar,automation_governance
2026 Nov 26 19:02:14 (soar-worker-01) 10.20.3.40->/var/ossec/logs/alerts/alerts.log
Rule: 102810 (level 9) -> 'SOAR configuration or workflow file modified on soar-worker-01'
from collections import Counter
runs = [
{"id": "exec-1", "status": "completed"},
{"id": "exec-2", "status": "completed"},
{"id": "exec-3", "status": "awaiting_approval"},
{"id": "exec-4", "status": "failed_api_timeout"},
]
for status, total in Counter(r["status"] for r in runs).items():
print(f"{status}: {total}")
completed: 2
awaiting_approval: 1
failed_api_timeout: 1
Select a SOAR workflow scenario below to review design and operational best practices: