本卡屬 FR-165(母卡見「母卡」欄),批 4。只改 jedi-detection 套件 repo。工具清單 API 每筆多一個布林 supports_profile_library,由既有的 param_schema 宣告算出來,不寫死工具名。不發版、不推 Nexus。

這一棒在做什麼(白話)

「掃描工具資源管理」的設定檔分頁現在列出全部九個檢測工具(OpenVAS、Nessus、SonarQube、ZAP、Nmap 都在),但真正吃設定檔庫的只有 CINC Auditor 與 GCB 兩個。決策者 2026-10-26 裁「沒有的就先隱藏」。要隱藏,前端得知道哪些工具有接設定檔庫;這件事後端早就有宣告(FR-059:工具的參數定義裡 profile 欄位帶 options_source: profile_library),只是工具清單 API 沒把它帶出來。這張卡把它帶出來,下一張 FE 卡照旗標過濾。之後 OpenSCAP 接上設定檔庫,seed 加宣告就自動出現,前端不用改。

在哪裡

~/Projects/Jedicogy/module/jedi-python-package/jedi-detection/jedi_detection/app/service/detection_tool_service.py:76-79    list_tools():回 self._domain.get_tools(enabled=True),在這裡補旗標
~/Projects/Jedicogy/module/jedi-python-package/jedi-detection/jedi_detection/app/service/detection_tool_service.py:57,66       建構子已注入 param_schema_domain_service(DetectionToolParamSchemaDomainService)
~/Projects/Jedicogy/module/jedi-python-package/jedi-detection/jedi_detection/domain/detection_tools/service/detection_tool_param_schema_domain_service.py:25   get_current_schema(detection_tool_id) -> entity 或 None
~/Projects/Jedicogy/module/jedi-python-package/jedi-detection/jedi_detection/app/service/detection_profile_extraction_service.py:683-704   _read_declaration():既有的「找帶 options_source=profile_library 那個欄位」寫法,照抄判斷式
~/Projects/Jedicogy/module/jedi-python-package/jedi-detection/jedi_detection/domain/detection_tools/entity/detection_tool_entity.py:6-31   DetectionToolEntity dataclass,加一個 Optional[bool] 欄
~/Projects/Jedicogy/module/jedi-python-package/jedi-detection/jedi_detection/api/serializers/detection_tool.py:5-30   DetectionToolResponse,加一個 fields.Boolean

DEV 實查(2026-10-26):config.detection_tool_param_schemas 現行版(is_current)帶 profile_library 的只有 inspec 與 gcb(各 version 2)。工具清單 API GET /api/1.0/detection-tools 回 9 筆、目前欄位:uid/code/name/description/connection_type/execution_target/config_field_schema/setup_guide/status/enabled/requires_credentials/requires_target_host/credential_group_schema。

怎麼做

要寫測試

手測

紀律