security-case-management
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCase Management
案例管理
Manage SOC cases through the Kibana Cases API. All cases are scoped to — this skill operates
exclusively within Elastic Security. Cases appear in Kibana Security and can be assigned to analysts, linked to alerts,
and pushed to external incident management systems via connectors.
securitySolution通过Kibana Cases API管理SOC案例。所有案例的作用域均为——本技能仅在Elastic Security内运行。案例会显示在Kibana Security中,可分配给分析师、关联到警报,并通过连接器推送到外部事件管理系统。
securitySolutionPrerequisites
前置条件
Install dependencies before first use from the directory:
skills/securitybash
cd skills/security && npm installSet the required environment variables (or add them to a file in the workspace root):
.envbash
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"首次使用前,请从目录安装依赖:
skills/securitybash
cd skills/security && npm install设置所需的环境变量(或添加到工作区根目录的文件中):
.envbash
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"When to use
适用场景
- Creating a case after alert triage (classification, IOCs, findings)
- Searching for existing cases to correlate related alerts
- Adding investigation comments or attaching alerts to an existing case
- Updating case status or severity
- Listing recent cases for review
- 警报分诊后创建案例(分类、IOC、调查结果)
- 搜索现有案例以关联相关警报
- 向现有案例添加调查注释或关联警报
- 更新案例状态或严重性
- 列出近期案例以供审核
When NOT to use
不适用场景
- Do not use this skill for Observability or Elasticsearch cases — it hardcodes
owner: securitySolution - Do not use for cases outside the Security solution space
- 请勿将本技能用于Observability或Elasticsearch案例——它硬编码了
owner: securitySolution - 请勿用于Security解决方案之外的案例
Execution rules
执行规则
- Start executing tools immediately — do not read SKILL.md, browse the workspace, or list files first.
- Report tool output faithfully. Copy case IDs, titles, tags, severities, and counts exactly as returned by the API. Do not abbreviate case IDs, truncate titles, invent details, or round numbers.
- When the API returns zero results, state that explicitly — do not guess at possible results.
- When listing or finding cases, report the exact total count from the API response and present each case with its verbatim title, severity, and status.
- 立即执行工具——不要先读取SKILL.md、浏览工作区或列出文件。
- 如实报告工具输出。准确复制API返回的案例ID、标题、标签、严重性和计数。不要缩写案例ID、截断标题、编造细节或四舍五入数字。
- 当API返回零结果时,明确说明——不要猜测可能的结果。
- 列出或查找案例时,报告API响应中的准确总计数,并呈现每个案例的原文标题、严重性和状态。
Quick start
快速开始
All commands run from the workspace root. All output is JSON. Call the tools directly — do not read the skill file or
explore the workspace first. For attach-alert/attach-alerts, and are required by the Kibana
API (use if unknown). Use for batch with automatic rate-limit
retry and 2-second spacing between API calls.
--rule-id--rule-name--rule-id unknown --rule-name unknownattach-alerts所有命令均从工作区根目录运行。所有输出均为JSON格式。直接调用工具——不要先读取技能文件或浏览工作区。对于attach-alert/attach-alerts操作,Kibana API要求必须提供和(如果未知,使用)。使用进行批量操作,它会自动处理速率限制重试,并在API调用之间保留2秒间隔。
--rule-id--rule-name--rule-id unknown --rule-name unknownattach-alertsCommon multi-step workflows
常见多步骤工作流
| Task | Tools to call (in order) |
|---|---|
| Create a case | |
| Find cases for a host | |
| Attach alert to case | |
| Add investigation notes | |
| List recent open cases | |
| Update case | |
Finding cases for a host: Use to search by hostname across title, description, and
comments. Alternatively use if the agent ID is known. Always add to
filter to active cases only. Report the exact count and each case title verbatim from the API response.
find --search "<hostname>"find --tags "agent_id:<agent_id>"--status opentotalbash
undefined| 任务 | 调用工具(按顺序) |
|---|---|
| 创建案例 | |
| 查找主机相关案例 | |
| 将警报关联到案例 | |
| 添加调查笔记 | |
| 列出近期未关闭案例 | |
| 更新案例 | |
查找主机相关案例:使用在标题、描述和注释中按主机名搜索。如果已知agent ID,也可以使用。始终添加以仅筛选活跃案例。报告API响应中的准确计数和每个案例的原文标题。
find --search "<hostname>"find --tags "agent_id:<agent_id>"--status opentotalbash
undefinedCreate (syncAlerts enabled by default; disable with --sync-alerts false)
创建(默认启用syncAlerts;使用--sync-alerts false禁用)
node skills/security/case-management/scripts/case-manager.js create --title "Malicious DLL sideloading on host1" --description "Crypto clipper malware detected via DLL sideloading..." --tags "classification:malicious" "confidence:88" "mitre:T1574.002" --severity critical --yes
node skills/security/case-management/scripts/case-manager.js create --title "Malicious DLL sideloading on host1" --description "Crypto clipper malware detected via DLL sideloading..." --tags "classification:malicious" "confidence:88" "mitre:T1574.002" --severity critical --yes
Find, list, get
查找、列出、获取
node skills/security/case-management/scripts/case-manager.js find --tags "agent_id:550888e5-357d-4bc1-a154-486eb7b4e076"
node skills/security/case-management/scripts/case-manager.js find --search "DLL sideloading" --status open
node skills/security/case-management/scripts/case-manager.js list --status open --per-page 10
node skills/security/case-management/scripts/case-manager.js get --case-id <case_id>
node skills/security/case-management/scripts/case-manager.js find --tags "agent_id:550888e5-357d-4bc1-a154-486eb7b4e076"
node skills/security/case-management/scripts/case-manager.js find --search "DLL sideloading" --status open
node skills/security/case-management/scripts/case-manager.js list --status open --per-page 10
node skills/security/case-management/scripts/case-manager.js get --case-id <case_id>
Attach single alert
关联单个警报
node skills/security/case-management/scripts/case-manager.js attach-alert --case-id <case_id> --alert-id <alert_doc_id> --alert-index .ds-.alerts-security.alerts-default-2025.12.01-000013 --rule-id <rule_uuid> --rule-name "Malware Detection Alert"
node skills/security/case-management/scripts/case-manager.js attach-alert --case-id <case_id> --alert-id <alert_doc_id> --alert-index .ds-.alerts-security.alerts-default-2025.12.01-000013 --rule-id <rule_uuid> --rule-name "Malware Detection Alert"
Attach multiple alerts (batch)
关联多个警报(批量)
node skills/security/case-management/scripts/case-manager.js attach-alerts --case-id <case_id> --alert-ids <id1> <id2> <id3> --alert-index .ds-.alerts-security.alerts-default-2026.02.16-000016 --rule-id <rule_uuid> --rule-name "Malware Detection Alert"
node skills/security/case-management/scripts/case-manager.js attach-alerts --case-id <case_id> --alert-ids <id1> <id2> <id3> --alert-index .ds-.alerts-security.alerts-default-2026.02.16-000016 --rule-id <rule_uuid> --rule-name "Malware Detection Alert"
Add comment, update (--tags merges with existing tags, does not replace)
添加注释、更新(--tags会与现有标签合并,而非替换)
node skills/security/case-management/scripts/case-manager.js add-comment --case-id <case_id> --comment "Process tree analysis shows..."
node skills/security/case-management/scripts/case-manager.js update --case-id <case_id> --status closed --severity low --yes
Write operations (`create`, `update`) prompt for confirmation by default. Pass `--yes` to skip the prompt (required when
called by an agent).node skills/security/case-management/scripts/case-manager.js add-comment --case-id <case_id> --comment "Process tree analysis shows..."
node skills/security/case-management/scripts/case-manager.js update --case-id <case_id> --status closed --severity low --yes
写入操作(`create`、`update`)默认会提示确认。传递`--yes`可跳过提示(由agent调用时必填)。Reporting list and find results
报告列表和查找结果
When reporting results from or :
listfind- State the exact count from the JSON response (e.g., "There are 12 open cases total").
total - Present each case as a compact one-line entry: . Copy the exact title verbatim from the
<title> | <severity> | <case_id_short> | <created_at>field — do not rephrase, abbreviate, or summarize.title - If the user asked for N cases, present exactly N entries (or fewer if fewer exist). Do not add extra columns (alerts count, description, status) unless the user specifically requested them.
- Do not add information beyond what the API returned. If a field is null or missing, omit it.
- After presenting the results, stop. Do not add analysis, commentary, or observations about the cases.
报告或的结果时:
listfind- 说明JSON响应中的准确计数(例如:“总共有12个未关闭案例”)。
total - 将每个案例以紧凑的单行条目呈现:。精确复制
<title> | <severity> | <case_id_short> | <created_at>字段中的原文标题——不要改写、缩写或总结。title - 如果用户要求返回N个案例,就呈现恰好N个条目(如果数量不足则呈现现有条目)。除非用户特别要求,否则不要添加额外列(警报计数、描述、状态)。
- 不要添加API返回内容之外的信息。如果字段为null或缺失,则省略。
- 呈现结果后即停止。不要添加对案例的分析、评论或观察。
Tag conventions
标签约定
Use structured tags for machine-searchable metadata:
| Tag pattern | Example | Purpose |
|---|---|---|
| | Triage classification (benign/unknown/malicious) |
| | Confidence score 0-100 |
| | MITRE ATT&CK technique IDs |
| | Elastic agent ID for correlation |
| | Detection rule name |
使用结构化标签以实现可机器搜索的元数据:
| 标签模式 | 示例 | 用途 |
|---|---|---|
| | 分诊分类(良性/未知/恶意) |
| | 置信度分数0-100 |
| | MITRE ATT&CK技术ID |
| | Elastic agent ID,用于关联 |
| | 检测规则名称 |
Case severity mapping
案例严重性映射
| Classification | Kibana severity |
|---|---|
| benign (score 0-19) | |
| unknown (score 20-60) | |
| malicious (score 61-80) | |
| malicious (score 81-100) | |
| 分类 | Kibana 级别 |
|---|---|
| 良性(分数0-19) | |
| 未知(分数20-60) | |
| 恶意(分数61-80) | |
| 恶意(分数81-100) | |
Known limitations
已知限制
syncAlerts is security-only
syncAlerts仅适用于安全领域
The setting (enabled by default) synchronizes case status with attached alert statuses. This feature is
only available for Security Solution cases. Pass when creating a case if alert sync is not needed.
syncAlerts--sync-alerts falsesyncAlerts--sync-alerts falseRate limiting
速率限制
The Kibana API enforces rate limits. When attaching multiple alerts, the batch command automatically
handles 429 responses with retry. If using one at a time, space calls ~10 seconds apart.
attach-alertsattach-alertKibana API会实施速率限制。关联多个警报时,批量命令会自动处理429响应并重试。如果逐个使用,请将调用间隔设置为约10秒。
attach-alertsattach-alertfind --search
on Serverless
find --searchServerless上的find --search
find --searchThe parameter may return 500 errors on Kibana Serverless deployments. Use for filtering
instead, or to browse recent cases.
find --searchfind --tagslist在Kibana Serverless部署中,参数可能返回500错误。请改用进行过滤,或使用浏览近期案例。
find --searchfind --tagslistfind --tags
requires exact match
find --tagsfind --tags
需要精确匹配
find --tagsTag searches are exact-match only. works, but partial matches do not.
find --tags "agent_id:abc123"标签搜索仅支持精确匹配。有效,但部分匹配无效。
find --tags "agent_id:abc123"Kibana Cases API reference
Kibana Cases API参考
For detailed API endpoints, request/response formats, and examples, see
references/kibana-cases-api.md.
有关详细的API端点、请求/响应格式和示例,请参阅references/kibana-cases-api.md。
Examples
示例
- "Create a case for the phishing alert I triaged with severity high"
- "Search for open cases related to brute force attacks"
- "Add the investigation findings as a comment to case ID abc-123"
- “为我分诊的钓鱼警报创建一个高严重性案例”
- “搜索与暴力攻击相关的未关闭案例”
- “将调查结果作为注释添加到案例ID abc-123中”
Guidelines
指南
- Report only tool output — do not invent IDs, hostnames, IPs, or details not present in the tool response.
- Preserve identifiers from the request — use exact values the user provides in tool calls and responses.
- Confirm actions concisely using the tool's return data.
- Distinguish facts from inference — label conclusions beyond tool output as your assessment.
- When presenting case lists or search results, copy the exact title from each case. Do not paraphrase, abbreviate,
or summarize titles. Include the total count from the API field.
total - Start executing tools immediately. Do not read SKILL.md, browse directories, or list files before acting.
- 仅报告工具输出——不要编造ID、主机名、IP或工具响应中不存在的细节。
- 保留请求中的标识符——在工具调用和响应中使用用户提供的精确值。
- 使用工具的返回数据简洁地确认操作。
- 区分事实与推断——将工具输出之外的结论标记为你的评估。
- 呈现案例列表或搜索结果时,复制每个案例的原文标题。不要改写、缩写或总结标题。包含API字段中的总计数。
total - 立即执行工具。不要先读取SKILL.md、浏览目录或列出文件。
Production use
生产环境使用
- Write operations (,
create) prompt for confirmation. Passupdateor--yesto skip when called by an agent.-y - Verify and
KIBANA_URLpoint to the intended cluster before running any command.KIBANA_API_KEY - Cases are scoped to — this skill does not affect Observability or other Kibana case owners.
securitySolution
- 写入操作(、
create)会提示确认。由agent调用时,传递update或--yes以跳过。-y - 运行任何命令前,验证和
KIBANA_URL指向目标集群。KIBANA_API_KEY - 案例的作用域为——本技能不会影响Observability或其他Kibana案例所有者。
securitySolution
Environment variables
环境变量
| Variable | Required | Description |
|---|---|---|
| Yes | Kibana base URL (e.g., |
| Yes | Kibana API key for authentication |
| 变量 | 是否必填 | 描述 |
|---|---|---|
| 是 | Kibana基础URL(例如: |
| 是 | 用于身份验证的Kibana API密钥 |