skills/security/incident-response/SKILL.md
Security incident detection, containment, and response procedures for ServiceNow environments
npx skillsauth add happy-technologies-llc/happy-servicenow-skills incident-responseInstall 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 covers security incident handling in ServiceNow:
When to use: Upon detection of any potential security threat, unauthorized access, data breach, or suspicious activity.
sn_si.admin (Security Incident Response), security_adminCommon Detection Sources:
Query for Suspicious Login Activity:
Tool: SN-Query-Table
Parameters:
table_name: sys_audit
query: tablename=sys_user^fieldname=failed_attempts^newvalueGT5^sys_created_onONLast 24 hours
fields: documentkey,user,newvalue,sys_created_on
limit: 100
Check Recent Admin Actions:
Tool: SN-Query-Table
Parameters:
table_name: sys_audit
query: sys_created_onONLast hour^userLIKEadmin
fields: tablename,fieldname,oldvalue,newvalue,user,sys_created_on
limit: 50
Security Incident Severity Matrix:
| Severity | Impact | Examples | |----------|--------|----------| | Critical | Business-wide | Ransomware, data breach, admin compromise | | High | Department-wide | Unauthorized access to sensitive data | | Medium | Limited scope | Phishing attempt, malware on single system | | Low | Minimal | Spam, failed attack attempts |
Create Security Incident:
Tool: SN-Create-Record
Parameters:
table_name: sn_si_incident
data:
short_description: "Potential unauthorized access - Admin account"
description: |
Detection: Multiple failed login attempts followed by successful login
Source IP: 203.0.113.50 (external)
Target Account: [email protected]
Time: 2026-02-06 14:30 UTC
Initial Analysis:
- 15 failed attempts over 5 minutes
- Successful login from unfamiliar IP
- Unusual time (outside business hours)
category: Unauthorized Access
subcategory: Account Compromise
priority: 1
state: Analysis
affected_user: [user_sys_id]
business_criticality: Critical
Immediate Actions (Critical/High):
Tool: SN-Update-Record
Parameters:
table_name: sys_user
sys_id: [compromised_user_sys_id]
data:
locked_out: true
active: false
Tool: SN-Execute-Background-Script
Parameters:
script: |
var gr = new GlideRecord('v_user_session');
gr.addQuery('user', '[compromised_user_sys_id]');
gr.query();
while (gr.next()) {
gr.deleteRecord();
}
gs.info('Terminated all sessions for compromised user');
description: "Emergency: Terminate compromised user sessions"
Tool: SN-Add-Work-Notes
Parameters:
sys_id: [security_incident_sys_id]
table_name: sn_si_incident
work_notes: |
CONTAINMENT ACTION - [TIMESTAMP]
Actions Taken:
1. Account locked - sys_user.locked_out = true
2. Account deactivated - sys_user.active = false
3. Active sessions terminated - v_user_session cleared
Performed by: [Analyst Name]
Approved by: [Manager Name]
Gather Evidence:
Tool: SN-Query-Table
Parameters:
table_name: sys_audit
query: user=[compromised_user_id]^sys_created_onONLast 7 days
fields: tablename,fieldname,oldvalue,newvalue,sys_created_on
limit: 500
Tool: SN-Query-Table
Parameters:
table_name: syslog
query: sys_created_onONLast 24 hours^messageLIKElogin
fields: level,message,source,sys_created_on
limit: 200
Tool: SN-Query-Table
Parameters:
table_name: sys_audit
query: user=[user_id]^tablenameINsys_user,customer_account,hr_core_profile
fields: tablename,documentkey,fieldname,sys_created_on
Document Findings:
Tool: SN-Add-Work-Notes
Parameters:
sys_id: [security_incident_sys_id]
work_notes: |
INVESTIGATION FINDINGS - [TIMESTAMP]
Timeline:
- 14:25 - First failed login attempt
- 14:30 - Successful login from IP 203.0.113.50
- 14:32 - Accessed HR records
- 14:35 - Downloaded employee list
- 14:40 - Session terminated by security
Data Accessed:
- hr_core_profile: 150 records viewed
- sys_user: 50 records exported
Indicators of Compromise:
- External IP (not company VPN)
- Outside business hours
- Bulk data access pattern
Reset Credentials:
Tool: SN-Execute-Background-Script
Parameters:
script: |
var user = new GlideRecord('sys_user');
user.get('[compromised_user_sys_id]');
user.user_password.setDisplayValue('TEMP-' + gs.generateGUID().substring(0,8));
user.update();
gs.info('Password reset for: ' + user.user_name);
description: "Reset compromised user password"
Reactivate with Enhanced Security:
Tool: SN-Update-Record
Parameters:
table_name: sys_user
sys_id: [user_sys_id]
data:
active: true
locked_out: false
password_needs_reset: true
failed_attempts: 0
Notification Templates:
To Affected User:
Subject: Security Action Required - Account Access
Your account was temporarily disabled due to suspicious activity. Your password has been reset. Please contact IT Security at x1234 to verify your identity and receive new credentials.
To Management:
Security Incident #[number] - Status Update
Summary: [Brief description] Impact: [Scope of impact] Current Status: [Contained/Investigating/Resolved] Actions Taken: [List of actions] Next Steps: [Planned actions]
Close Security Incident:
Tool: SN-Update-Record
Parameters:
table_name: sn_si_incident
sys_id: [incident_sys_id]
data:
state: Closed
close_code: Resolved
close_notes: |
Resolution Summary:
- Compromised credentials reset
- No data exfiltration confirmed
- User re-trained on security awareness
Root Cause: Weak password + phishing attack
Preventive Actions:
- MFA enabled for all admin accounts
- Password policy strengthened
- Phishing training scheduled
Lessons Learned documented in KB0012345
| Severity | Initial Response | Containment | Resolution | |----------|------------------|-------------|------------| | Critical | 15 minutes | 1 hour | 24 hours | | High | 1 hour | 4 hours | 72 hours | | Medium | 4 hours | 24 hours | 1 week | | Low | 24 hours | 1 week | 2 weeks |
Cause: Missing Security Incident Response plugin or roles Solution: Verify sn_si plugin is active; request sn_si.admin role
Cause: Auditing not enabled for table Solution: Check sys_dictionary for audit flag on table
security/audit-compliance - Compliance checkingitsm/major-incident - Major incident handlingadmin/acl-management - Access controltesting
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