Skip to content

Add WD K01 V9.0.2 query and threat-intel service#141

Draft
cc06 wants to merge 1 commit into
chaitin:mainfrom
cc06:add-wd-k01-v9-0-2
Draft

Add WD K01 V9.0.2 query and threat-intel service#141
cc06 wants to merge 1 commit into
chaitin:mainfrom
cc06:add-wd-k01-v9-0-2

Conversation

@cc06

@cc06 cc06 commented Jun 24, 2026

Copy link
Copy Markdown

接入设备

网盾 K01 威胁情报联防阻断系统(北京中盾网空防务技术有限公司)

设备版本

V9.0.2(文档标注「V9 新增接口」)

认证方式

POST /api/cms/user/login 取 token.access_token → 业务请求 Authorization: Bearer → POST /api/cms/user/logout。每次方法一段无状态会话,沿用既有 wd__k01 的认证方式。

实现方法

  • QueryAttackLog — /api/v1/logsystem/atkmntlog/query(攻击监测日志查询)
  • QueryIPList — /api/v1/security/iplist/query(IP 黑白名单查询)
  • QueryThreatIntel — /api/v1/threatintelligence/attack/query(私有情报查询)
  • AddThreatIntel — /api/v1/threatintelligence/attack/save(私有情报添加)
  • DeleteThreatIntel — /api/v1/threatintelligence/attack/delete(私有情报删除)

与已有 wd__k01(BlockIP/UnblockIP,基于 iplist/save)互补,聚焦只读查询与私有情报管理。

测试命令

cd services
npm run validate -- --service-dir wd__k01_v9-0-2
npm test -- --service-dir wd__k01_v9-0-2 --coverage
npm run pack:check

本地结果:validate 通过;31 用例全过,实现文件行 99.6% / 分支 93% / 函数 95.45%;pack:check 通过。

设备验证截图

⚠️ 待补:真机执行 query-attack-log / query-ip-list 直接读;情报写操作用测试 IP 执行 add-threat-intel → query-threat-intel → delete-threat-intel 清理后截图。

已知限制

  • 写操作(AddThreatIntel/DeleteThreatIntel)即时影响联防阻断决策,无自动回滚(Add 用 Delete 还原,Delete 需重新 Add)。
  • 暂未覆盖外联检测、受控主机分析、URL 黑白名单、应用隐身、系统状态等其余 V9 接口(后续 PR 扩展)。

New service package wd__k01_v9-0-2 covering the WD K01 V9.0.2 RESTful API
(V9 interfaces): QueryAttackLog, QueryIPList, QueryThreatIntel, AddThreatIntel,
DeleteThreatIntel. Reuses the K01 login/Bearer/logout session flow and
complements the existing wd__k01 BlockIP/UnblockIP package with read and
private threat-intel management. Wire it into the root dispatcher, bin wrapper,
and package manifest.
@cc06 cc06 force-pushed the add-wd-k01-v9-0-2 branch from 80474e1 to 8477006 Compare June 24, 2026 07:46
@innomentats

Copy link
Copy Markdown
Member

Review 阻塞:这个 service package PR 有测试文件,但我没有在 PR 描述、评论或改动文件中找到真实的测试截图证据(图片链接或提交的图片文件)。请补充能证明该 service package 跑通的截图,例如 npm test -- --service-dir <service> 通过,以及 OctoBus 实例调用/联调成功的截图。

@innomentats innomentats requested a review from kingfs June 26, 2026 09:46
@innomentats innomentats marked this pull request as draft June 26, 2026 12:48
@innomentats

Copy link
Copy Markdown
Member

Reviewer note: this PR currently has merge conflicts with the target branch, so it cannot be merged or reviewed safely in its current state.

Please rebase or merge the latest base branch, resolve the conflicts, and make sure GitHub Actions pass again. I am marking/keeping this PR as draft until the conflicts are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants