Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
901fb16
feat: add slack channel support
Jul 10, 2026
e2d84b0
Merge remote-tracking branch 'origin/dev' into codex/slack-channel
Jul 15, 2026
c575fcd
fix(hub): isolate plugin installation failures
duguwanglong Jul 15, 2026
061acc8
chore: sync main into dev after main-1f96945a07cc
github-actions[bot] Jul 15, 2026
2b81e90
Merge pull request #565 from AgentFlocks/chore/sync-main-into-dev-mai…
duguwanglong Jul 15, 2026
a9eda82
fix(hub): roll back failed plugin changes
duguwanglong Jul 16, 2026
0364cf9
fix(model): reveal provider API keys on demand
duguwanglong Jul 16, 2026
06f3839
Merge pull request #564 from AgentFlocks/fix/plugin-refresh-error-iso…
stephamie7 Jul 16, 2026
1efc3f1
Merge pull request #566 from AgentFlocks/fix/model-list-api-key-display
stephamie7 Jul 16, 2026
5530814
feat(tdp): align threat tool and action names
Jul 17, 2026
5d0821f
docs(tdp): clarify threat query routing
Jul 17, 2026
58c0270
Merge pull request #567 from AgentFlocks/feat/align-tdp-threat-tool-n…
duguwanglong Jul 17, 2026
a510545
fix(tui): select first provider with models
Jul 17, 2026
08d664c
Merge pull request #568 from AgentFlocks/fix/tui-default-provider-sel…
stephamie7 Jul 17, 2026
5520722
fix(tdp): remove default incident duration cap
Jul 17, 2026
6925280
Merge pull request #572 from AgentFlocks/fix/tdp-incident-duration-fi…
duguwanglong Jul 17, 2026
d158a40
Merge latest dev into slack channel
Jul 18, 2026
c5b6221
fix(channel): gate slack member allowlist field
Jul 18, 2026
96c7d1a
fix(channel): persist slack allowlist removal
Jul 20, 2026
7b6faf0
fix: improve slack channel setup
Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flocks/flockshub/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -14573,7 +14573,7 @@
"type": "device",
"name": "Chaitin SafeLine WAF",
"description": "Chaitin SafeLine WAF OpenAPI integration.",
"version": "1.0.0",
"version": "1.0.1",
"category": "integration",
"tags": [
"waf",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Chaitin SafeLine WAF",
"description": "Chaitin SafeLine WAF OpenAPI integration.",
"descriptionCn": "长亭雷池 WAF OpenAPI 接入。",
"version": "1.0.0",
"version": "1.0.1",
"author": "Flocks Team",
"license": "MIT",
"category": "integration",
Expand Down
7 changes: 4 additions & 3 deletions .flocks/plugins/skills/tdp-use/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ API 参数和适用场景见 [references/api-reference.md](references/api-refere
- API 调用必须以当前 tool schema 为准,优先使用 schema 暴露的顶层语义化参数;列表类工具常见 `keyword`、`severity`、`cur_page`、`page_size`、`sort_by`,但 `tdp_log_search.sql` 是过滤表达式不是完整 SQL,禁止 `SELECT/FROM`,控制返回数量用 `size`,`terms` 可不传 `sql`,外部攻击结果筛选用 `result_list`。
- 用户说“告警”“告警记录”“告警日志”“明细记录”“查某 IP 的告警”时,默认走 `tdp_log_search`
- 用户说“看板”“概览”“趋势”“统计”时,先用 `tdp_dashboard_status`
- 用户说“威胁事件”“外部攻击”“攻击事件”“事件总览”“事件趋势”时,优先用 `tdp_incident_list` 或 `tdp_threat_inbound_attack`
- 用户说“实时监控”“威胁监控列表”时,优先用正式 API 工具 `tdp_threat_monitor_list`;不要用 Cookie 认证的旧 Web CLI 代替
- 用户说“告警主机”“受害主机”“主机下的事件”时,优先用 `tdp_host_threat_list`
- 用户明确说“智能聚合”“聚合攻击事件”“智能聚合事件”“攻击过程”“事件攻击时间线”时,优先用 `tdp_threat_intelligent_aggregation`
- 用户说“外部攻击”“外部攻击严重性分布”时,优先用 `tdp_threat_external_attack`
- 用户说“威胁事件列表”“实时监控”“威胁实时监控列表”“威胁监控列表”时,优先用正式 API 工具 `tdp_threat_monitor_list`;不要用 Cookie 认证的旧 Web CLI 代替
- 用户说“告警主机”“受害主机”“主机下的事件”时,优先用 `tdp_threat_alert_host`
- 用户说“系统状态”“核心服务状态”“数据库状态”时,优先用 `tdp_system_status`
- 用户说“MDR”“研判结果”“研判统计”时,优先用 `tdp_mdr_alert_list`
- 用户说“脆弱性”“弱口令”“登录入口”“上传接口”“API 风险”“隐私数据”时,走对应资产或风险类工具
Expand Down
60 changes: 31 additions & 29 deletions .flocks/plugins/skills/tdp-use/references/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
| 看安全态势、趋势、TOP 统计 | `tdp_dashboard_status` | `status` / `security` / `threat_event` / `alert_level_trend` | 通常可空参;列表类 action 可补 `machine_type`、`severity`、分页参数 |
| 查原始告警日志 | `tdp_log_search` | `search` | `time_from`、`time_to`、`sql` |
| 查字段聚合统计 | `tdp_log_search` | `terms` | `time_from`、`time_to`、`term` |
| 查威胁事件列表 | `tdp_incident_list` | `search` | `time_from`、`time_to`;可补 `severity`、`phase`、`result`、`keyword`、分页参数 |
| 查威胁实时监控列表 | `tdp_threat_monitor_list` | 默认 | 时间范围不超过 24 小时;可补 `sql`、`net_data_type`、`assets_group`、分页参数 |
| 看事件时间线 / 结果分布 / 攻击者明细 | `tdp_incident_list` | `timeline` / `result_distribution` / `attacker_ip_detail` | 通常先要 `incident_id` |
| 查外部攻击严重性分布 | `tdp_threat_inbound_attack` | 默认 | `time_from`、`time_to`;可补 `severity`、`result_list`、`keyword` |
| 查告警主机汇总 / 主机下事件 | `tdp_host_threat_list` | `summary` / `events` | `summary` 可补 `severity`、`direction`、`threat_type`、`keyword`;`events` 至少要 `asset_machine` |
| 查智能聚合事件 / 聚合攻击事件 | `tdp_threat_intelligent_aggregation` | `incident_search` | `time_from`、`time_to`;可补 `severity`、`phase`、`result`、`keyword`、分页参数 |
| 查威胁事件列表 / 威胁实时监控列表 | `tdp_threat_monitor_list` | 默认 | 时间范围不超过 24 小时;可补 `sql`、`net_data_type`、`assets_group`、分页参数 |
| 看事件时间线 / 结果分布 / 攻击者明细 | `tdp_threat_intelligent_aggregation` | `attack_timeline` / `attack_result_distribution` / `attacker_ip_detail` | 通常先要 `incident_id` |
| 查外部攻击严重性分布 | `tdp_threat_external_attack` | 默认 | `time_from`、`time_to`;可补 `severity`、`result_list`、`keyword` |
| 查告警主机列表 / 指定主机威胁列表 | `tdp_threat_alert_host` | `alert_host_list` / `host_threat_list` | `alert_host_list` 可补 `severity`、`direction`、`threat_type`、`keyword`;`host_threat_list` 至少要 `asset_machine` |
| 查脆弱性 | `tdp_vulnerability_list` | 默认 | 常见补 `time_from`、`time_to`、`severity`、`status`、`keyword`、分页参数 |
| 查弱口令 | `tdp_login_weakpwd_list` | 默认 | 常见补 `time_from`、`time_to`、`data`、`result`、`app_class`、`keyword` |
| 查服务 / 主机 / 框架资产 | `tdp_machine_asset_list` | `service_list` / `host_asset_list` / `web_app_framework_list` | 可空参;常见补 `service`、`service_class`、`is_public`、`keyword` |
Expand Down Expand Up @@ -90,8 +90,8 @@ tdp_log_search(time_from=today_start, time_to=today_end, sql="...")
| `tdp_log_search` | `size` | `page_size`、`cur_page` | `/api/v1/log/searchBySql` 只支持返回数量控制,不支持分页参数 |
| `tdp_log_search.sql` | 过滤表达式 | `SELECT * FROM alert` | TDP 只接受类似 WHERE 条件的表达式,不接受完整 SQL 查询 |
| `tdp_log_search(action="terms")` | 可只传 `term` | 强制补 `sql` | `/api/v1/log/terms` 的 `sql` 是可选过滤条件 |
| `tdp_threat_inbound_attack` | `result_list` | `result` | API 文档字段为 `condition.result_list` |
| `tdp_incident_list` | `result` | `result_list` | 事件搜索 API 文档字段为 `condition.result` |
| `tdp_threat_external_attack` | `result_list` | `result` | API 文档字段为 `condition.result_list` |
| `tdp_threat_intelligent_aggregation` | `result` | `result_list` | 事件搜索 API 文档字段为 `condition.result` |


示例:
Expand All @@ -109,19 +109,21 @@ tdp_log_search(time_from=today_start, time_to=today_end, sql="...")

| 用户实际要查什么 | 推荐 tool | 说明 |
|---|---|---|
| 威胁事件 / 攻击事件 / 事件总览 | `tdp_incident_list` / `tdp_threat_inbound_attack` | 事件维度,平台已聚合 |
| 实时监控 / 威胁监控列表 | `tdp_threat_monitor_list` | 实时威胁监控列表,单次时间范围不得超过 24 小时 |
| 智能聚合事件 / 聚合攻击事件 / 攻击过程 | `tdp_threat_intelligent_aggregation` | 智能聚合维度,一条事件可关联多条告警 |
| 外部攻击严重性分布 | `tdp_threat_external_attack` | 外部攻击统计维度 |
| 威胁事件列表 / 实时监控 / 威胁监控列表 | `tdp_threat_monitor_list` | 威胁实时监控列表,单次时间范围不得超过 24 小时 |
| 告警 / 告警日志 / 原始检测记录 | `tdp_log_search` | 告警维度,一条就是一条原始记录 |
| 告警主机 / 受害主机 / 主机下事件 | `tdp_host_threat_list` | 主机维度,按主机聚合 |
| 告警主机 / 受害主机 / 主机下事件 | `tdp_threat_alert_host` | 主机维度,按主机聚合 |
| 漏洞、弱口令、登录入口、API 风险等 | 对应资产或风险类 tool | 资产/风险维度,不要混进日志查询 |

建议按下面的用词来路由:

- 提到“告警”“最近一小时告警”“查某 IP 的告警”时,默认优先 `tdp_log_search`
- 提到“威胁事件”“攻击事件”“看下最近有什么事件”时,优先 `tdp_incident_list`
- 提到“实时监控”“威胁监控列表”时,优先 `tdp_threat_monitor_list`
- 提到“哪些主机被打了”“告警主机”“受害主机”时,优先 `tdp_host_threat_list`
- 用户没说清时,默认把“明细”理解为告警日志,把“总览/聚合”理解为事件
- 明确提到“智能聚合”“聚合攻击事件”“智能聚合事件”“攻击过程”时,优先 `tdp_threat_intelligent_aggregation`
- 提到“外部攻击”“外部攻击严重性分布”时,优先 `tdp_threat_external_attack`
- 提到“威胁事件列表”“实时监控”“威胁实时监控列表”“威胁监控列表”时,优先 `tdp_threat_monitor_list`
- 提到“哪些主机被打了”“告警主机”“受害主机”时,优先 `tdp_threat_alert_host`
- 用户没说清时,默认把“事件列表/实时监控”理解为威胁监控列表,把“总览/聚合”理解为智能聚合事件

## 高频场景

Expand Down Expand Up @@ -279,18 +281,18 @@ machine = '192.168.1.100'
- 统计某时间段内最多的威胁名称
- 聚合源 IP、目的 IP、URL、威胁类型

### 4. 威胁事件列表
### 4. 智能聚合事件查询

推荐:

- `tdp_incident_list`
- `action=search`
- `tdp_threat_intelligent_aggregation`
- `action=incident_search`

最小可运行参数集:

```json
{
"action": "search",
"action": "incident_search",
"time_from": 1741536000,
"time_to": 1741622400,
"severity": [3, 4],
Expand All @@ -308,27 +310,27 @@ machine = '192.168.1.100'

高频 action:

- `search`: 事件列表
- `incident_search`: 查询智能聚合后的攻击事件列表;不是“威胁-实时监控”中的威胁事件列表
- `top_attacked_entity`: 受攻击实体
- `result`: 事件研判结果
- `timeline`: 时间线
- `alert_search`: 事件下告警列表
- `result_distribution`: 结果分布
- `attack_success`: 攻击成功统计
- `attack_timeline`: 攻击过程时间线
- `attack_alert_list`: 攻击过程告警详情
- `attack_result_distribution`: 成功、失败、尝试的数量分布
- `attacker_ip_list`: 攻击者 IP 列表
- `attacker_ip_detail`: 攻击者 IP 详情

时间线示例:

```json
{
"action": "timeline",
"action": "attack_timeline",
"incident_id": "b62899499fec914d6246137eed3b6ec4-1777334454",
"time_from": 1777305600,
"time_to": 1777391999
}
```

`timeline` 会默认传 `show_attack=true`。如果 TDP 仍返回 `show_attack is false`,说明该事件当前不支持攻击过程展开,改用 `result`、`alert_search` 或回退浏览器查看事件详情。
`attack_timeline` 会默认传 `show_attack=true`。如果 TDP 仍返回 `show_attack is false`,说明该事件当前不支持攻击过程展开,改用 `attack_success`、`attack_alert_list` 或回退浏览器查看事件详情。

返回结果重点关注:

Expand Down Expand Up @@ -357,13 +359,13 @@ machine = '192.168.1.100'
}
```

注意:这里的攻击结果字段是 `result_list`,来自 API 文档的 `condition.result_list`;不要使用事件列表里的 `result` 参数名。
注意:这里的攻击结果字段是 `result_list`,来自 API 文档的 `condition.result_list`;不要使用智能聚合事件查询里的 `result` 参数名。

告警主机汇总:

```json
{
"action": "summary",
"action": "alert_host_list",
"time_from": 1741536000,
"time_to": 1741622400,
"severity": [3, 4],
Expand All @@ -374,13 +376,13 @@ machine = '192.168.1.100'
}
```

`summary` 默认覆盖全部常见威胁类型,且 `threat_characters` 默认不限制。用户明确要“失陷主机”时再传 `threat_characters=["is_compromised"]`。
`alert_host_list` 默认覆盖全部常见威胁类型,且 `threat_characters` 默认不限制。用户明确要“失陷主机”时再传 `threat_characters=["is_compromised"]`。

某主机下事件:

```json
{
"action": "events",
"action": "host_threat_list",
"asset_machine": "asset-123",
"time_from": 1741536000,
"time_to": 1741622400
Expand Down
26 changes: 13 additions & 13 deletions .flocks/plugins/tools/device/tdp_v3_3_10/_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ fixtures:
assert:
success: true

tdp_incident_list:
- label: "Search incidents (page 1)"
label_cn: "查询威胁事件列表(第 1 页)"
tdp_threat_intelligent_aggregation:
- label: "Search intelligent aggregation incidents (page 1)"
label_cn: "查询智能聚合威胁事件(第 1 页)"
tags: [smoke, incidents]
params:
action: search
action: incident_search
cur_page: 1
page_size: 20
assert:
Expand All @@ -66,12 +66,12 @@ fixtures:
params:
action: top_attacked_entity

tdp_host_threat_list:
- label: "Get threat host summary"
label_cn: "查询威胁主机摘要"
tdp_threat_alert_host:
- label: "List alert hosts"
label_cn: "查询告警主机列表"
tags: [smoke, threats]
params:
action: summary
action: alert_host_list
cur_page: 1
page_size: 20
assert:
Expand Down Expand Up @@ -147,15 +147,15 @@ fixtures:
action: search
size: 20

tdp_threat_inbound_attack:
- label: "Get inbound attack overview (last 24 hours)"
label_cn: "查询外部入侵攻击概览(最近 24 小时)"
tdp_threat_external_attack:
- label: "Get external attack severity distribution (last 24 hours)"
label_cn: "查询外部攻击严重性分布(最近 24 小时)"
tags: [smoke, threats]
params: {}

tdp_threat_monitor_list:
- label: "List real-time threats (last 24 hours)"
label_cn: "查询威胁实时监控列表(最近 24 小时)"
- label: "List monitored threats (last 24 hours)"
label_cn: "查询威胁监控列表(最近 24 小时)"
tags: [smoke, threats]
params:
cur_page: 1
Expand Down
Loading
Loading