security-case-management by elastic/agent-skills
npx skills add https://github.com/elastic/agent-skills --skill security-case-management通过 Kibana Cases API 管理 SOC 案例。所有案例都限定在 securitySolution 范围内——此技能仅在 Elastic Security 内操作。案例会出现在 Kibana Security 中,可以分配给分析师,关联到警报,并通过连接器推送到外部事件管理系统。
首次使用前,请在 skills/security 目录下安装依赖项:
cd skills/security && npm install
设置所需的环境变量(或将其添加到工作区根目录的 .env 文件中):
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"
owner: securitySolution广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
所有命令均从工作区根目录运行。所有输出均为 JSON。直接调用工具——不要先读取技能文件或探索工作区。对于 attach-alert/attach-alerts,Kibana API 要求 --rule-id 和 --rule-name(如果未知,请使用 --rule-id unknown --rule-name unknown)。批量操作使用 attach-alerts,它会自动处理速率限制重试,并在 API 调用之间间隔 2 秒。
| 任务 | 要调用的工具(按顺序) |
|---|---|
| 创建案例 | case_manager create (标题, 描述, 标签, 严重性) |
| 查找主机的案例 | case_manager find --tags "agent_id:<id>" 或 find --search "<主机名>" |
| 将警报附加到案例 | case_manager attach-alert (案例-id, 警报-id, 警报-索引, 规则-id/名称) |
| 添加调查笔记 | case_manager add-comment (案例-id, 评论文本) |
| 列出最近打开的案例 | case_manager list --status open --per-page <n> |
| 更新案例 | case_manager update (案例-id, 状态/严重性/标签 更改) |
查找主机的案例: 使用 find --search "<主机名>" 在标题、描述和评论中按主机名搜索。或者,如果已知代理 ID,则使用 find --tags "agent_id:<代理_id>"。始终添加 --status open 以仅筛选活动案例。报告 API 响应中确切的 total 计数和每个案例的逐字标题。
# 创建(默认启用 syncAlerts;使用 --sync-alerts false 禁用)
node skills/security/case-management/scripts/case-manager.js create --title "主机1上的恶意 DLL 侧加载" --description "通过 DLL 侧加载检测到加密剪切板恶意软件..." --tags "classification:malicious" "confidence:88" "mitre:T1574.002" --severity critical --yes
# 查找、列出、获取
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 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-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"
# 添加评论,更新(--tags 与现有标签合并,不会替换)
node skills/security/case-management/scripts/case-manager.js add-comment --case-id <case_id> --comment "进程树分析显示..."
node skills/security/case-management/scripts/case-manager.js update --case-id <case_id> --status closed --severity low --yes
写入操作(create, update)默认会提示确认。传递 --yes 可以跳过提示(当由代理调用时必需)。
报告 list 或 find 的结果时:
total 计数(例如,“总共有 12 个打开的案例”)。<标题> | <严重性> | <案例_id_短> | <创建时间>。从 title 字段中逐字复制确切的标题——不要改写、缩写或总结。使用结构化标签实现机器可搜索的元数据:
| 标签模式 | 示例 | 用途 |
|---|---|---|
classification:<值> | classification:malicious | 分类(良性/未知/恶意) |
confidence:<分数> | confidence:85 | 置信度分数 0-100 |
mitre:<技术> | mitre:T1574.002 | MITRE ATT&CK 技术 ID |
agent_id:<id> | agent_id:550888e5-... | 用于关联的 Elastic 代理 ID |
rule:<名称> | rule:Malicious Behavior Detection | 检测规则名称 |
| 分类 | Kibana 严重性 |
|---|---|
| 良性(分数 0-19) | low |
| 未知(分数 20-60) | medium |
| 恶意(分数 61-80) | high |
| 恶意(分数 81-100) | critical |
syncAlerts 设置(默认启用)将案例状态与附加的警报状态同步。此功能仅适用于 Security Solution 案例。如果不需要警报同步,请在创建案例时传递 --sync-alerts false。
Kibana API 强制执行速率限制。当附加多个警报时,attach-alerts 批量命令会自动处理 429 响应并进行重试。如果逐个使用 attach-alert,请将调用间隔约 10 秒。
find --search在 Kibana Serverless 部署上,find --search 参数可能返回 500 错误。请改用 find --tags 进行筛选,或使用 list 浏览近期案例。
find --tags 需要精确匹配标签搜索仅支持精确匹配。find --tags "agent_id:abc123" 有效,但部分匹配无效。
有关详细的 API 端点、请求/响应格式和示例,请参阅 references/kibana-cases-api.md。
total 字段中的总数。create, update)会提示确认。当由代理调用时,传递 --yes 或 -y 以跳过。KIBANA_URL 和 KIBANA_API_KEY 是否指向预期的集群。securitySolution 范围内——此技能不影响 Observability 或其他 Kibana 案例所有者。| 变量 | 必需 | 描述 |
|---|---|---|
KIBANA_URL | 是 | Kibana 基础 URL(例如,https://my-kibana.kb.cloud.example.com) |
KIBANA_API_KEY | 是 | 用于身份验证的 Kibana API 密钥 |
每周安装量
130
仓库
GitHub 星标数
89
首次出现
11 天前
安全审计
安装于
cursor118
opencode110
gemini-cli110
github-copilot110
codex110
amp110
Manage SOC cases through the Kibana Cases API. All cases are scoped to securitySolution — 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.
Install dependencies before first use from the skills/security directory:
cd skills/security && npm install
Set the required environment variables (or add them to a .env file in the workspace root):
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"
owner: securitySolutionAll 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, --rule-id and --rule-name are required by the Kibana API (use --rule-id unknown --rule-name unknown if unknown). Use attach-alerts for batch with automatic rate-limit retry and 2-second spacing between API calls.
| Task | Tools to call (in order) |
|---|---|
| Create a case | case_manager create (title, description, tags, severity) |
| Find cases for a host | case_manager find --tags "agent_id:<id>" or find --search "<hostname>" |
| Attach alert to case | case_manager attach-alert (case-id, alert-id, alert-index, rule-id/name) |
| Add investigation notes | case_manager add-comment (case-id, comment text) |
| List recent open cases | case_manager list --status open --per-page <n> |
Finding cases for a host: Use find --search "<hostname>" to search by hostname across title, description, and comments. Alternatively use find --tags "agent_id:<agent_id>" if the agent ID is known. Always add --status open to filter to active cases only. Report the exact total count and each case title verbatim from the API response.
# Create (syncAlerts enabled by default; disable with --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
# 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>
# 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"
# 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"
# Add comment, update (--tags merges with existing tags, does not replace)
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).
When reporting results from list or find:
total count from the JSON response (e.g., "There are 12 open cases total").<title> | <severity> | <case_id_short> | <created_at>. Copy the exact title verbatim from the title field — do not rephrase, abbreviate, or summarize.Use structured tags for machine-searchable metadata:
| Tag pattern | Example | Purpose |
|---|---|---|
classification:<value> | classification:malicious | Triage classification (benign/unknown/malicious) |
confidence:<score> | confidence:85 | Confidence score 0-100 |
mitre:<technique> | mitre:T1574.002 | MITRE ATT&CK technique IDs |
agent_id:<id> |
| Classification | Kibana severity |
|---|---|
| benign (score 0-19) | low |
| unknown (score 20-60) | medium |
| malicious (score 61-80) | high |
| malicious (score 81-100) | critical |
The syncAlerts setting (enabled by default) synchronizes case status with attached alert statuses. This feature is only available for Security Solution cases. Pass --sync-alerts false when creating a case if alert sync is not needed.
The Kibana API enforces rate limits. When attaching multiple alerts, the attach-alerts batch command automatically handles 429 responses with retry. If using attach-alert one at a time, space calls ~10 seconds apart.
find --search on ServerlessThe find --search parameter may return 500 errors on Kibana Serverless deployments. Use find --tags for filtering instead, or list to browse recent cases.
find --tags requires exact matchTag searches are exact-match only. find --tags "agent_id:abc123" works, but partial matches do not.
For detailed API endpoints, request/response formats, and examples, see references/kibana-cases-api.md.
total field.create, update) prompt for confirmation. Pass --yes or -y to skip when called by an agent.KIBANA_URL and KIBANA_API_KEY point to the intended cluster before running any command.securitySolution — this skill does not affect Observability or other Kibana case owners.| Variable | Required | Description |
|---|---|---|
KIBANA_URL | Yes | Kibana base URL (e.g., https://my-kibana.kb.cloud.example.com) |
KIBANA_API_KEY | Yes | Kibana API key for authentication |
Weekly Installs
130
Repository
GitHub Stars
89
First Seen
11 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
cursor118
opencode110
gemini-cli110
github-copilot110
codex110
amp110
OpenClaw 安全 Linux 云部署指南:私有优先、SSH隧道、Podman容器化
36,400 周安装
| Update case | case_manager update (case-id, status/severity/tags changes) |
agent_id:550888e5-... |
| Elastic agent ID for correlation |
rule:<name> | rule:Malicious Behavior Detection | Detection rule name |