skills/secops/security-recommended-actions/SKILL.md
Generate recommended actions for security incidents based on threat type, severity, affected assets, and playbook alignment. Include containment, eradication, and recovery steps
npx skillsauth add happy-technologies-llc/happy-servicenow-skills security-recommended-actionsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill generates structured, prioritized response actions for security incidents by analyzing threat type, severity, affected assets, and organizational playbooks. It produces phased action plans covering containment, eradication, and recovery aligned with NIST SP 800-61 and organizational SOC procedures.
Key capabilities:
When to use:
sn_si.analyst, sn_si.manager, or adminsn_si), Threat Intelligence (sn_ti), Vulnerability Response (sn_vul)sn_si_incident, sn_si_task, sn_ti_observable, cmdb_ci, sn_vul_vulnerable_item| Table | Purpose | Key Fields |
|-------|---------|------------|
| sn_si_incident | Security incidents | number, category, subcategory, priority, severity, state, cmdb_ci, attack_vector, kill_chain_phase, business_criticality |
| sn_si_task | Response tasks | number, short_description, state, task_type, security_incident, assigned_to, priority |
| sn_ti_observable | Threat indicators | type, value, confidence, threat_score, security_incident |
| cmdb_ci | Affected assets | name, sys_class_name, ip_address, os, environment, business_criticality |
| sn_vul_vulnerable_item | Known vulnerabilities | vulnerability, cmdb_ci, state, cvss_score, risk_score |
Fetch the complete incident record with threat classification fields.
Using MCP (Claude Code/Desktop):
Tool: SN-Read-Record
Parameters:
table_name: sn_si_incident
sys_id: [INCIDENT_SYS_ID]
fields: sys_id,number,short_description,description,category,subcategory,priority,severity,state,cmdb_ci,attack_vector,kill_chain_phase,business_criticality,risk_score,assigned_to,assignment_group,opened_at,contact_type,affected_user
Using REST API:
GET /api/now/table/sn_si_incident?sysparm_query=number=[SIR_NUMBER]&sysparm_fields=sys_id,number,short_description,description,category,subcategory,priority,severity,state,cmdb_ci,attack_vector,kill_chain_phase,business_criticality,risk_score,assigned_to,assignment_group,opened_at&sysparm_limit=1&sysparm_display_value=all
Retrieve configuration item details to understand the business context of affected systems.
Using MCP:
Tool: SN-Query-Table
Parameters:
table_name: cmdb_ci
query: sys_id=[CMDB_CI_SYS_ID]
fields: sys_id,name,sys_class_name,ip_address,os,environment,business_criticality,support_group,department,location,operational_status
limit: 1
Using REST API:
GET /api/now/table/cmdb_ci?sysparm_query=sys_id=[CI_SYS_ID]&sysparm_fields=sys_id,name,sys_class_name,ip_address,os,environment,business_criticality,support_group,department,location,operational_status&sysparm_limit=1&sysparm_display_value=true
Pull IOCs to inform threat-specific containment and eradication actions.
Using MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_ti_observable
query: security_incident=[INCIDENT_SYS_ID]
fields: sys_id,type,value,source,confidence,threat_score,first_seen,last_seen
limit: 100
Using REST API:
GET /api/now/table/sn_ti_observable?sysparm_query=security_incident=[INCIDENT_SYS_ID]&sysparm_fields=sys_id,type,value,source,confidence,threat_score&sysparm_limit=100
Identify exploitable vulnerabilities that may have enabled the attack.
Using MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_vul_vulnerable_item
query: cmdb_ci=[AFFECTED_CI_SYS_ID]^stateINOpen,Under Investigation
fields: sys_id,vulnerability,cmdb_ci,state,cvss_score,risk_score,first_found
limit: 20
Using REST API:
GET /api/now/table/sn_vul_vulnerable_item?sysparm_query=cmdb_ci=[CI_SYS_ID]^stateINOpen,Under Investigation&sysparm_fields=sys_id,vulnerability,cmdb_ci,state,cvss_score,risk_score,first_found&sysparm_limit=20&sysparm_display_value=true
Check what tasks already exist to avoid duplication.
Using MCP:
Tool: SN-Query-Table
Parameters:
table_name: sn_si_task
query: security_incident=[INCIDENT_SYS_ID]^ORDERBYopened_at
fields: sys_id,number,short_description,state,task_type,assigned_to,priority
limit: 50
Produce phased, threat-specific response actions.
Using MCP:
Tool: SN-Execute-Background-Script
Parameters:
script: |
var sirNumber = 'SIR0009100'; // Replace with target incident
var gr = new GlideRecord('sn_si_incident');
gr.addQuery('number', sirNumber);
gr.query();
if (!gr.next()) { gs.info('Incident not found'); return; }
var category = gr.category.getDisplayValue().toLowerCase();
var severity = gr.severity.getDisplayValue();
var priority = parseInt(gr.priority.toString()) || 3;
var ciSysId = gr.cmdb_ci.toString();
var actions = { containment: [], eradication: [], recovery: [], post_incident: [] };
// Get CI details
var ciType = 'unknown';
var ciEnv = 'unknown';
if (ciSysId) {
var ci = new GlideRecord('cmdb_ci');
if (ci.get(ciSysId)) {
ciType = ci.sys_class_name.toString();
ciEnv = ci.environment.getDisplayValue() || 'unknown';
}
}
// Collect IOCs
var iocCount = 0;
var iocTypes = {};
var obs = new GlideRecord('sn_ti_observable');
obs.addQuery('security_incident', gr.sys_id.toString());
obs.query();
while (obs.next()) {
iocCount++;
var t = obs.type.getDisplayValue() || 'other';
iocTypes[t] = (iocTypes[t] || 0) + 1;
}
// === CONTAINMENT ACTIONS ===
// Universal containment
actions.containment.push({
action: 'Document initial findings and preserve volatile evidence',
priority: 1, owner: 'SOC Analyst', timeline: 'Immediate',
details: 'Capture memory dump, running processes, network connections before any changes'
});
if (category.indexOf('malware') >= 0 || category.indexOf('ransomware') >= 0) {
actions.containment.push({
action: 'Isolate affected host(s) from network',
priority: 1, owner: 'Network Operations', timeline: '< 30 minutes',
details: 'Apply network isolation via EDR or switch port disable. Do NOT power off to preserve memory.'
});
actions.containment.push({
action: 'Block identified C2 IPs and domains at perimeter',
priority: 1, owner: 'SOC Analyst', timeline: '< 1 hour',
details: 'Update firewall rules and DNS sinkhole for ' + iocCount + ' identified IOCs'
});
actions.eradication.push({
action: 'Remove malware artifacts and persistence mechanisms',
priority: 1, owner: 'DFIR Team', timeline: '< 24 hours',
details: 'Scan with updated signatures, check scheduled tasks, registry run keys, WMI subscriptions'
});
actions.recovery.push({
action: 'Rebuild or restore affected systems from known-good baseline',
priority: 2, owner: 'IT Operations', timeline: '24-48 hours',
details: 'Reimage ' + (ciType.indexOf('server') >= 0 ? 'server' : 'workstation') + ' from golden image or verified backup'
});
}
if (category.indexOf('phishing') >= 0) {
actions.containment.push({
action: 'Quarantine phishing email from all mailboxes',
priority: 1, owner: 'Email Security', timeline: '< 1 hour',
details: 'Use email security tool to search and purge by sender, subject, or message ID'
});
actions.containment.push({
action: 'Reset credentials for affected user(s)',
priority: 1, owner: 'IAM Team', timeline: '< 2 hours',
details: 'Force password reset and revoke active sessions for compromised accounts'
});
actions.eradication.push({
action: 'Block sender domain and update email filtering rules',
priority: 2, owner: 'Email Security', timeline: '< 4 hours',
details: 'Add sender to blocklist and create content filtering rule for similar messages'
});
}
if (category.indexOf('data') >= 0 || category.indexOf('exfiltration') >= 0 || category.indexOf('breach') >= 0) {
actions.containment.push({
action: 'Identify and block data exfiltration channels',
priority: 1, owner: 'SOC Analyst', timeline: '< 1 hour',
details: 'Review DLP alerts, proxy logs, and cloud storage activity for ongoing exfiltration'
});
actions.containment.push({
action: 'Revoke access for compromised accounts and API keys',
priority: 1, owner: 'IAM Team', timeline: '< 2 hours',
details: 'Disable affected service accounts, rotate API keys, revoke OAuth tokens'
});
actions.recovery.push({
action: 'Assess data exposure scope and prepare regulatory notification',
priority: 1, owner: 'Legal/Privacy Team', timeline: '< 72 hours',
details: 'Determine data types affected, number of records, and applicable notification requirements'
});
}
// Universal eradication
actions.eradication.push({
action: 'Patch exploited vulnerabilities on affected and similar systems',
priority: 2, owner: 'Vulnerability Management', timeline: '< 72 hours',
details: 'Apply patches for identified CVEs; scan environment for same vulnerability'
});
// Universal recovery
actions.recovery.push({
action: 'Validate system integrity and restore to operational status',
priority: 2, owner: 'IT Operations', timeline: '48-72 hours',
details: 'Verify clean state, run integrity checks, restore network connectivity with monitoring'
});
actions.recovery.push({
action: 'Enhance monitoring on recovered systems for 30 days',
priority: 3, owner: 'SOC Analyst', timeline: 'Ongoing',
details: 'Increase logging verbosity, add detection rules for related IOCs and TTPs'
});
// Post-incident
actions.post_incident.push({
action: 'Conduct post-incident review and document lessons learned',
priority: 3, owner: 'SOC Manager', timeline: '< 2 weeks post-resolution',
details: 'Review detection time, response effectiveness, and identify process improvements'
});
actions.post_incident.push({
action: 'Update playbooks and detection rules based on findings',
priority: 3, owner: 'Detection Engineering', timeline: '< 30 days post-resolution',
details: 'Create or update detection signatures, SIEM correlation rules, and response procedures'
});
var result = {
incident: sirNumber,
category: category,
severity: severity,
total_actions: actions.containment.length + actions.eradication.length + actions.recovery.length + actions.post_incident.length,
phases: actions
};
gs.info('RECOMMENDED ACTIONS:\n' + JSON.stringify(result, null, 2));
description: "SecOps: Generate phased response actions for a security incident"
Using MCP:
Tool: SN-Add-Work-Notes
Parameters:
table_name: sn_si_incident
sys_id: [INCIDENT_SYS_ID]
work_notes: |
=== RECOMMENDED RESPONSE ACTIONS ===
Generated: 2026-03-19 | Category: Ransomware | Severity: Critical
PHASE 1 - CONTAINMENT (Immediate):
[ ] Document findings and preserve volatile evidence (SOC Analyst, Immediate)
[ ] Isolate affected hosts from network (Network Ops, < 30 min)
[ ] Block C2 IPs/domains at perimeter (SOC Analyst, < 1 hour)
PHASE 2 - ERADICATION (24-72 hours):
[ ] Remove malware and persistence mechanisms (DFIR Team, < 24 hours)
[ ] Patch exploited vulnerabilities (Vuln Mgmt, < 72 hours)
PHASE 3 - RECOVERY (48-72 hours):
[ ] Rebuild affected systems from known-good baseline (IT Ops, 24-48 hours)
[ ] Validate system integrity (IT Ops, 48-72 hours)
[ ] Enhance monitoring for 30 days (SOC Analyst, Ongoing)
PHASE 4 - POST-INCIDENT (2-4 weeks):
[ ] Conduct lessons learned review (SOC Manager, < 2 weeks)
[ ] Update playbooks and detection rules (Detection Engineering, < 30 days)
| Operation | MCP Tool | REST Endpoint | |-----------|----------|---------------| | Read Incident | SN-Read-Record | GET /api/now/table/sn_si_incident/{sys_id} | | Query Assets | SN-Query-Table | GET /api/now/table/cmdb_ci | | Query IOCs | SN-Query-Table | GET /api/now/table/sn_ti_observable | | Query Vulnerabilities | SN-Query-Table | GET /api/now/table/sn_vul_vulnerable_item | | Generate Actions | SN-Execute-Background-Script | POST /api/now/table/sys_trigger | | Post Actions | SN-Add-Work-Notes | PATCH /api/now/table/sn_si_incident/{sys_id} |
Symptom: Generated actions are too generic because the category does not match expected values
Cause: Organizations may use custom category and subcategory values
Solution: Query sys_choice for sn_si_incident.category to retrieve valid values. Map custom categories to standard threat types (malware, phishing, data breach, etc.).
Symptom: Threat-specific containment actions cannot be generated without IOCs
Cause: Threat intelligence may not be integrated or observables not yet linked
Solution: Recommend IOC collection as the first containment action. Search sn_ti_observable by date range for recently ingested indicators.
Symptom: Actions cannot be aligned to an organizational playbook
Cause: The sn_si_playbook table may not contain a playbook for the incident category
Solution: Generate actions from the built-in threat taxonomy and recommend playbook creation as a post-incident action.
Scenario: SIR0009100 -- LockBit ransomware detected on finance file server
Scenario: SIR0008890 -- Credential harvesting phishing targeting 50 users
secops/incident-summarization - Summarize the incident alongside recommended actionssecops/quality-assessment - Assess whether recommended actions were properly executedsecops/post-incident-analysis - Conduct detailed analysis after actions are completedsecops/correlation-insights - Identify related incidents that may share response actionssecops/shift-handover - Include pending actions in shift handover reportstesting
Manage supplier onboarding, qualification, performance monitoring, and offboarding with auditable lifecycle controls
tools
Identify emerging risks, prioritize intake signals, and route candidates into formal GRC risk assessment workflows
documentation
Screen inbound documents for completeness, policy risk, and routing readiness before extraction or case workflows
testing
Generate concise task summaries with status, timeline, blockers, SLA risk, and recommended next actions