日期: 2026-05-26
Branch: feature/ssp-oscal-alignment
性質: Excel 匯出樣板、匯入預覽、資料寫入路徑全面對齊 web UI
9379f2a6→1a79d6e2)| commit | 主題 |
|---|---|
9379f2a6 |
Excel 樣板 sheet 名稱對齊 web(v3.0.1)+ 補 v3.0.0 欄位 i18n |
cb850d11 |
資產清冊 → 資產(v3.0.2) |
832073b0 |
MF filled export 改從 mf-default tables 讀 components/LA |
afbcf555 |
docx import mf-default confirm 補存 props(protocol/security_auth/provider/fedramp...) |
7dbd3bc6 |
LA/Component service _to_dict 扁平 + add/update 打包 props |
3b619471 |
受評標的 export 改讀 mf-default SC + AO lookup key 修 |
3d9fe47d |
受評標的加範圍識別碼欄 + scope_description fallback to description |
7b5ddcee |
欄位名稱全面對齊 web(12 欄名) |
27c51a60 |
AO lookup 對齊 FE aoLetterKey()(description [a]→(a)) |
9db63df0 |
inventory component refs string→list + controls preview catalog matching |
64be8460 |
角色對齊 OSCAL ssp_party_role + 人員/單位補欄(title/phone/address)v3.0.4 |
80a53a1b |
角色中文 label + key-value 雙向對應 v3.0.5 |
8d09bef5 |
Excel import superset/update flow 補寫 MF defaults(Step 6c) |
42bc09d3 |
project launch:MF defaults 為 single source of truth,阻斷 template SSP clone |
b54ec0da |
template-copy:Phase 2 雙重寫入防護(後被 42bc09d3 取代為更根本修法) |
1a79d6e2 |
SSP-scoped Excel 下載補 inventory items + 舊 SSP 髒資料清理 |
| commit | 主題 |
|---|---|
20df46e |
移除 templateSsp gate,直接顯示系統元件/外部授權 tab |
51701fe |
匯入預覽 Tab 名稱對齊 + 參與人員/單位補欄位 |
351edf8 |
角色下拉改用 menuStore.sspPartyRoleMenu(對齊 docx import) |
44436ef |
資產清冊 DataTable 補顯示資產標籤/FQDN/主機名稱/軟體/作業系統 |
templateSspExists && templateSspUid,但 Bug T Phase 2 後資料存在 mf-default tables,不走 template SSP path_populate_filled_data 走 _fetch_mf_items_via_ssp(OSCAL SSP tables),但資料在 mf-default tables_run_mf_default_confirm 存 props 時用 comp_dict.get("props") = None(ParsedComponent 沒有 props 欄位)_to_dict 回 props:{...} 巢狀,FE 讀 data.provider 扁平_to_dict 展開 6 個 LA 欄位到頂層;FE add/update 送扁平欄位 → BE 打包 propsexisting_obj_map key 是 (cid, "(a)") 但 lookup 用 (cid, assessment.uid=UUID)assessment.description "[a]..." 提取字母 → "(a)"(對齊 FE aoLetterKey())_run_preview_reconcile 直接 return,不跑 catalog matching_preview_reconcile_controls,用 CatalogControlReconciler 設 matched_catalog_control_id_setup_ssp_system_implementation 若 MF defaults 有資料則跳過 template SSP clone_populate_filled_data_for_ssp hardcoded bundle.inventory_items = [](Phase 4 TODO 未完成)ssp_inventory_items by ssp_idBug T Phase 2 建立的架構:
compliance.module_frame_component_defaults — 系統元件compliance.module_frame_leveraged_authorization_defaults — 外部授權compliance.module_frame_inventory_item_defaults — 資產compliance.module_frame_system_characteristic_defaults — 受評標的template-edit 頁面讀/寫 → MF defaults
啟動專案 Step 7.6 copy() → MF defaults → project SSP OSCAL tables
_setup_ssp_system_implementation Step 3-5 → 有 MF defaults 時 skip template SSP clone
template SSP OSCAL tables 現有資料為 Excel import 的副產品,不再做為 project clone source。
DB system_menus 存 OSCAL key(無中文)
FE oscal-role.json 存中文 label
BE OSCAL_PARTY_ROLE_ZH / sheet_handlers _PARTY_ROLE_ZH_TO_KEY 雙向對應
三者均為 source code hardcoded,OSCAL 標準角色不常變,可接受
| 操作 | 說明 |
|---|---|
| DELETE ssp_components WHERE id IN (528-531, 536-539) | 刪 SSP 293/294 重複 component(8→4) |
| DELETE ssp_leveraged_authorizations WHERE id IN (74,76) | 刪 SSP 293/294 重複 LA(2→1) |
| DELETE ssp_inventory_items WHERE id IN (64-73, 84-93) | 刪 SSP 293/294 重複 inventory(20→10) |
| UPDATE module_frame_component_defaults SET description=purpose WHERE description='' | 補現有 8 筆 description 空的紀錄 |
| 版本 | 改動 |
|---|---|
| v3.0.1 | sheet 名稱對齊 web + 補 28 個 i18n key |
| v3.0.2 | 資產清冊 → 資產 |
| v3.0.3 | 受評標的加範圍識別碼欄 |
| v3.0.4 | 角色對齊 OSCAL ssp_party_role + 單位加角色欄 |
| v3.0.5 | 角色改中文 label(key-value 雙向對應) |
| 項目 | 說明 |
|---|---|
| 匯入 Phase 2 legacy alias | v3.0.0 舊樣板(單位/元件清冊/利用授權/控制項與AO)上傳會 SHEET_MISSING,需補 sheet_handlers _LEGACY_SHEET_NAME_ALIASES |
| template SSP OSCAL tables 清理 | 現有 template SSP 仍有 components/LA/inventory 資料(非 project SSP);功能上無影響但有冗餘資料;未來可評估是否清除 |
| MF 受評標的狀態預設值 | status=null 匯出/匯入均空白;若需預設 active 可在 _build_sc_from_mf_default 補 fallback |
| 系統元件 OSCAL type enum 中文化 | Excel 下拉仍顯示英文(service/hardware/etc.);FE 顯示有中文 label,Excel 可考慮同步 |