總覽:三大功能怎麼串起來
資料流向:合規框架(定義控制項全集)→ 合規資源庫(包裝 Profile + 預設 SSP 範本)→ 專案管理(啟動專案時 clone 出 AP 控制項與 SSP,跑稽核任務、產出評估結果)。
module_frames.oscal_profile_uid soft-ref 包裝一個 OSCAL Profile(baseline)。assessment_plan_controls,把該資源庫的樣板 SSP(module_frames.template_ssp_id → oscal.ssps is_template=True)clone 成該專案 SSP(FR-036;取代原 *_defaults)。project_extensions.module_frame_id 記錄源頭。assessment_results.assessment_plan_id 溯源到 AP;每輪稽核 = SSP 一版本(group_id 不變、version_no +1)。findings 批次生成一筆 poams(ar_finding_id 綁定,status=open)。稽核生命週期 stage:audit → poam → closed,前置條件 audit→poam 需所有控制項填 verdict、poam→closed 需該 AP 全部 POA&M closed。POA&M open→in_progress 會退回對應 AO workflow 讓執行人員補件。assessment_plan_tasks 經 *_workflow_mapping / *_workflow_execution_mapping 橋接到工作流程引擎(workflow / job_executions,不在本圖展開)。OSCAL 分層對照(哪些在 OSCAL 架構裡)
| OSCAL 層 | 對應功能 | 主要 Table | 性質 |
|---|---|---|---|
| 控制層 Control | 合規框架 | catalogs / catalog_groups / catalog_controls / catalog_control_parts / parameters / profiles / profile_controls | OSCAL 標準 |
| 實作層 Implementation | 專案管理 (SSP) | ssps / system-characteristics / system-implementation (components / inventory / leveraged-auth) / control-implementation / objectives | OSCAL 標準 |
| 評估層 Assessment | 專案管理 (AP / AR) | assessment_plans / groups / controls / tasks ;assessment_results / datas / controls / evidences / findings | OSCAL 標準 |
| 評估層 — POA&M | 專案管理 (矯正追蹤) | poams(單表;對應 OSCAL POA&M model,本專案以扁平表實作;ar_finding_id 接 findings) | 本專案擴充 |
| 共用 Shared | 跨全層 | oscal_metadatas / documents / parties / roles / responsible_parties / props / links / locations / remarks | OSCAL 標準 |
| 本專案擴充 | 三大功能皆有 | frameworks / framework_versions / control_mapping / catalog_control_assessments ;module_frame* 全系列 ;projects / project_* / participants ;*_extensions / *_mapping / 程序書表 | 本專案擴充 |
① 合規框架(OSCAL 控制層)
框架 → 版本 → Catalog(群組/控制項/參數/部分)→ Profile(篩選)。控制項全集的定義來源。
oscal_frameworks oscal 擴充 本專案擴充(框架基本資訊)
合規框架主檔(CMMC / ISO27001 / NIST 等的頂層定義);一個框架可有多個版本。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK,自動遞增 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | UUID | No | 框架唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| code | String(50) | No | 框架代碼,如 CMMC_L2、ISO27001:2022 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | String(255) | No | 框架名稱,如 CMMC 2.0 Level 2 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| authority | String(255) | No | 發佈機關,如 DoD / NIST / ISO | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | No | 框架描述 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| publish_status | String(20) | No | draft / published / archived(預設 draft) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| main_version | String(50) | No | 主要版號 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
oscal_framework_versions oscal 擴充 本專案擴充(框架版本)
框架的不同發佈版本(如 CMMC 2.0 / 2023 / 2024);pid 自參考支援版本樹。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | UUID | No | 版本唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| framework_id | Integer | No | FK→oscal_frameworks.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| version | String(50) | No | 版本號,如 2.0 / 2023 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| release_date | Date | Yes | 發佈日期 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| publish_status | String(20) | No | draft / published / archived | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| file_uid | String(36) | Yes | 原始上傳 PDF 的 file_uid(編輯頁 iframe 用) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| pid | Integer | Yes | 父版本 id(self-ref,SET NULL) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
catalogs oscal OSCAL OSCAL 標準(Catalog 文件)
OSCAL Catalog 文件實例(控制項目錄 metadata + 群組樹);1:1 對應一個框架版本。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼(unique) | uuid | Req | uuid | catalog · catalog.required=[metadata,uuid] |
| framework_version_id | Integer | No | FK→oscal_framework_versions.id(CASCADE) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| document_id | Integer | Yes | FK→oscal_documents.id(CASCADE),原始文件 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| metadata_id | Integer | No | FK→oscal_metadatas.id(CASCADE) | metadata | Req | 免改(FK) | catalog · catalog.required=[metadata,uuid] |
| status | String(20) | No | draft / published / deprecated | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | Yes | 文件描述 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
catalog_groups oscal OSCAL OSCAL 標準(Catalog Group 階層)
控制項階層分組(如 Annex A / A.5 / A.5.1);parent_group_id 自參考支援多層。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 群組 UUID(在此 Catalog 版本內唯一) | — | — | 免改(內部UUID,OSCAL group 無 uuid) | —(內部/審計/產品欄,無 OSCAL 對應) |
| catalog_id | Integer | No | FK→catalogs.id(CASCADE) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| name | String(100) | No | 群組識別名稱,如 A.5 / Annex A | group.id | Opt | 改名→group_id | catalog · group.required=[title](id/class 選填) |
| description | Text | Yes | 群組描述 | group.title | Req | 改名→title | catalog · group.required=[title](id/class 選填) |
| order_no | Integer | No | 同父群組下排序序號 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| parent_group_id | Integer | Yes | 父群組 id(self-ref, CASCADE) | groups(巢狀) | Opt | 免改(FK) | catalog · group.required=[title](id/class 選填) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| group_classNEW | String(100) | Yes | 群組的分類標記;對應 OSCAL group.class。 | group.class | Opt | 新增 | catalog · group.required=[title](id/class 選填) |
catalog_controls oscal OSCAL OSCAL 標準(Control 控制項)
安全控制項詳情(代碼 / 標題 / 敘述 / 指引),屬於特定控制項群組。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 控制項 UUID(unique) | — | — | 免改(內部UUID,OSCAL control 無 uuid) | —(內部/審計/產品欄,無 OSCAL 對應) |
| group_id | Integer | No | FK→catalog_groups.id(CASCADE) | — | — | 免改(FK→catalog_groups) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_id | String(100) | No | 控制項識別碼,如 AC-1 / A.5.1 | control.id | Req | 免改(id 衝突的物件前綴名) | catalog · control.required=[id,title] |
| control_title | Text | No | 控制項標題 | control.title | Req | 改名→title?(評估) | catalog · control.required=[id,title] |
| description | Text | Yes | 控制項敘述 / 聲明 | part(statement) prose | Opt | —(OSCAL control 無 description,屬 part) | catalog · control.required=[id,title] |
| guidance | Text | Yes | 控制項指引 | part(guidance) prose | Opt | —(屬 part) | catalog · control.required=[id,title] |
| order_no | Integer | No | 群組內排序 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_classNEW | String(100) | Yes | 控制項的分類標記(如 family / SP800-53);對應 OSCAL control.class。 | control.class | Opt | 新增 | catalog · control.required=[id,title] |
catalog_control_parameters oscal OSCAL OSCAL 標準(Control Parameter)
控制項可配置參數(param_id / 標籤 / 預設值),允許在 Profile / SSP 覆寫。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 參數 UUID(unique) | — | — | 免改(內部UUID,OSCAL param 無 uuid) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_id | Integer | No | FK→catalog_controls.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| param_id | String(100) | No | 參數識別碼 | parameter.id | Opt | 免改(id 物件前綴名) | catalog · parameter.required=[](無必填) |
| label | String(255) | Yes | 參數標籤 | parameter.label | Opt | 免改 | catalog · parameter.required=[](無必填) |
| default_value | Text | Yes | 預設值 | parameter.values[] | Opt | —(OSCAL 為 values 陣列) | catalog · parameter.required=[](無必填) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| param_classNEW | String(100) | Yes | 參數的分類標記;對應 OSCAL param.class。 | parameter.class | Opt | 新增 | catalog · parameter.required=[](無必填) |
| depends_onNEW | String(100) | Yes | 相依的另一參數 id;對應 OSCAL param.depends-on。 | parameter.depends-on | Opt | 新增 | catalog · parameter.required=[](無必填) |
| usageNEW | Text | Yes | 參數用途說明;對應 OSCAL param.usage。 | parameter.usage | Opt | 新增 | catalog · parameter.required=[](無必填) |
| remarksNEW | Text | Yes | 參數備註;對應 OSCAL param.remarks。 | parameter.remarks | Opt | 新增 | catalog · parameter.required=[](無必填) |
catalog_control_parts oscal OSCAL OSCAL 標準(Control Part)
控制項組成部分(statement / objective / guidance / example),多部分結構。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 部分 UUID(unique) | — | — | 免改(內部UUID,OSCAL part 無 uuid) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_id | Integer | No | FK→catalog_controls.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| part_name | String(50) | No | statement / objective / guidance / example | part.name | Req | 改名→name?(評估;name 非衝突) | catalog · part.required=[name] |
| prose改 | Text | No | 部分內容文字🔧 約束放寬 原:NOT NULL(不可為空)→ 新:可為 NULL。原因:OSCAL part.prose 為選填,現過嚴會擋住匯入。 | part.prose | Opt | 免改(但 NOT NULL→放寬 nullable) | catalog · part.required=[name] |
| order_no | Integer | No | 排序 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| part_idNEW | String(100) | Yes | 部分的 OSCAL 字串識別碼,供交叉參照;與內部 uid 分離。對應 OSCAL part.id。 | part.id | Opt | 新增(id 物件前綴名) | catalog · part.required=[name] |
| nsNEW | String(255) | Yes | 命名空間 URI,區分不同來源的 part;對應 OSCAL part.ns。 | part.ns | Opt | 新增 | catalog · part.required=[name] |
| part_classNEW | String(100) | Yes | 部分的分類標記;對應 OSCAL part.class。 | part.class | Opt | 新增 | catalog · part.required=[name] |
| titleNEW | Text | Yes | 部分的標題;對應 OSCAL part.title。 | part.title | Opt | 新增 | catalog · part.required=[name] |
catalog_control_assessments oscal 擴充 本專案擴充(評估樣板)
控制項的評估執行樣板(非 OSCAL 標準);產生 AP 任務時的可重用樣板。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | UUID | No | 唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| control_id | Integer | No | FK→catalog_controls.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | String(1000) | No | 樣板名稱,如 Official / Internal | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| version | String(50) | Yes | 樣板版本 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | Yes | 樣板敘述 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
profiles oscal OSCAL OSCAL 標準(Profile 篩選層)
從已發佈 Catalog 篩選的控制項集合(不複製控制內容);Catalog 與 SSP 之間的 filter layer。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼(unique) | uuid | Req | uuid | profile · profile.required=[imports,metadata,uuid] |
| catalog_id | Integer | No | FK→catalogs.id,參考的 Catalog | imports[].href | Req | —(壓成單一FK,見 profile_imports) | profile · profile.required=[imports,metadata,uuid] |
| metadata_id | Integer | No | FK→oscal_metadatas.id(CASCADE) | metadata | Req | 免改(FK) | profile · profile.required=[imports,metadata,uuid] |
| document_id | Integer | No | FK→oscal_documents.id(CASCADE) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| status | String(20) | No | draft / published / deprecated | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | Yes | 文件描述 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
profile_controls oscal OSCAL OSCAL 標準(Profile Control 篩選記錄)
記錄 Profile 對某 Catalog 控制項的 include/exclude 決策(不複製內容)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼(unique) | — | — | 免改(內部) | —(內部/審計/產品欄,無 OSCAL 對應) |
| profile_id | Integer | No | FK→profiles.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| catalog_control_id | Integer | No | FK→catalog_controls.id | import.include-controls.with-ids | — | —(扁平化) | profile · import.required=[include-all|include-controls] |
| include | Boolean | No | 是否納入(預設 True) | include-controls/exclude-controls | — | —(布林扁平) | profile · import.required=[include-all|include-controls] |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
profile_imports oscal OSCAL 🆕 規劃新增 OSCAL 標準(profile.imports)
OSCAL profile.imports(陣列);取代「單一 catalog_id + 扁平 profile_controls」,支援多來源 / include-all / matching pattern。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼 | — | — | 新增(內部) | —(內部/審計/產品欄,無 OSCAL 對應) |
| profile_id | Integer | No | FK→profiles.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| import_catalog | UUID | Yes | 被 import 的 Catalog uid(href 合成 #uuid) | import.href | Opt | 新增(存 catalog uuid) | profile · import.required=[include-all|include-controls] |
| include_all | Boolean | No | include-all 旗標(預設 False) | import.include-all | — | 新增 | profile · import.required=[include-all|include-controls] |
| with_child_controls | Boolean | Yes | select-control-by-id.with-child-controls | select-control-by-id.with-child-controls | Opt | 新增 | profile · import.required=[include-all|include-controls] |
| matching_pattern | String(255) | Yes | select glob pattern | select-control-by-id.matching.pattern | Opt | 新增 | profile · import.required=[include-all|include-controls] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
oscal_control_mapping oscal 擴充 本專案擴充(跨框架對應)
不同框架版本間的控制項對應(如 CMMC 2.0 ↔ ISO27001:2022),用於溯源/映射。
PK:(source_version_id, source_control_id, target_version_id, target_control_id) 複合
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| source_version_id | Integer | No | FK→oscal_framework_versions.id(CASCADE),來源版本 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| source_control_id | String(50) | No | 來源控制項 id(控制代碼) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| target_version_id | Integer | No | FK→oscal_framework_versions.id(CASCADE),目標版本 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| target_control_id | String(50) | No | 目標控制項 id(控制代碼) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
② 合規資源庫(Module Frame)
包裝一個 OSCAL Profile + 指向一份樣板 SSP(oscal.ssps is_template=True,FR-036 起取代 *_defaults 系列表);新專案啟動時 clone 樣板 SSP 成專案 SSP。樣板 SSP 是 SSP 預設內容的 single source of truth。
module_frame_*_defaults 系列表不再使用。範本內容改存成一份樣板 SSP(oscal.ssps 的 is_template=True),由 module_frames.template_ssp_id 指向;啟動專案時 clone 樣板 SSP → 專案 SSP。
*_defaults + module_frame_reference_documents / _mappings 共 8 張表已退役(資料已遷入樣板 SSP、讀寫路徑已改源),實體待 Phase 2 DROP,本文件不再列出。module_frames compliance 擴充 本專案擴充(資源庫父表)
合規資源庫主檔:包裝一個 OSCAL Profile(baseline)+ 指向一份樣板 SSP(template_ssp_id,FR-036);新專案啟動時 clone 樣板 SSP 作為專案 SSP。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | String(36) | No | 唯一識別碼 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | String(255) | No | 名稱 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| group | String(255) | No | 群組 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| template_uid | String(255) | Yes | 範本 UID | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| frequency | String(255) | No | 稽核頻率 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| version | String(255) | No | 版本 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| last_execute_date | DateTime | Yes | 最後執行日 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| next_execute_date | DateTime | Yes | 下次執行日 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| enable | Integer | No | 啟用(預設 0) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | Yes | 描述 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| provider | String(255) | Yes | 提供者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| is_delete | Integer | No | 軟刪除(0/1) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| oscal_framework_version_uid | String(36) | No | soft-ref → oscal_framework_versions.uid | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| oscal_profile_uid | String(36) | No | soft-ref → profiles.uid(包裝的 Profile) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| template_ssp_idFR-036 | Integer | Yes | 樣板 SSP ID(soft-ref → oscal.ssps.id, is_template=True)。啟動專案時 clone 此樣板 SSP 成專案 SSP;FR-036 取代原 module_frame_*_defaults 表族。 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| tenant_id | Integer | No | 租戶(RLS) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| org_unit_id | Integer | Yes | 組織單位 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
module_frames_trans compliance 擴充 本專案擴充(i18n 翻譯表)
module_frames 的多語系翻譯(name / group / description)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| module_frame_id | Integer | No | FK→module_frames.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| language_code | String(10) | No | 語言代碼 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | String(255) | Yes | 翻譯名稱 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| group | String(255) | Yes | 翻譯群組 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | Yes | 翻譯描述 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
profile_assessment_workflow_mapping oscal 擴充 擴充(Profile↔工作流程)
把 Profile 控制項的評估樣板(catalog_control_assessment)綁定到工作流程範本,定義評估自動化流程(paw_mapping)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| profile_control_id | Integer | No | FK→profile_controls.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| catalog_control_assessment_id | Integer | No | FK→catalog_control_assessments.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| workflow_template_id | Integer | No | FK→compliance.workflow_templates.id(flow-engine) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
③ 專案管理(Project / AP / AR / SSP)
GRC 專案啟動後:clone 出 AP(評估計畫)與 SSP(系統安全計畫),跑稽核任務(橋接 flow-engine),產出 AR(評估結果與發現)。
▸ 專案核心(Project / 參與者 / 報告)
projects compliance 擴充 擴充(GRC 專案容器)
GRC 專案核心表(定義於 jedi-project 套件);每個專案 = 一次稽核活動。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | UUID | No | 唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| tenant_id | Integer | No | 租戶(RLS) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| org_unit_id | Integer | Yes | 組織單位 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | String(255) | No | 專案標題 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | Yes | 專案描述 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| start_date | DateTime | Yes | 開始時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| end_date | DateTime | Yes | 結束時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| status | String(50) | Yes | pending / active / completed | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_extensions compliance 擴充 擴充(1:1 延伸 projects)
GRC 專案延伸欄位(綁啟動時的 module_frame、負責人、軟刪除)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| project_id | Integer | No | FK→projects.id(unique 1:1, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| module_frame_id | Integer | Yes | 啟動時的 module_frame(無 FK,clone 後獨立) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| owner_id | Integer | Yes | 專案負責人(soft → users.id) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| deleted_at | DateTime | Yes | 軟刪除時間(NULL=未刪) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_participants compliance 擴充 擴充(專案級參與者)
專案層級參與者與角色。
PK:(project_id, user_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| project_id | Integer | No | 專案 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| user_id | Integer | No | 使用者 id(PK,FK→users.id) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| role | String(20) | No | manager / reviewer / auditor / viewer | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_group_participants compliance 擴充 擴充(群組級參與者)
特定控制項群組下的參與者與角色。
PK:(project_id, group_id, user_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| project_id | Integer | No | 專案 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| group_id | Integer | No | 群組 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| user_id | Integer | No | 使用者 id(PK, FK→users.id) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| role | String(20) | No | manager / reviewer / auditor / viewer | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_control_participants compliance 擴充 擴充(控制項級參與者)
特定控制項下的參與者與角色(control_id 指 assessment_plan_controls.id)。
PK:(project_id, group_id, control_id, user_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| project_id | Integer | No | 專案 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| group_id | Integer | No | 群組 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| control_id | Integer | No | 控制項 id(PK,soft → assessment_plan_controls.id) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| user_id | Integer | No | 使用者 id(PK, FK→users.id) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| role | String(20) | No | manager / reviewer / auditor / viewer | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
control_group_participants compliance 擴充 擴充(群組關聯參與者)
群組層級(非個別控制項)的參與者。
PK:(project_id, group_id, user_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| project_id | Integer | No | 專案 id(PK,便查) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| group_id | Integer | No | 群組 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| user_id | Integer | No | 使用者 id(PK, FK→users.id) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| role | String(20) | No | manager / reviewer / auditor / viewer | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
process_participants compliance 擴充 擴充(流程參與者)
特定流程中的參與者與角色。
PK:(project_id, process_id, user_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| project_id | Integer | No | 專案 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| process_id | Integer | No | 流程 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| user_id | Integer | No | 使用者 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| role | String(20) | No | manager / reviewer / auditor / viewer | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_org_unit_mapping compliance 擴充 擴充(Project↔OrgUnit)
專案與組織單位的多對多關聯。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| project_id | Integer | No | FK→projects.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| org_unit_id | Integer | No | FK→org_units.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_system_characteristic_mapping compliance 擴充 擴充(Project↔SSP 系統特性)
專案與 SSP 系統特性的多對多關聯。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| project_id | Integer | No | FK→projects.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| system_characteristic_id | Integer | No | FK→ssp_system_characteristics.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_assessment_plan_mapping compliance 擴充 擴充(Project↔AP 橋接)
專案與評估計畫(AP)的對應橋接。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| project_id | Integer | No | FK→projects.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| assessment_plan_id | Integer | No | FK→oscal.assessment_plans.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_summary_reports compliance 擴充 擴充(專案總結報告)
專案總結報告主檔。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | String(50) | No | 唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| project_id | Integer | No | FK→projects.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | Text | No | 報告名稱 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| summary | Text | Yes | 報告摘要 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| is_delete | Integer | No | 軟刪除(0/1) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
project_summary_report_histories compliance 擴充 擴充(報告歷史)
總結報告編輯/還原歷史快照。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | String(50) | No | 唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| report_id | Integer | No | FK→project_summary_reports.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| type | String(10) | No | U=更新 / R=還原 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | Text | Yes | 名稱快照 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| summary | Text | Yes | 摘要快照 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
▸ 評估計畫 AP(Assessment Plan)+ 工作流程橋接
assessment_plans oscal OSCAL OSCAL 標準(AP 核心)
評估計畫主檔;一次具體執行的稽核。profile_id/ssp_id 為溯源 soft-ref。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼(unique) | assessment-plan.uuid | Req | uuid | ap · assessment-plan.required=[uuid,metadata,import-ssp,reviewed-controls] |
| metadata_id | Integer | No | FK→oscal_metadatas.id(CASCADE) | metadata | Req | 免改(FK) | ap · assessment-plan.required=[uuid,metadata,import-ssp,reviewed-controls] |
| document_id | Integer | No | FK→oscal_documents.id(CASCADE) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| profile_id | String(36) | Yes | 來源 Profile(溯源 soft) | — | — | —(追溯) | —(內部/審計/產品欄,無 OSCAL 對應) |
| ssp_id | String(36) | Yes | 來源 SSP(溯源 soft) | import-ssp.href | Req | —(stringified int,見 import_ssp) | ap · import-ssp.required=[href] |
| title | String(200) | No | 稽核計畫名稱 | — | — | —(OSCAL 在 metadata.title) | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | Yes | 說明 | — | — | —(產品;OSCAL 在 metadata) | —(內部/審計/產品欄,無 OSCAL 對應) |
| status | String(30) | No | draft / active / completed / archived | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| start_date | Date | Yes | 開始日 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| end_date | Date | Yes | 結束日 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| frozen_at | DateTime | Yes | 凍結時間(結構定版) | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| import_sspNEW | UUID | Yes | 本 AP 評估的 SSP UUID;對應 OSCAL import-ssp.href。既有 ssp_id(存 stringified int 追溯)保留並存。 | import-ssp.href | Req | 新增(存 ssp uuid) | ap · import-ssp.required=[href] |
assessment_plan_groups oscal OSCAL OSCAL 標準(AP 群組快照)
AP freeze 當下的控制項群組結構快照(對應 Catalog Group)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | UUID | No | 唯一識別碼(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| assessment_plan_id | Integer | No | FK→assessment_plans.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| parent_group_id | Integer | Yes | 父群組(self-ref, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| name | String(100) | No | 群組名稱 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | Yes | 說明 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| order_no | Integer | No | 排序 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
assessment_plan_controls oscal OSCAL OSCAL 標準(AP 控制項快照)
AP 納入的控制項快照(不與 Catalog 建 FK;進度追蹤的核心承載點)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼(unique) | — | — | 免改(內部) | ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id] |
| assessment_plan_id | Integer | No | FK→assessment_plans.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| group_id | Integer | No | FK→assessment_plan_groups.id(CASCADE) | — | — | —(擴充群組) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_id | String(50) | No | 控制項識別碼,如 AC-02 | select-control-by-id.control-id | Req | 免改 | ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id] |
| control_title | Text | Yes | 標題快照 | — | — | —(snapshot) | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | Yes | statement / description | — | — | —(snapshot) | —(內部/審計/產品欄,無 OSCAL 對應) |
| guidance | Text | Yes | guidance | — | — | —(snapshot) | —(內部/審計/產品欄,無 OSCAL 對應) |
| include | Boolean | No | 是否納入(預設 True) | include-controls/exclude | — | —(布林扁平) | ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id] |
| order_no | Integer | Yes | 排序 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_plan_tasks oscal OSCAL OSCAL 標準(AP Task)
稽核任務(評估物件 / Assessment Object);實際要執行的稽核行為。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 唯一識別碼(unique) | task.uuid | Req | uuid | ap · task.required=[uuid,type,title] |
| assessment_plan_id | Integer | No | FK→assessment_plans.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| catalog_control_assessment_id | Integer | Yes | 來源評估樣板(soft) | — | — | —(來源) | —(內部/審計/產品欄,無 OSCAL 對應) |
| task_code | String(50) | No | Task 編碼,如 AP-AC02-01 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title | String(1000) | No | 標題 | task.title | Req | 免改 | ap · task.required=[uuid,type,title] |
| description | Text | Yes | 說明 | task.description | Opt | 免改 | ap · task.required=[uuid,type,title] |
| assessment_methods | JSON | No | examine / interview / test | — | — | —(屬 activity/assessment-method,非 task) | —(內部/審計/產品欄,無 OSCAL 對應) |
| task_type改 | String(50) | Yes | manual / automated / hybrid🔧 欄位語意衝突 原:此欄存 manual / automated / hybrid(佔用了 OSCAL task.type 的名稱)→ 新:manual/automated/hybrid 移到 prop,task_type 改存 OSCAL task.type 值域 milestone / action。 | task.type | Req | —(詞彙 manual/hybrid→milestone/action) | ap · task.required=[uuid,type,title] |
| status | String(50) | No | pending / in_progress / complete | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| sequence | Integer | Yes | 執行順序 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_task_controls oscal OSCAL OSCAL 標準(Task↔Control M:N)
稽核任務與控制項的多對多接合。
PK:(task_id, control_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| task_id | Integer | No | FK→assessment_plan_tasks.id(PK, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| control_id | Integer | No | FK→assessment_plan_controls.id(PK, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
assessment_plan_extensions compliance 擴充 擴充(AP 1:1 延伸)
為 AP 綁 main workflow_execution 與範本 snapshot(不改 jedi-oscal)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| assessment_plan_id | Integer | No | FK→oscal.assessment_plans.id(unique 1:1, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| workflow_execution_uid | UUID | Yes | 綁定的 main workflow_execution.uid | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| flow_template_snapshot_uid | UUID | Yes | 採用的範本 snapshot.uid | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
assessment_plan_task_workflow_mapping oscal 擴充 擴充(Task↔範本 橋接)
稽核任務 ↔ 工作流程範本(→ flow-engine 子系統)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| assessment_plan_task_id | Integer | No | FK→assessment_plan_tasks.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| workflow_template_id | Integer | No | FK→compliance.workflow_templates.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
assessment_plan_task_workflow_execution_mapping oscal 擴充 擴充(Task↔執行 橋接)
稽核任務 ↔ 工作流程執行實例(→ flow-engine 子系統)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| assessment_plan_task_id | Integer | No | FK→assessment_plan_tasks.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| workflow_execution_id | Integer | No | FK→compliance.workflow_executions.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
workflow_execution_control_mapping compliance 擴充 擴充(執行↔框架版本×控制項)
工作流程執行 ↔ 框架版本 × 控制項(3 元組)。
PK:(workflow_execution_id, version_id, control_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| workflow_execution_id | Integer | No | FK→compliance.workflow_executions.id(PK, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| version_id | Integer | No | FK→oscal.oscal_framework_versions.id(PK, CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| control_id | String(50) | No | 控制項 id(PK) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
▸ 評估結果 AR(Assessment Results)
assessment_results oscal OSCAL OSCAL 標準(AR 文件主檔)
OSCAL assessment-results 文件主檔(可含多次執行結果)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | AR 文件 UUID | assessment-results.uuid | Req | uuid | ar · assessment-results.required=[uuid,metadata,import-ap,results] |
| metadata_id | Integer | No | FK→oscal_metadatas.id(RESTRICT) | metadata | Req | 免改(FK) | ar · assessment-results.required=[uuid,metadata,import-ap,results] |
| document_id | Integer | No | FK→oscal_documents.id(RESTRICT) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| assessment_plan_id | Integer | No | FK→assessment_plans.id(CASCADE),來源 AP | import-ap.href | Req | —(內部FK,見 import_ap) | ar · import-ap.required=[href] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| import_apNEW | UUID | Yes | 本 AR 來源的 AP UUID;對應 OSCAL import-ap.href。既有 assessment_plan_id(FK)保留並存。 | import-ap.href | Req | 新增(存 ap uuid) | ar · import-ap.required=[href] |
assessment_result_datas oscal OSCAL OSCAL 標準(results[] 單次執行)
單次稽核執行結果(run_no 區分多輪)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | Result Data UUID | result.uuid | Req | uuid | ar · result.required=[uuid,title,description,start,reviewed-controls] |
| assessment_result_id | Integer | No | FK→assessment_results.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| run_no | Integer | No | 第幾次執行 | — | — | —(產品多輪) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title改 | String(200) | Yes | 本次標題🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL result.title 必填。 | result.title | Req | 免改(nullable→NN) | ar · result.required=[uuid,title,description,start,reviewed-controls] |
| started_at改 | DateTime(tz) | Yes | 開始時間🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:對應 OSCAL result.start 必填。 | result.start | Req | 改名→start(nullable→NN) | ar · result.required=[uuid,title,description,start,reviewed-controls] |
| completed_at | DateTime(tz) | Yes | 完成時間 | result.end | Opt | 改名→end | ar · result.required=[uuid,title,description,start,reviewed-controls] |
| remarks | String(1000) | Yes | 備註 | result.remarks | Opt | 免改 | ar · result.required=[uuid,title,description,start,reviewed-controls] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| descriptionNEWREQ | Text | No | 本次稽核執行的描述;對應 OSCAL result.description(必填)。 | result.description | Req | 新增 | ar · result.required=[uuid,title,description,start,reviewed-controls] |
assessment_result_controls oscal OSCAL OSCAL 標準(reviewed-controls 判定)
單次執行中某控制項的稽核判定結果(verdict)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 控制項稽核結果 UUID | — | — | 免改(內部;OSCAL 無此物件) | ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id] |
| assessment_result_data_id | Integer | No | FK→assessment_result_datas.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_id | String(50) | No | 控制項識別碼(snapshot) | reviewed-controls.select-control-by-id.control-id | — | 免改 | ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id] |
| control_title | String(300) | Yes | 標題(snapshot) | — | — | —(snapshot) | —(內部/審計/產品欄,無 OSCAL 對應) |
| verdict改 | String(30) | Yes | pass / fail / partial / na(launch 時 NULL)🔧 詞彙對照 本欄值 pass / fail / partial / na → 匯出對應 OSCAL finding-target status.state:pass→satisfied、fail/partial→not-satisfied(partial/na 另以 implementation-status 或 remarks 補述)。 | finding-target.status.state | — | —(詞彙 pass/fail→satisfied/not-satisfied,且掛 finding-target) | ar · finding-target.required=[type,target-id,status];status.state required |
| confidence | Integer | Yes | 信心 0–100 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| rationale | String(1000) | Yes | 判定理由 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| remarks | String(1000) | Yes | 補充說明 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_result_evidences oscal OSCAL OSCAL 標準(evidence 證據)
支撐控制項判定的證據(file / link / text / system)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 證據 UUID | — | — | 免改(內部;relevant-evidence 無 uuid) | ar · relevant-evidence.required=[description] |
| assessment_result_control_id | Integer | No | FK→assessment_result_controls.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| evidence_type | String(30) | No | file / link / text / system | — | — | —(產品分類) | —(內部/審計/產品欄,無 OSCAL 對應) |
| description改 | String(1000) | Yes | 證據說明🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL relevant-evidence.description 必填。 | relevant-evidence.description | Req | 免改(nullable→NN) | ar · relevant-evidence.required=[description] |
| file_id | Integer | Yes | 上傳檔案 id(soft) | — | — | —(soft) | —(內部/審計/產品欄,無 OSCAL 對應) |
| reference_url | String(500) | Yes | 外部連結 / 系統 URL | relevant-evidence.href | Opt | 改名→href | ar · relevant-evidence.required=[description] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_result_findings oscal OSCAL OSCAL 標準(findings 發現事項)
稽核發現事項(缺失/觀察/建議);POA&M 主要來源。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | Finding UUID | finding.uuid | Req | uuid | ar · finding.required=[uuid,title,description,target] |
| assessment_result_control_id | Integer | No | FK→assessment_result_controls.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| ao_uid | String(36) | Yes | 對應的 Assessment Object(AP Task)uid(soft) | — | — | —(產品 AO 對應) | —(內部/審計/產品欄,無 OSCAL 對應) |
| category | String(50) | No | deficiency / observation / recommendation | — | — | —(產品;OSCAL 用 prop) | —(內部/審計/產品欄,無 OSCAL 對應) |
| severity | String(20) | No | low / medium / high / critical | — | — | —(產品;OSCAL 用 prop) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title改 | String(300) | Yes | 標題🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL finding.title 必填。 | finding.title | Req | 免改(nullable→NN) | ar · finding.required=[uuid,title,description,target] |
| description | String(2000) | No | 描述 | finding.description | Req | 免改 | ar · finding.required=[uuid,title,description,target] |
| recommendation | String(2000) | Yes | 改善建議(可轉 POA&M) | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_result_observations oscal OSCAL 🆕 規劃新增 OSCAL 標準(observation)
OSCAL result.observations[]。目前只有 control 層簡化 evidence,缺 methods/collected/subjects/origins。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | observation.uuid(REQ) | observation.uuid | Opt* | 新增 | ar · observation.required=[uuid,description,methods,collected](observations 選填) |
| assessment_result_data_id | Integer | No | FK→assessment_result_datas.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | No | observation.description(REQ) | observation.description | Opt* | 新增 | ar · observation.required=[uuid,description,methods,collected](observations 選填) |
| methods | JSONB | No | observation.methods(REQ)EXAMINE/INTERVIEW/TEST | observation.methods | Opt* | 新增 | ar · observation.required=[uuid,description,methods,collected](observations 選填) |
| types | JSONB | Yes | observation.types | observation.types | Opt | 新增 | ar · observation.required=[uuid,description,methods,collected](observations 選填) |
| collected | DateTime(tz) | No | observation.collected(REQ) | observation.collected | Opt* | 新增 | ar · observation.required=[uuid,description,methods,collected](observations 選填) |
| expires | DateTime(tz) | Yes | observation.expires | observation.expires | Opt | 新增 | ar · observation.required=[uuid,description,methods,collected](observations 選填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_result_risks oscal OSCAL 🆕 規劃新增 OSCAL 標準(risk)
OSCAL result.risks[](含 status / characterization / response / risk-log / threat-id)。目前完全沒表。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | risk.uuid(REQ) | risk.uuid | Opt* | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| assessment_result_data_id | Integer | No | FK→assessment_result_datas.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title | String(300) | No | risk.title(REQ) | risk.title | Opt* | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| description | Text | No | risk.description(REQ) | risk.description | Opt* | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| statement | Text | No | risk.statement(REQ) | risk.statement | Opt* | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| status | String(30) | No | risk.status(REQ)open/investigating/remediating/closed… | risk.status | Opt* | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| characterizations | JSONB | Yes | characterizations[](facets) | risk.characterizations | Opt | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| mitigating_factors | JSONB | Yes | mitigating-factors[] | risk.mitigating-factors | Opt | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| remediations | JSONB | Yes | remediations/response[] | risk.remediations(response) | Opt | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| risk_log | JSONB | Yes | risk-log entries | risk.risk-log | Opt | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| threat_ids | JSONB | Yes | threat-ids[] | risk.threat-ids | Opt | 新增 | ar · risk.required=[uuid,title,description,statement,status](risks 選填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
assessment_result_finding_targets oscal OSCAL 🆕 規劃新增 OSCAL 標準(finding.target)
OSCAL finding.target(finding 核心:type / target-id / status / implementation-status)。目前用 control 層 verdict 近似。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| finding_id | Integer | No | FK→assessment_result_findings.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| target_type | String(40) | No | finding-target.type(REQ)statement-id/objective-id | finding-target.type | Req | 新增(type builtin→target_type) | ar · finding-target.required=[type,target-id,status];status.state required |
| target_id | String(100) | No | finding-target.target-id(REQ) | finding-target.target-id | Req | 新增 | ar · finding-target.required=[type,target-id,status];status.state required |
| status_state | String(30) | No | status.state(REQ)satisfied/not-satisfied | finding-target.status.state | Req | 新增 | ar · finding-target.required=[type,target-id,status];status.state required |
| implementation_status | String(30) | Yes | implementation-status.state | finding-target.implementation-status.state | Opt | 新增 | ar · finding-target.required=[type,target-id,status];status.state required |
| related_observations | JSONB | Yes | related-observations(observation-uuid[]) | finding.related-observations[].observation-uuid | Opt | 新增 | ar · finding.required=[uuid,title,description,target] |
| related_risks | JSONB | Yes | related-risks(risk-uuid[]) | finding.related-risks[].risk-uuid | Opt | 新增 | ar · finding.required=[uuid,title,description,target] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
▸ 矯正計畫 POA&M(Plan of Action & Milestones)
poams compliance 擴充 擴充(對應 OSCAL POA&M model)
矯正計畫項目(Plan of Action & Milestones):每筆對應一個未通過控制項的 finding,追蹤其矯正進度。close_round 判定時,若有 fail/partial control,從對應 findings 批次生成(status=open);驅動稽核生命週期 audit→poam→closed 推進。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK(BaseModel) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | String(36) | No | 唯一識別碼 | poam-item.uuid | Req | 免改 | OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema) |
| assessment_plan_id | Integer | No | soft → oscal.assessment_plans.id(所屬 AP) | — | — | —(soft-ref) | —(內部/審計/產品欄,無 OSCAL 對應) |
| ar_finding_id | Integer | No | soft → oscal.assessment_result_findings.id(矯正的缺失,1:1) | poam-item.related-findings[] | Opt | —(單值 vs OSCAL 多筆) | OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema) |
| control_identifier | String(50) | No | 控制項識別碼(自 ar_control 帶入) | — | — | —(產品帶入) | —(內部/審計/產品欄,無 OSCAL 對應) |
| ao_uid | String(36) | No | soft → assessment_plan_tasks.uid(評估物件 AO;退件補件用) | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| status | String(30) | No | open / in_progress / closed(預設 open) | — | — | —(產品 prop) | —(內部/審計/產品欄,無 OSCAL 對應) |
| closed_at | DateTime | Yes | 結案時間(status→closed 時自動寫,reopen 時清除) | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| tenant_id | Integer | No | 租戶(RLS) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| org_unit_id | Integer | Yes | 組織單位 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| remediation_plan | Text | Yes | 矯正計畫(open→in_progress 必填) | — | — | —(產品;≠ description) | —(內部/審計/產品欄,無 OSCAL 對應) |
| due_date | Date | Yes | 矯正期限 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| assignee_uid | String(36) | Yes | soft → users.uid(矯正負責人) | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime | No | 建立時間(BaseModel) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime | No | 更新時間(BaseModel) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者(BaseModel) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者(BaseModel) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| import_sspNEW | String(36) | Yes | 本矯正計畫對應的 SSP UUID;對應 OSCAL import-ssp.href。 | import-ssp.href | Opt | 新增(存 ssp uuid) | OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema) |
| titleNEWREQ | String(255) | No | 矯正項目標題;對應 OSCAL poam-item.title(必填)。 | poam-item.title | Req | 新增 | OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema) |
| descriptionNEWREQ | Text | No | 矯正項目的問題描述;對應 OSCAL poam-item.description(必填)。與既有 remediation_plan(矯正計畫做法)語意不同。 | poam-item.description | Req | 新增 | OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema) |
▸ 系統安全計畫 SSP(System Security Plan)
ssps oscal OSCAL OSCAL 標準(SSP 文件主檔)
SSP 主檔(某系統在特定 Profile 下的安全基線);group_id 跨版本不變、version_no 每輪稽核 +1。FR-036 起亦作為資源庫「樣板 SSP」載體(is_template=True)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | SSP UUID | system-security-plan.uuid | Req | uuid | ssp · system-security-plan.required=[uuid,metadata,import-profile,system-characteristics,system-implementation,control-implementation] |
| profile_id | Integer | No | FK→profiles.id | import-profile.href | Req | —(內部FK,見 import_profile) | ssp · import-profile.required=[href] |
| metadata_id | Integer | No | FK→oscal_metadatas.id | metadata | Req | 免改(FK) | ssp · system-security-plan.required=[uuid,metadata,import-profile,system-characteristics,system-implementation,control-implementation] |
| document_id | Integer | No | FK→oscal_documents.id | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | Yes | 描述 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| group_id | UUID | No | SSP identity(跨版本不變) | — | — | —(SSP 版本identity,產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| version_no | Integer | No | 版本號(每輪 +1) | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| status | String(20) | No | draft / ready / archived | — | — | —(產品 draft/ready/archived) | —(內部/審計/產品欄,無 OSCAL 對應) |
| template_module_frame_id | Integer | Yes | 源頭 module_frame(lineage, soft) | — | — | —(FR-036 lineage) | —(內部/審計/產品欄,無 OSCAL 對應) |
| is_templateFR-036 | Boolean | No | 是否為樣板 SSP(True=module_frame 範本源頭,clone 成專案 SSP 的母本;專案 SSP 一律 False)。預設 false。SSP 清單 / AP / dashboard / 匯出一律排除 is_template=True。FR-036 新增。 | — | — | —(FR-036,非 OSCAL) | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| import_profileNEW | UUID | Yes | 本 SSP 套用的 Profile(基準線)UUID;對應 OSCAL import-profile.href(匯出時合成 href="#uuid")。既有 profile_id(內部 FK)保留並存。 | import-profile.href | Req | 新增(存 profile uuid) | ssp · import-profile.required=[href] |
ssp_system_characteristics oscal OSCAL OSCAL 標準(system-characteristics)
SSP 系統特性(FIPS 199 分類、系統識別、範圍);1:1 對應 SSP。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 外部識別碼 | — | — | 免改(內部UUID,OSCAL sys-char 無 uuid) | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| system_security_plan_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| owner_uid | String(50) | Yes | 系統擁有者(soft → users.uid) | — | — | —(產品 soft-ref) | —(內部/審計/產品欄,無 OSCAL 對應) |
| name | String(255) | No | 評估目標名稱 | system-characteristics.system-name | Req | 改名→system_name | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| description改 | Text | Yes | 描述🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL system-characteristics.description 必填。 | system-characteristics.description | Req | 免改(nullable→NN) | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| system_identifier | String(100) | No | 系統識別碼,如 AIDC-DPCE | system-ids[].id | Req | —(OSCAL 為陣列+identifier-type) | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| security_sensitivity_level | String(20) | No | low / moderate / high(FIPS 199) | security-sensitivity-level | Opt | 免改(連字號) | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| target_type | String(50) | No | it_system / management_system / logical_scope | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| scope_description改 | Text | Yes | 範圍 / 邊界描述🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:對應 OSCAL authorization-boundary.description 必填。 | authorization-boundary.description | Req | —(巢狀;nullable→NN) | ssp · authorization-boundary.required=[description] |
| status改 | String(20) | No | active / archived🔧 詞彙改值 原值:active / archived → 新值:operational / under-development / under-major-modification / disposition / other。原因:對齊 OSCAL status.state 值域。 | status.state | Req | —(巢狀+詞彙 active/archived→OSCAL state) | ssp · status.required=[state] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| system_name_shortNEW | String(100) | Yes | 系統簡稱;對應 OSCAL system-name-short。 | system-name-short | Opt | 新增(連字號) | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| date_authorizedNEW | Date | Yes | 系統獲得授權(ATO)的日期;對應 OSCAL date-authorized。 | date-authorized | Opt | 新增(連字號) | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| network_architecture_descriptionNEW | Text | Yes | 網路架構描述;對應 OSCAL network-architecture.description。 | network-architecture.description | Opt* | 新增 | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| data_flow_descriptionNEW | Text | Yes | 資料流描述;對應 OSCAL data-flow.description。 | data-flow.description | Opt* | 新增 | ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary] |
| security_objective_confidentialityNEW | String(50) | Yes | 機密性安全衝擊等級(fips-199-low / moderate / high);對應 OSCAL security-impact-level.security-objective-confidentiality。 | security-impact-level.security-objective-confidentiality | Opt* | 新增 | ssp · security-impact-level.required=[三 objective](本身選填) |
| security_objective_integrityNEW | String(50) | Yes | 完整性安全衝擊等級;對應 OSCAL security-impact-level.security-objective-integrity。 | security-impact-level.security-objective-integrity | Opt* | 新增 | ssp · security-impact-level.required=[三 objective](本身選填) |
| security_objective_availabilityNEW | String(50) | Yes | 可用性安全衝擊等級;對應 OSCAL security-impact-level.security-objective-availability。 | security-impact-level.security-objective-availability | Opt* | 新增 | ssp · security-impact-level.required=[三 objective](本身選填) |
ssp_system_implementations oscal OSCAL OSCAL 標準(system-implementation 容器)
system-implementation block 頂層;scope_type+scope_id 多型(SSP 或 ModuleFrame),1:1 per scope。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | OSCAL block uid | — | — | 免改(內部UUID,system-implementation 無 uuid) | ssp · system-implementation.required=[components] |
| scope_type | String(20) | No | ssp / module_frame | — | — | —(產品多型) | —(內部/審計/產品欄,無 OSCAL 對應) |
| scope_id | Integer | No | 依 scope_type 指向(soft FK) | — | — | —(產品多型) | —(內部/審計/產品欄,無 OSCAL 對應) |
| remarks | Text | Yes | block remarks | system-implementation.remarks | Opt | 免改 | ssp · system-implementation.required=[components] |
| props_jsonb | JSONB | Yes | block props | system-implementation.props | Opt | 改名→props?(評估) | ssp · system-implementation.required=[components] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_components oscal OSCAL OSCAL 標準(component 抽象元件)
授權邊界內的抽象元件(服務/軟體/硬體/政策…14 type);可關聯繼承授權。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | Component UUID | system-component.uuid | Req | uuid | ssp · system-component.required=[uuid,type,title,description,status] |
| ssp_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| component_type | String(40) | No | 14 OSCAL type 或 other(software/hardware/service/policy…) | system-component.type | Req | 免改(type builtin 物件前綴名) | ssp · system-component.required=[uuid,type,title,description,status] |
| title | String(255) | No | 標題 | system-component.title | Req | 免改 | ssp · system-component.required=[uuid,type,title,description,status] |
| description改 | Text | Yes | 描述🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL component.description 必填。 | system-component.description | Req | 免改(nullable→NN) | ssp · system-component.required=[uuid,type,title,description,status] |
| purpose | Text | Yes | 用途 | system-component.purpose | Opt | 免改 | ssp · system-component.required=[uuid,type,title,description,status] |
| status改 | String(20) | Yes | operational / under-development…🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL component.status 必填。 | system-component.status.state | Req | —(巢狀;nullable→NN) | ssp · system-component.required=[uuid,type,title,description,status] |
| leveraged_authorization_uid | UUID | Yes | soft → ssp_leveraged_authorizations.uid | — | — | —(產品 soft-ref) | —(內部/審計/產品欄,無 OSCAL 對應) |
| props | JSONB | Yes | props(implementation-point / cmmc:category…) | system-component.props | Opt | 免改 | ssp · system-component.required=[uuid,type,title,description,status] |
| tenant_id | Integer | No | RLS(soft → tenants.id) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| org_unit_id | Integer | Yes | soft → org_units.id | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| is_active | Boolean | No | 軟刪除(預設 True) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_inventory_items oscal OSCAL OSCAL 標準(inventory-item 實際資產)
實際部署資產(具體 host / IP / asset_tag);FR-032 asset_type + 資訊系統 hybrid soft-ref。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | InventoryItem UUID | inventory-item.uuid | Req | uuid | ssp · inventory-item.required=[uuid,description] |
| ssp_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| description | Text | No | 描述(OSCAL 必填) | inventory-item.description | Req | 免改 | ssp · inventory-item.required=[uuid,description] |
| props | JSONB | Yes | props(asset_id / ipv4_address / fqdn / hostname…) | inventory-item.props | Opt | 免改 | ssp · inventory-item.required=[uuid,description] |
| asset_type | String(40) | No | hardware / information_system(預設 hardware) | — | — | —(FR-032 產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| ref_type | String(40) | Yes | information_system(未來 device);自由輸入為 NULL | — | — | —(FR-032) | —(內部/審計/產品欄,無 OSCAL 對應) |
| ref_id | String(64) | Yes | soft → information_systems.uid;自由輸入為 NULL | — | — | —(FR-032) | —(內部/審計/產品欄,無 OSCAL 對應) |
| tenant_id | Integer | No | RLS(soft) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| org_unit_id | Integer | Yes | soft | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| is_active | Boolean | No | 軟刪除(預設 True) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_inventory_implemented_components oscal OSCAL OSCAL 標準(資產↔元件 M:N)
M:N 接合:每筆資產實作了哪些元件(無自身 tenant,RLS 靠 FK cascade)。
PK:(inventory_item_id, component_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| inventory_item_id | Integer | No | FK→ssp_inventory_items.id(PK, CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| component_id | Integer | No | FK→ssp_components.id(PK, CASCADE) | implemented-component.component-uuid | Opt* | —(OSCAL 用 uuid,現 int FK) | ssp · implemented-component.required=[component-uuid] |
ssp_leveraged_authorizations oscal OSCAL OSCAL 標準(leveraged-authorization)
引用的上游 ATO(如 FedRAMP CSP);SSP 從此繼承控制項實作。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | Leveraged-auth UUID | leveraged-authorization.uuid | Req | uuid | ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized] |
| ssp_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title | String(255) | No | 授權標題 | leveraged-authorization.title | Req | 免改 | ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized] |
| party_uuid改 | UUID | Yes | soft → oscal_parties.uid(授權方/CSP)🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL leveraged-authorization.party-uuid 必填。 | leveraged-authorization.party-uuid | Req | 免改(nullable→NN) | ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized] |
| date_authorized改 | Date | Yes | 授權日期🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL date-authorized 必填。 | leveraged-authorization.date-authorized | Req | 免改(連字號;nullable→NN) | ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized] |
| props | JSONB | Yes | props(fedramp_package_id / impact_level…) | leveraged-authorization.props | Opt | 免改 | ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized] |
| remarks | Text | Yes | 備註 | leveraged-authorization.remarks | Opt | 免改 | ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized] |
| tenant_id | Integer | No | RLS(soft) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| org_unit_id | Integer | Yes | soft | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| is_active | Boolean | No | 軟刪除(預設 True) | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_control_implementations oscal OSCAL OSCAL 標準(control-implementation)
每條控制項在本 SSP 的實作狀態+描述;control_identifier 在 SSP 內唯一。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | 控制項實施 UUID | implemented-requirement.uuid | Req | uuid | ssp · implemented-requirement.required=[control-id,uuid] |
| system_security_plan_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| catalog_control_id | Integer | Yes | FK→catalog_controls.id(來源控制,可選) | — | — | —(來源soft-ref) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_identifier | String(100) | No | 控制項編號,如 AC.L1-3.1.1 | implemented-requirement.control-id | Req | 改名→control_id | ssp · implemented-requirement.required=[control-id,uuid] |
| control_origination | String(50) | Yes | organization / system-specific / inherited / shared | prop(control-origination) | Opt | —(OSCAL 用 prop) | ssp · control-implementation.required=[description,implemented-requirements] |
| remarks | Text | Yes | 備註 | implemented-requirement.remarks | Opt | 免改 | ssp · implemented-requirement.required=[control-id,uuid] |
| implementation_status | String(30) | No | unknown / implemented / partial / inherited / not_applicable / not_implemented | by-component.implementation-status.state | Opt | —(OSCAL 在 by-component) | ssp · control-implementation.required=[description,implemented-requirements] |
| implementation_description | Text | Yes | 系統特定實作說明 | — | — | —(產品彙整) | —(內部/審計/產品欄,無 OSCAL 對應) |
| responsible_role | String(100) | Yes | 負責角色 | implemented-requirement.responsible-roles[].role-id | Opt | —(單值 vs 多值) | common · responsible-role.required=[role-id] |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| descriptionNEWREQ | Text | No | 控制項實作區塊的整體描述;對應 OSCAL control-implementation.description(必填)。 | control-implementation.description | Req | 新增(block-level) | ssp · control-implementation.required=[description,implemented-requirements] |
ssp_control_implementation_objectives oscal OSCAL OSCAL 標準(statement / objective)
控制項底下各評估目標([a][b]…)的實作細節;比 control-impl 細一階。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | Objective UUID | statement.uuid | Req | uuid | ssp · statement.required=[statement-id,uuid] |
| system_security_plan_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_implementation_id | Integer | No | FK→ssp_control_implementations.id(CASCADE) | — | — | 免改(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| control_identifier | String(100) | No | 控制項編號 | — | — | —(冗余便查) | —(內部/審計/產品欄,無 OSCAL 對應) |
| statement_identifier | String(100) | No | 目標識別符,如 a / b | statement.statement-id | Req | 改名→statement_id | ssp · statement.required=[statement-id,uuid] |
| implementation_status | String(50) | Yes | 實施狀態 | — | — | —(產品) | —(內部/審計/產品欄,無 OSCAL 對應) |
| implementation_description | Text | Yes | 實施說明 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| remarks | Text | Yes | 備註 | statement.remarks | Opt | 免改 | ssp · statement.required=[statement-id,uuid] |
| reference_documents | JSONB | Yes | 參考文件清單(預設 []) | — | — | —(程序書池,非 OSCAL) | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(100) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(100) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_system_information_types oscal OSCAL 🆕 規劃新增 OSCAL 標準(system-information.information-types)
OSCAL system-characteristics.system-information.information-types[](FIPS 199 資訊類型 + C/I/A 衝擊)。目前完全沒表。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | information-type uuid | information-type.uuid | Opt | 新增 | ssp · system-information.required=[information-types];information-type 必填 title,description |
| system_characteristic_id | Integer | No | FK→ssp_system_characteristics.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title | String(255) | No | information-type.title(REQ) | information-type.title | Req | 新增 | ssp · system-information.required=[information-types];information-type 必填 title,description |
| description | Text | No | information-type.description(REQ) | information-type.description | Req | 新增 | ssp · system-information.required=[information-types];information-type 必填 title,description |
| categorization_system | String(255) | Yes | categorization.system(有則 REQ) | categorization.system | Opt* | 新增 | ssp · system-information.required=[information-types];information-type 必填 title,description |
| confidentiality_impact_base | String(50) | Yes | confidentiality-impact.base(有則 REQ)fips-199-* | confidentiality-impact.base | Opt* | 新增 | ssp · impact.required=[base](C/I/A 選填,有則 base 必填) |
| confidentiality_impact_selected | String(50) | Yes | confidentiality-impact.selected | confidentiality-impact.selected | Opt | 新增 | ssp · impact.required=[base](C/I/A 選填,有則 base 必填) |
| integrity_impact_base | String(50) | Yes | integrity-impact.base(有則 REQ) | integrity-impact.base | Opt* | 新增 | ssp · impact.required=[base](C/I/A 選填,有則 base 必填) |
| integrity_impact_selected | String(50) | Yes | integrity-impact.selected | integrity-impact.selected | Opt | 新增 | ssp · impact.required=[base](C/I/A 選填,有則 base 必填) |
| availability_impact_base | String(50) | Yes | availability-impact.base(有則 REQ) | availability-impact.base | Opt* | 新增 | ssp · impact.required=[base](C/I/A 選填,有則 base 必填) |
| availability_impact_selected | String(50) | Yes | availability-impact.selected | availability-impact.selected | Opt | 新增 | ssp · impact.required=[base](C/I/A 選填,有則 base 必填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_system_users oscal OSCAL 🆕 規劃新增 OSCAL 標準(system-implementation.users)
OSCAL system-implementation.users[](system-user)。目前只有 system-characteristics.owner_uid 單一純量。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | user.uuid(REQ) | system-user.uuid | Opt* | 新增 | ssp · system-user.required=[uuid](users 選填) |
| ssp_id | Integer | No | FK→ssps.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title | String(255) | Yes | user.title | system-user.title | Opt | 新增 | ssp · system-user.required=[uuid](users 選填) |
| role_ids | JSONB | Yes | user.role-ids[] | system-user.role-ids | Opt | 新增 | ssp · system-user.required=[uuid](users 選填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_authorized_privileges oscal OSCAL 🆕 規劃新增 OSCAL 標準(system-user.authorized-privileges)
OSCAL system-user.authorized-privileges[]。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| system_user_id | Integer | No | FK→ssp_system_users.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| title | String(255) | No | authorized-privilege.title(REQ) | authorized-privilege.title | Opt* | 新增 | ssp · authorized-privilege.required=[title,functions-performed] |
| functions_performed | JSONB | No | authorized-privilege.functions-performed(REQ) | authorized-privilege.functions-performed | Opt* | 新增 | ssp · authorized-privilege.required=[title,functions-performed] |
ssp_by_components oscal OSCAL 🆕 規劃新增 OSCAL 標準(by-component)
OSCAL implemented-requirement / statement.by-components[](元件層控制項實作 + 繼承責任 export/provided/inherited/satisfied)。目前只到 requirement+objective。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | by-component.uuid(REQ) | by-component.uuid | Opt* | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| control_implementation_id | Integer | Yes | FK→ssp_control_implementations.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| objective_id | Integer | Yes | FK→ssp_control_implementation_objectives.id | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| component_uuid | UUID | No | by-component.component-uuid(REQ)→ ssp_components.uid | by-component.component-uuid | Opt* | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| description | Text | No | by-component.description(REQ) | by-component.description | Opt* | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| implementation_status | String(30) | Yes | implementation-status.state | by-component.implementation-status.state | Opt | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| export_provided | JSONB | Yes | export.provided[] | by-component.export.provided[] | Opt | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| export_responsibility | JSONB | Yes | export.responsibility[] | by-component.export.responsibility[] | Opt | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| inherited | JSONB | Yes | inherited[] | by-component.inherited[] | Opt | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| satisfied | JSONB | Yes | satisfied[] | by-component.satisfied[] | Opt | 新增 | ssp · by-component.required=[component-uuid,uuid,description](by-components 選填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_set_parameters oscal OSCAL 🆕 規劃新增 OSCAL 標準(set-parameter)
OSCAL set-parameter(control-implementation / implemented-requirement / by-component 三層)。目前完全沒表。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| context_type | String(40) | No | control_implementation / implemented_requirement / by_component | — | — | 新增(多型) | —(內部/審計/產品欄,無 OSCAL 對應) |
| context_id | Integer | No | 依 context_type 指向(soft) | — | — | 新增 | —(內部/審計/產品欄,無 OSCAL 對應) |
| param_id | String(100) | No | set-parameter.param-id(REQ) | set-parameter.param-id | Opt* | 新增 | ssp · set-parameter.required=[param-id,values](set-parameters 選填) |
| values | JSONB | No | set-parameter.values(REQ) | set-parameter.values | Opt* | 新增 | ssp · set-parameter.required=[param-id,values](set-parameters 選填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_diagrams oscal OSCAL 🆕 規劃新增 OSCAL 標準(diagram)
OSCAL authorization-boundary / network-architecture / data-flow 的 diagrams[]。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| uid | UUID | No | diagram.uuid(REQ) | diagram.uuid | Opt* | 新增 | ssp · diagram.required=[uuid](diagrams 選填) |
| system_characteristic_id | Integer | No | FK→ssp_system_characteristics.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| diagram_context | String(40) | No | authorization_boundary / network_architecture / data_flow | — | — | 新增(auth-boundary/network/data-flow) | ssp · diagram.required=[uuid](diagrams 選填) |
| description | Text | Yes | diagram.description | diagram.description | Opt | 新增 | ssp · diagram.required=[uuid](diagrams 選填) |
| caption | String(255) | Yes | diagram.caption | diagram.caption | Opt | 新增 | ssp · diagram.required=[uuid](diagrams 選填) |
| created_at | DateTime(tz) | No | 建立時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_at | DateTime(tz) | No | 更新時間 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(內部/審計/產品欄,無 OSCAL 對應) |
ssp_component_responsible_roles oscal OSCAL 🆕 規劃新增 OSCAL 標準(component.responsible-roles)
OSCAL component.responsible-roles[](角色 → component link)。
PK:(component_id, role_id)
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| component_id | Integer | No | FK→ssp_components.id(CASCADE) | — | — | 新增(FK) | —(內部/審計/產品欄,無 OSCAL 對應) |
| role_id | String(100) | No | responsible-role.role-id(REQ) | responsible-role.role-id | Opt* | 新增 | common · responsible-role.required=[role-id] |
| party_uuids | JSONB | Yes | party-uuids[] | responsible-role.party-uuids | Opt | 新增 | common · responsible-role.required=[role-id] |
ssp_reference_documents oscal 擴充 擴充(程序書池本體)
SSP 程序書文件「池」本體(檔案/URL);context_type 多型掛到 control_implementation / objective。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| uid | String(36) | No | UID(unique) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| context_type | String(30) | No | control_implementation / objective | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| context_id | Integer | No | 依 context_type 指向(soft) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| file_id | Integer | Yes | FK→upload_files.id(可選) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| description | Text | Yes | 文件說明 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_at | DateTime | No | 更新時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| updated_user | String(50) | Yes | 更新者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
ssp_reference_document_mappings oscal 擴充 擴充(程序書對應層)
程序書 ↔ 控制項/目標的 M:N 對應;context_id 通常指 assessment_plan_controls.id(掛在 AP 進度追蹤)。
PK:id
| 欄位 | 型別 | Null | 說明 | OSCAL 欄位 | 必填 | 改名後 | 參考依據 |
|---|---|---|---|---|---|---|---|
| id | Integer | No | PK | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| reference_document_id | Integer | No | FK→ssp_reference_documents.id(CASCADE) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| context_type | String(30) | No | control_implementation / objective | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| context_id | Integer | No | 通常 → assessment_plan_controls.id(soft) | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_at | DateTime | No | 建立時間 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |
| created_user | String(50) | Yes | 建立者 | — | — | — | —(非 OSCAL:本專案擴充/內部表) |