合規框架 / 合規資源庫 / 專案管理 — DB Schema 整理

⚠️ FR-037 規劃疊圖(proposed,尚未套用 DB) 此文件已疊上 OSCAL 欄位對齊(additive)與必填補齊的規劃變更,方便檢視會異動哪些。圖例: NEW 新增欄位(綠底) 約束/詞彙修正(橘底) 🆕 規劃新增 全新表(紅框)  詳見 enhancement-table.md
本文件已更新至 FR-036(module_frame ↔ SSP 整併,Phase 1 已套用)。 資源庫範本內容不再用 module_frame_*_defaults 系列表,改存為一份樣板 SSPoscal.sspsis_template=True),由 module_frames.template_ssp_id 指向;啟動專案時 clone 樣板 SSP → 專案 SSP。 原 *_defaults 等 8 張表已退役(資料遷入樣板 SSP;實體待 Phase 2 DROP),本文件不再列出。新增欄位已標記。

總覽:三大功能怎麼串起來

資料流向:合規框架(定義控制項全集)→ 合規資源庫(包裝 Profile + 預設 SSP 範本)→ 專案管理(啟動專案時 clone 出 AP 控制項與 SSP,跑稽核任務、產出評估結果)。

flowchart LR subgraph F["① 合規框架 (OSCAL 控制層)"] FR[oscal_frameworks] --> FV[framework_versions] --> CAT[catalogs] --> CTRL[catalog_controls] CAT --> PROF[profiles] --> PC[profile_controls] end subgraph L["② 合規資源庫 (Module Frame)"] MF[module_frames] -->|template_ssp_id| TSSP["樣板 SSP(is_template=True)"] end subgraph P["③ 專案管理"] PRJ[projects] --> AP[assessment_plans] --> APC[ap_controls] PRJ --> SSP[ssps] --> CI[ssp_control_implementations] AP --> AR[assessment_results] --> FND[findings 缺失] FND -->|"fail/partial 缺失批次生成"| POAM[poams 矯正追蹤] --> RND([本輪結案 → 下一輪 SSP version+1]) APT[ap_tasks] -.->|bridge| WF[(flow-engine: workflow/jobs)] end PROF -->|"soft: oscal_profile_uid 包裝"| MF MF -->|"啟動時 clone Profile→AP controls"| AP TSSP -->|"啟動專案 clone → 專案 SSP"| SSP
關鍵接點(功能之間的關連):
框架 → 資源庫module_frames.oscal_profile_uid soft-ref 包裝一個 OSCAL Profile(baseline)。
資源庫 → 專案:啟動專案時,把 Profile 的控制項 clone 成 assessment_plan_controls,把該資源庫的樣板 SSPmodule_frames.template_ssp_idoscal.ssps is_template=True)clone 成該專案 SSP(FR-036;取代原 *_defaults)。project_extensions.module_frame_id 記錄源頭。
專案內 AP → ARassessment_results.assessment_plan_id 溯源到 AP;每輪稽核 = SSP 一版本(group_id 不變、version_no +1)。
AR → POA&M(矯正追蹤):close_round 判定時,未通過(fail/partial)控制項的每筆 findings 批次生成一筆 poamsar_finding_id 綁定,status=open)。稽核生命週期 stage:audit → poam → closed,前置條件 audit→poam 需所有控制項填 verdict、poam→closed 需該 AP 全部 POA&M closed。POA&M open→in_progress 會退回對應 AO workflow 讓執行人員補件。
專案 → flow-engine(相鄰子系統)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_controlsOSCAL 標準
實作層 Implementation專案管理 (SSP)ssps / system-characteristics / system-implementation (components / inventory / leveraged-auth) / control-implementation / objectivesOSCAL 標準
評估層 Assessment專案管理 (AP / AR)assessment_plans / groups / controls / tasks ;assessment_results / datas / controls / evidences / findingsOSCAL 標準
評估層 — POA&M專案管理 (矯正追蹤)poams(單表;對應 OSCAL POA&M model,本專案以扁平表實作;ar_finding_id 接 findings)本專案擴充
共用 Shared跨全層oscal_metadatas / documents / parties / roles / responsible_parties / props / links / locations / remarksOSCAL 標準
本專案擴充三大功能皆有frameworks / framework_versions / control_mapping / catalog_control_assessments ;module_frame* 全系列 ;projects / project_* / participants ;*_extensions / *_mapping / 程序書表本專案擴充
OSCAL 直接對應 NIST OSCAL 模型結構 擴充 本專案自訂(非 OSCAL 標準) oscalcompliancepublic PostgreSQL schema

① 合規框架(OSCAL 控制層)

框架 → 版本 → Catalog(群組/控制項/參數/部分)→ Profile(篩選)。控制項全集的定義來源。

erDiagram oscal_frameworks ||--o{ oscal_framework_versions : "1:N 版本" oscal_framework_versions ||--|| catalogs : "1:1" oscal_framework_versions ||--o{ oscal_control_mapping : "跨框架對應" catalogs ||--o{ catalog_groups : "群組樹" catalog_groups ||--o{ catalog_groups : "parent_group_id" catalog_groups ||--o{ catalog_controls : "" catalog_controls ||--o{ catalog_control_parameters : "" catalog_controls ||--o{ catalog_control_parts : "" catalog_controls ||--o{ catalog_control_assessments : "評估樣板" catalogs ||--o{ profiles : "1:N 篩選" profiles ||--o{ profile_controls : "include/exclude" catalog_controls ||--o{ profile_controls : "被選取"

oscal_frameworks oscal 擴充 本專案擴充(框架基本資訊)

合規框架主檔(CMMC / ISO27001 / NIST 等的頂層定義);一個框架可有多個版本。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK,自動遞增—(非 OSCAL:本專案擴充/內部表)
uidUUIDNo框架唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
codeString(50)No框架代碼,如 CMMC_L2、ISO27001:2022—(非 OSCAL:本專案擴充/內部表)
nameString(255)No框架名稱,如 CMMC 2.0 Level 2—(非 OSCAL:本專案擴充/內部表)
authorityString(255)No發佈機關,如 DoD / NIST / ISO—(非 OSCAL:本專案擴充/內部表)
descriptionTextNo框架描述—(非 OSCAL:本專案擴充/內部表)
publish_statusString(20)Nodraft / published / archived(預設 draft)—(非 OSCAL:本專案擴充/內部表)
main_versionString(50)No主要版號—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
(無 FK;relationship → oscal_framework_versions)

oscal_framework_versions oscal 擴充 本專案擴充(框架版本)

框架的不同發佈版本(如 CMMC 2.0 / 2023 / 2024);pid 自參考支援版本樹。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidUUIDNo版本唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
framework_idIntegerNoFK→oscal_frameworks.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
versionString(50)No版本號,如 2.0 / 2023—(非 OSCAL:本專案擴充/內部表)
release_dateDateYes發佈日期—(非 OSCAL:本專案擴充/內部表)
publish_statusString(20)Nodraft / published / archived—(非 OSCAL:本專案擴充/內部表)
file_uidString(36)Yes原始上傳 PDF 的 file_uid(編輯頁 iframe 用)—(非 OSCAL:本專案擴充/內部表)
pidIntegerYes父版本 id(self-ref,SET NULL)—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
framework_id → oscal_frameworks.id(真 FK, CASCADE)
pid → oscal_framework_versions.id(真 FK self-ref, SET NULL)
Unique(framework_id, version, pid)

catalogs oscal OSCAL OSCAL 標準(Catalog 文件)

OSCAL Catalog 文件實例(控制項目錄 metadata + 群組樹);1:1 對應一個框架版本。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)uuidRequuidcatalog · catalog.required=[metadata,uuid]
framework_version_idIntegerNoFK→oscal_framework_versions.id(CASCADE)—(內部/審計/產品欄,無 OSCAL 對應)
document_idIntegerYesFK→oscal_documents.id(CASCADE),原始文件—(內部/審計/產品欄,無 OSCAL 對應)
metadata_idIntegerNoFK→oscal_metadatas.id(CASCADE)metadataReq免改(FK)catalog · catalog.required=[metadata,uuid]
statusString(20)Nodraft / published / deprecated—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextYes文件描述—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
framework_version_id → oscal_framework_versions.id(FK, CASCADE)
document_id → oscal_documents.id(FK, CASCADE)
metadata_id → oscal_metadatas.id(FK, CASCADE)

catalog_groups oscal OSCAL OSCAL 標準(Catalog Group 階層)

控制項階層分組(如 Annex A / A.5 / A.5.1);parent_group_id 自參考支援多層。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo群組 UUID(在此 Catalog 版本內唯一)免改(內部UUID,OSCAL group 無 uuid)—(內部/審計/產品欄,無 OSCAL 對應)
catalog_idIntegerNoFK→catalogs.id(CASCADE)—(內部/審計/產品欄,無 OSCAL 對應)
nameString(100)No群組識別名稱,如 A.5 / Annex Agroup.idOpt改名→group_idcatalog · group.required=[title](id/class 選填)
descriptionTextYes群組描述group.titleReq改名→titlecatalog · group.required=[title](id/class 選填)
order_noIntegerNo同父群組下排序序號—(內部/審計/產品欄,無 OSCAL 對應)
parent_group_idIntegerYes父群組 id(self-ref, CASCADE)groups(巢狀)Opt免改(FK)catalog · group.required=[title](id/class 選填)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
group_classNEWString(100)Yes群組的分類標記;對應 OSCAL group.class。group.classOpt新增catalog · group.required=[title](id/class 選填)
FK / soft-ref:
catalog_id → catalogs.id(FK, CASCADE)
parent_group_id → catalog_groups.id(FK self-ref, CASCADE)

catalog_controls oscal OSCAL OSCAL 標準(Control 控制項)

安全控制項詳情(代碼 / 標題 / 敘述 / 指引),屬於特定控制項群組。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo控制項 UUID(unique)免改(內部UUID,OSCAL control 無 uuid)—(內部/審計/產品欄,無 OSCAL 對應)
group_idIntegerNoFK→catalog_groups.id(CASCADE)免改(FK→catalog_groups)—(內部/審計/產品欄,無 OSCAL 對應)
control_idString(100)No控制項識別碼,如 AC-1 / A.5.1control.idReq免改(id 衝突的物件前綴名)catalog · control.required=[id,title]
control_titleTextNo控制項標題control.titleReq改名→title?(評估)catalog · control.required=[id,title]
descriptionTextYes控制項敘述 / 聲明part(statement) proseOpt—(OSCAL control 無 description,屬 part)catalog · control.required=[id,title]
guidanceTextYes控制項指引part(guidance) proseOpt—(屬 part)catalog · control.required=[id,title]
order_noIntegerNo群組內排序—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
control_classNEWString(100)Yes控制項的分類標記(如 family / SP800-53);對應 OSCAL control.class。control.classOpt新增catalog · control.required=[id,title]
FK / soft-ref:
group_id → catalog_groups.id(FK, CASCADE)

catalog_control_parameters oscal OSCAL OSCAL 標準(Control Parameter)

控制項可配置參數(param_id / 標籤 / 預設值),允許在 Profile / SSP 覆寫。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo參數 UUID(unique)免改(內部UUID,OSCAL param 無 uuid)—(內部/審計/產品欄,無 OSCAL 對應)
control_idIntegerNoFK→catalog_controls.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
param_idString(100)No參數識別碼parameter.idOpt免改(id 物件前綴名)catalog · parameter.required=[](無必填)
labelString(255)Yes參數標籤parameter.labelOpt免改catalog · parameter.required=[](無必填)
default_valueTextYes預設值parameter.values[]Opt—(OSCAL 為 values 陣列)catalog · parameter.required=[](無必填)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
param_classNEWString(100)Yes參數的分類標記;對應 OSCAL param.class。parameter.classOpt新增catalog · parameter.required=[](無必填)
depends_onNEWString(100)Yes相依的另一參數 id;對應 OSCAL param.depends-on。parameter.depends-onOpt新增catalog · parameter.required=[](無必填)
usageNEWTextYes參數用途說明;對應 OSCAL param.usage。parameter.usageOpt新增catalog · parameter.required=[](無必填)
remarksNEWTextYes參數備註;對應 OSCAL param.remarks。parameter.remarksOpt新增catalog · parameter.required=[](無必填)
FK / soft-ref:
control_id → catalog_controls.id(FK, CASCADE)
Unique(control_id, param_id)

catalog_control_parts oscal OSCAL OSCAL 標準(Control Part)

控制項組成部分(statement / objective / guidance / example),多部分結構。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo部分 UUID(unique)免改(內部UUID,OSCAL part 無 uuid)—(內部/審計/產品欄,無 OSCAL 對應)
control_idIntegerNoFK→catalog_controls.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
part_nameString(50)Nostatement / objective / guidance / examplepart.nameReq改名→name?(評估;name 非衝突)catalog · part.required=[name]
proseTextNo部分內容文字🔧 約束放寬 原:NOT NULL(不可為空)→ 新:可為 NULL。原因:OSCAL part.prose 為選填,現過嚴會擋住匯入。part.proseOpt免改(但 NOT NULL→放寬 nullable)catalog · part.required=[name]
order_noIntegerNo排序—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
part_idNEWString(100)Yes部分的 OSCAL 字串識別碼,供交叉參照;與內部 uid 分離。對應 OSCAL part.id。part.idOpt新增(id 物件前綴名)catalog · part.required=[name]
nsNEWString(255)Yes命名空間 URI,區分不同來源的 part;對應 OSCAL part.ns。part.nsOpt新增catalog · part.required=[name]
part_classNEWString(100)Yes部分的分類標記;對應 OSCAL part.class。part.classOpt新增catalog · part.required=[name]
titleNEWTextYes部分的標題;對應 OSCAL part.title。part.titleOpt新增catalog · part.required=[name]
FK / soft-ref:
control_id → catalog_controls.id(FK, CASCADE)

catalog_control_assessments oscal 擴充 本專案擴充(評估樣板)

控制項的評估執行樣板(非 OSCAL 標準);產生 AP 任務時的可重用樣板。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidUUIDNo唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
control_idIntegerNoFK→catalog_controls.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
nameString(1000)No樣板名稱,如 Official / Internal—(非 OSCAL:本專案擴充/內部表)
versionString(50)Yes樣板版本—(非 OSCAL:本專案擴充/內部表)
descriptionTextYes樣板敘述—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
control_id → catalog_controls.id(FK, CASCADE)
(被 profile_assessment_workflow_mapping 引用 → 綁工作流程)

profiles oscal OSCAL OSCAL 標準(Profile 篩選層)

從已發佈 Catalog 篩選的控制項集合(不複製控制內容);Catalog 與 SSP 之間的 filter layer。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)uuidRequuidprofile · profile.required=[imports,metadata,uuid]
catalog_idIntegerNoFK→catalogs.id,參考的 Catalogimports[].hrefReq—(壓成單一FK,見 profile_imports)profile · profile.required=[imports,metadata,uuid]
metadata_idIntegerNoFK→oscal_metadatas.id(CASCADE)metadataReq免改(FK)profile · profile.required=[imports,metadata,uuid]
document_idIntegerNoFK→oscal_documents.id(CASCADE)—(內部/審計/產品欄,無 OSCAL 對應)
statusString(20)Nodraft / published / deprecated—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextYes文件描述—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
catalog_id → catalogs.id(FK)
metadata_id → oscal_metadatas.id(FK, CASCADE)
document_id → oscal_documents.id(FK, CASCADE)
(被 module_frames.oscal_profile_uid soft-ref 引用 → 資源庫包裝)

profile_controls oscal OSCAL OSCAL 標準(Profile Control 篩選記錄)

記錄 Profile 對某 Catalog 控制項的 include/exclude 決策(不複製內容)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)免改(內部)—(內部/審計/產品欄,無 OSCAL 對應)
profile_idIntegerNoFK→profiles.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
catalog_control_idIntegerNoFK→catalog_controls.idimport.include-controls.with-ids—(扁平化)profile · import.required=[include-all|include-controls]
includeBooleanNo是否納入(預設 True)include-controls/exclude-controls—(布林扁平)profile · import.required=[include-all|include-controls]
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
profile_id → profiles.id(FK, CASCADE)
catalog_control_id → catalog_controls.id(FK)
Unique(profile_id, catalog_control_id)

profile_imports oscal OSCAL 🆕 規劃新增 OSCAL 標準(profile.imports)

OSCAL profile.imports(陣列);取代「單一 catalog_id + 扁平 profile_controls」,支援多來源 / include-all / matching pattern。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼新增(內部)—(內部/審計/產品欄,無 OSCAL 對應)
profile_idIntegerNoFK→profiles.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
import_catalogUUIDYes被 import 的 Catalog uid(href 合成 #uuid)import.hrefOpt新增(存 catalog uuid)profile · import.required=[include-all|include-controls]
include_allBooleanNoinclude-all 旗標(預設 False)import.include-all新增profile · import.required=[include-all|include-controls]
with_child_controlsBooleanYesselect-control-by-id.with-child-controlsselect-control-by-id.with-child-controlsOpt新增profile · import.required=[include-all|include-controls]
matching_patternString(255)Yesselect glob patternselect-control-by-id.matching.patternOpt新增profile · import.required=[include-all|include-controls]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
profile_id → profiles.id(FK, CASCADE)
(profile_controls 改 re-parent 於此)

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_idIntegerNoFK→oscal_framework_versions.id(CASCADE),來源版本—(非 OSCAL:本專案擴充/內部表)
source_control_idString(50)No來源控制項 id(控制代碼)—(非 OSCAL:本專案擴充/內部表)
target_version_idIntegerNoFK→oscal_framework_versions.id(CASCADE),目標版本—(非 OSCAL:本專案擴充/內部表)
target_control_idString(50)No目標控制項 id(控制代碼)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
source_version_id → oscal_framework_versions.id(FK, CASCADE)
target_version_id → oscal_framework_versions.id(FK, CASCADE)
(無 audit 欄位)

OSCAL 共用基礎元件

metadata block 與 back-matter 元件(parties/roles/props/links…),被 Catalog/Profile/SSP/AP/AR 跨層複用;多以 secondary 關聯表或 context_type+context_id 多型掛載。

oscal_metadatas oscal OSCAL OSCAL 標準(metadata block)

OSCAL 文件中繼資訊(title / version / oscal_version / last_modified);經 secondary 表掛載 roles/parties/locations/links/props/remarks。每份 Catalog/Profile/SSP/AP/AR 各一份。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)免改(內部UUID,OSCAL metadata 無 uuid)common · metadata.required=[title,last-modified,version,oscal-version]
titleString(255)Nometadata.title 文件標題metadata.titleReq免改common · metadata.required=[title,last-modified,version,oscal-version]
versionString(100)Nometadata.version 版本號metadata.versionReq免改common · metadata.required=[title,last-modified,version,oscal-version]
publishedDateTime(tz)Yesmetadata.published 正式發布日期metadata.publishedOpt免改common · metadata.required=[title,last-modified,version,oscal-version]
revisionString(20)Yes修訂版(如 1.1.1)metadata.revisions[].versionOpt—(單值,見 oscal_revisions)common · revision.required=[version]
last_modifiedDateTime(tz)Nometadata.last-modified(預設 now utc)metadata.last-modifiedReq免改(連字號 mapper 轉)common · metadata.required=[title,last-modified,version,oscal-version]
oscal_versionString(20)NoOSCAL 語法版本(預設 1.2.0)metadata.oscal-versionReq免改(連字號 mapper 轉)common · metadata.required=[title,last-modified,version,oscal-version]
FK / soft-ref:
roles/parties/locations/links/props/remarks → 各自 secondary 關聯表(N:N)
responsible_parties → polymorphic(context_type='metadata')

oscal_documents oscal OSCAL OSCAL 標準(原始文件倉儲)

完整 OSCAL 原始內容(yaml/json + hash);作為 Catalog/Profile/SSP/AP/AR 的文件版本倉儲,支援變更偵測。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidUUIDNo文件 UUID(unique)—(非 OSCAL:本專案擴充/內部表)
hashString(255)No內容雜湊(完整性 / 變更偵測)—(非 OSCAL:本專案擴充/內部表)
yaml_contentTextNo原始 OSCAL YAML—(非 OSCAL:本專案擴充/內部表)
json_contentJSONBYes已解析 JSON(查詢最佳化)—(非 OSCAL:本專案擴充/內部表)
created_atDateTime(tz)No建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTime(tz)No更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
被 catalogs / profiles / ssps / assessment_plans / assessment_results 的 document_id 引用(1:N)

oscal_parties oscal OSCAL OSCAL 標準(party 個人/組織)

metadata.parties 參與方(person / organization);user_id/org_unit_id soft-ref 鉤稽系統帳號;作為 responsible_parties.party_uuid 來源。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoParty UUID(unique;responsible-parties 指向此)party.uuidRequuidcommon · party.required=[uuid,type]
party_typeString(50)Noperson / organizationparty.typeReq免改(type builtin 物件前綴名)common · party.required=[uuid,type]
nameString(255)No人員或組織名稱party.nameOpt免改common · party.required=[uuid,type]
short_nameString(100)Yes簡稱party.short-nameOpt免改(連字號)common · party.required=[uuid,type]
remarksTextYes補充說明party.remarksOpt免改common · party.required=[uuid,type]
titleString(255)Yes職稱(person,如 System Owner)—(業務擴充)—(內部/審計/產品欄,無 OSCAL 對應)
email_addressTextYes聯絡郵箱(person 鉤稽 user 用)party.email-addresses[]Opt—(OSCAL 為陣列)common · party.required=[uuid,type]
telephone_numberString(50)Yes聯絡電話party.telephone-numbers[]Opt—(陣列)common · party.required=[uuid,type]
addressTextYes地址party.addresses[]Opt—(陣列/結構)common · party.required=[uuid,type]
user_idIntegerYessoft-ref → public.members.id(無 FK,跨 schema)—(業務soft-ref)—(內部/審計/產品欄,無 OSCAL 對應)
org_unit_idIntegerYessoft-ref → public.org_units.id(無 FK,跨 schema)—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
uid ← oscal_responsible_parties.party_uuid(1:N)
user_id → public.members.id(soft)
org_unit_id → public.org_units.id(soft)

oscal_roles oscal OSCAL OSCAL 標準(role 角色庫)

metadata.roles 角色定義(role_id 為業務唯一鍵);OSCAL 內建 + 自訂;responsible_parties 的 role 來源。

PK:id(業務鍵 role_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK(DB 內部)—(內部/審計/產品欄,無 OSCAL 對應)
role_idString(100)No角色識別碼(業務唯一),如 prepared-by / system-ownerrole.idReq免改(id 物件前綴名)common · role.required=[id,title]
titleString(255)No角色顯示名稱role.titleReq免改common · role.required=[id,title]
descriptionTextYes角色說明role.descriptionOpt免改common · role.required=[id,title]
short_nameNEWString(100)Yes角色的簡稱;對應 OSCAL role.short-name。role.short-nameOpt新增(連字號)common · role.required=[id,title]
remarksNEWTextYes角色備註說明;對應 OSCAL role.remarks。role.remarksOpt新增common · role.required=[id,title]
FK / soft-ref:
role_id ← oscal_responsible_parties.role_id(N:1)
→ metadata via oscal_metadata_roles(N:N)

oscal_responsible_parties oscal OSCAL OSCAL 標準(role↔party link)

Link record(無 uid):把 role_id ↔ party_uuid 綁定並標 context(context_type+context_id 多型)。自然 identity = 四元組。

PK:id(自然鍵 role_id+party_uuid+context_type+context_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
role_idString(100)No→ oscal_roles.role_id(String ref,無 FK)responsible-party.role-idReq免改common · responsible-party.required=[party-uuids,role-id]
party_uuidString(36)No→ oscal_parties.uid(String ref,無 FK)responsible-party.party-uuids[]Req免改(多列表多值)common · responsible-party.required=[party-uuids,role-id]
context_typeString(50)No多型 context:metadata / system / control / task / assessment—(多型掛載,擴充)—(內部/審計/產品欄,無 OSCAL 對應)
context_idIntegerYes多型 context 資料 id(null=全域,多在 metadata)—(內部/審計/產品欄,無 OSCAL 對應)
remarksNEWTextYes負責方關聯的備註;對應 OSCAL responsible-party.remarks。responsible-party.remarksOpt新增common · responsible-party.required=[party-uuids,role-id]
FK / soft-ref:
role_id → oscal_roles.role_id(soft)
party_uuid → oscal_parties.uid(soft)
context_id → 依 context_type 多型指向(soft)

oscal_props oscal OSCAL OSCAL 標準(prop 擴展屬性)

帶 namespace 的 name-value 屬性對;不改 schema 即可附加自訂欄位;多層級複用。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
nameString(100)Noprop.name,如 workflow-id / implementation-statusproperty.nameReq免改common · property.required=[name,value]
valueTextNoprop.valueproperty.valueReq免改common · property.required=[name,value]
prop_classString(100)Yesprop.class 分類property.classOpt免改(class 保留字物件前綴名)common · property.required=[name,value]
nsString(255)Yesprop.ns Namespace(隔離自訂欄位)property.nsOpt免改common · property.required=[name,value]
uuidNEWUUIDYes屬性的唯一識別碼;對應 OSCAL property.uuid(選填)。property.uuidOpt新增common · property.required=[name,value]
groupNEWString(100)Yes屬性的分組標記,供同類屬性歸群;對應 OSCAL property.group。property.groupOpt新增common · property.required=[name,value]
remarksNEWTextYes屬性備註說明;對應 OSCAL property.remarks。property.remarksOpt新增common · property.required=[name,value]
FK / soft-ref:
→ metadata via oscal_metadata_props(N:N);其他層級可複用

metadata.links 超連結(rel: predecessor-version / latest-version / related…);版本追蹤 / 外部資源參考。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
hrefString(500)Nolink.href 連結網址link.hrefReq免改common · link.required=[href]
relString(100)Yeslink.rel 關係類型link.relOpt免改common · link.required=[href]
media_typeString(100)Yeslink.media-typelink.media-typeOpt免改(連字號)common · link.required=[href]
resource_fragmentNEWString(255)Yes連結指向資源內的片段(如錨點);對應 OSCAL link.resource-fragment。link.resource-fragmentOpt新增(連字號)common · link.required=[href]
textNEWTextYes連結的顯示文字;對應 OSCAL link.text。link.textOpt新增common · link.required=[href]
FK / soft-ref:
→ metadata via oscal_metadata_links(N:N)

oscal_locations oscal OSCAL OSCAL 標準(location 地點)

metadata.locations 地點(機房 / 辦公地址等)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoLocation UUID(unique)location.uuidRequuidcommon · location.required=[uuid]
titleString(255)Yeslocation.title 地點名稱location.titleOpt免改common · location.required=[uuid]
addressTextYeslocation.address 地址location.addressOpt—(OSCAL 為結構物件)common · location.required=[uuid]
remarksTextYes補充說明location.remarksOpt免改common · location.required=[uuid]
FK / soft-ref:
→ metadata via oscal_metadata_locations(N:N)

oscal_remarks oscal OSCAL OSCAL 標準(remarks 備註)

markup-multiline 補充說明(可含 HTML/Markdown);多層級複用。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
contentTextNoremarks.content 備註內容(markup-multiline remarks 本體)免改(共用抽出表)common · metadata.required=[title,last-modified,version,oscal-version]
FK / soft-ref:
→ metadata via oscal_metadata_remarks(N:N)

oscal_resources oscal OSCAL 🆕 規劃新增 OSCAL 標準(back-matter resource)

OSCAL back-matter resource(附件 / citation / rlink / 嵌入檔);補 round-trip 缺口。注意 oscal_documents 是原始檔 blob,≠ resource。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoresource.uuid(REQ)resource.uuidReq新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
context_typeString(30)No掛載文件型別 catalog/profile/ssp/ap/ar新增(多型掛載)—(內部/審計/產品欄,無 OSCAL 對應)
context_idIntegerNo依 context_type 指向(soft)新增—(內部/審計/產品欄,無 OSCAL 對應)
titleString(255)Yesresource.titleresource.titleOpt新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
descriptionTextYesresource.descriptionresource.descriptionOpt新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
citation_textTextYescitation.text(有 citation 則 REQ)resource.citation.textOpt*新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
rlink_hrefString(500)Yesrlink.href(有 rlink 則 REQ)resource.rlinks[].hrefOpt*新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
base64_valueTextYesbase64.value(有嵌入檔則 REQ)resource.base64.valueOpt*新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
media_typeString(100)Yesrlink/base64 media-typerlinks/base64.media-typeOpt新增common · back-matter resource.uuid required;rlink.href/base64.value/citation.text 用到才必填
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
context_id → 依 context_type 多型(soft)

oscal_hashes oscal OSCAL 🆕 規劃新增 OSCAL 標準(hash)

OSCAL hash(掛 resource.rlinks);oscal_documents.hash 是整檔雜湊,語意不同。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
resource_idIntegerNoFK→oscal_resources.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
valueString(255)Nohash.value(REQ)hash.valueOpt*新增common · hash.required=[value,algorithm]
algorithmString(50)Nohash.algorithm(REQ)如 SHA-256hash.algorithmOpt*新增common · hash.required=[value,algorithm]
FK / soft-ref:
resource_id → oscal_resources.id(FK, CASCADE)

oscal_document_ids oscal OSCAL 🆕 規劃新增 OSCAL 標準(document-id)

OSCAL document-id(metadata / resource 的 document-ids[])。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
context_typeString(30)Nometadata / resource新增(多型)—(內部/審計/產品欄,無 OSCAL 對應)
context_idIntegerNo依 context_type 指向(soft)新增—(內部/審計/產品欄,無 OSCAL 對應)
identifierString(255)Nodocument-id.identifier(REQ)document-id.identifierOpt*新增common · document-id.required=[identifier]
schemeString(255)Yesdocument-id.schemedocument-id.schemeOpt新增common · document-id.required=[identifier]
FK / soft-ref:
context_id → 依 context_type 多型(soft)

oscal_revisions oscal OSCAL 🆕 規劃新增 OSCAL 標準(metadata.revisions[])

OSCAL metadata.revisions[] 修訂歷史;取代單一 oscal_metadatas.revision 純量(存不了清單)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
metadata_idIntegerNoFK→oscal_metadatas.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
versionString(100)Norevision.version(REQ)revision.versionOpt*新增common · revision.required=[version]
titleString(255)Yesrevision.titlerevision.titleOpt新增common · revision.required=[version]
publishedDateTime(tz)Yesrevision.publishedrevision.publishedOpt新增common · revision.required=[version]
last_modifiedDateTime(tz)Yesrevision.last-modifiedrevision.last-modifiedOpt新增(連字號)common · revision.required=[version]
oscal_versionString(20)Yesrevision.oscal-versionrevision.oscal-versionOpt新增(連字號)common · revision.required=[version]
FK / soft-ref:
metadata_id → oscal_metadatas.id(FK, CASCADE)

② 合規資源庫(Module Frame)

包裝一個 OSCAL Profile + 指向一份樣板 SSPoscal.ssps is_template=True,FR-036 起取代 *_defaults 系列表);新專案啟動時 clone 樣板 SSP 成專案 SSP。樣板 SSP 是 SSP 預設內容的 single source of truth。

erDiagram module_frames }o..|| profiles : "wraps (oscal_profile_uid)" module_frames ||--o{ module_frames_trans : "i18n" module_frames ||..|| ssps : "template_ssp_id (樣板 SSP, is_template=True)" ssps ||--|| ssp_system_characteristics : "樣板系統特性" ssps ||--o{ ssp_components : "樣板元件" ssps ||--o{ ssp_control_implementations : "樣板控制項實作" profiles ||--o{ profile_controls : "include/exclude 控制項" profile_controls ||--o{ profile_assessment_workflow_mapping : "綁工作流程"
⚠️ FR-036 變更(Phase 1 已套用):module_frame_*_defaults 系列表不再使用。範本內容改存成一份樣板 SSPoscal.sspsis_template=True),由 module_frames.template_ssp_id 指向;啟動專案時 clone 樣板 SSP → 專案 SSP。
• 原 6 張 *_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 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidString(36)No唯一識別碼—(非 OSCAL:本專案擴充/內部表)
nameString(255)No名稱—(非 OSCAL:本專案擴充/內部表)
groupString(255)No群組—(非 OSCAL:本專案擴充/內部表)
template_uidString(255)Yes範本 UID—(非 OSCAL:本專案擴充/內部表)
frequencyString(255)No稽核頻率—(非 OSCAL:本專案擴充/內部表)
versionString(255)No版本—(非 OSCAL:本專案擴充/內部表)
last_execute_dateDateTimeYes最後執行日—(非 OSCAL:本專案擴充/內部表)
next_execute_dateDateTimeYes下次執行日—(非 OSCAL:本專案擴充/內部表)
enableIntegerNo啟用(預設 0)—(非 OSCAL:本專案擴充/內部表)
descriptionTextYes描述—(非 OSCAL:本專案擴充/內部表)
providerString(255)Yes提供者—(非 OSCAL:本專案擴充/內部表)
is_deleteIntegerNo軟刪除(0/1)—(非 OSCAL:本專案擴充/內部表)
oscal_framework_version_uidString(36)Nosoft-ref → oscal_framework_versions.uid—(非 OSCAL:本專案擴充/內部表)
oscal_profile_uidString(36)Nosoft-ref → profiles.uid(包裝的 Profile)—(非 OSCAL:本專案擴充/內部表)
template_ssp_idFR-036IntegerYes樣板 SSP ID(soft-ref → oscal.ssps.id, is_template=True)。啟動專案時 clone 此樣板 SSP 成專案 SSP;FR-036 取代原 module_frame_*_defaults 表族。—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
tenant_idIntegerNo租戶(RLS)—(非 OSCAL:本專案擴充/內部表)
org_unit_idIntegerYes組織單位—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
oscal_profile_uid → profiles.uid(soft)
oscal_framework_version_uid → oscal_framework_versions.uid(soft)
template_ssp_id → oscal.ssps.id(soft, is_template=True)— FR-036
tenant_id → tenants.id / org_unit_id → org_units.id(RLS)

module_frames_trans compliance 擴充 本專案擴充(i18n 翻譯表)

module_frames 的多語系翻譯(name / group / description)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
module_frame_idIntegerNoFK→module_frames.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
language_codeString(10)No語言代碼—(非 OSCAL:本專案擴充/內部表)
nameString(255)Yes翻譯名稱—(非 OSCAL:本專案擴充/內部表)
groupString(255)Yes翻譯群組—(非 OSCAL:本專案擴充/內部表)
descriptionTextYes翻譯描述—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
module_frame_id → module_frames.id(FK, CASCADE)

profile_assessment_workflow_mapping oscal 擴充 擴充(Profile↔工作流程)

把 Profile 控制項的評估樣板(catalog_control_assessment)綁定到工作流程範本,定義評估自動化流程(paw_mapping)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
profile_control_idIntegerNoFK→profile_controls.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
catalog_control_assessment_idIntegerNoFK→catalog_control_assessments.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
workflow_template_idIntegerNoFK→compliance.workflow_templates.id(flow-engine)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
profile_control_id → profile_controls.id(FK, CASCADE)
catalog_control_assessment_id → catalog_control_assessments.id(FK, CASCADE)
workflow_template_id → compliance.workflow_templates.id(跨子系統 → flow-engine)
Unique 三元組

③ 專案管理(Project / AP / AR / SSP)

GRC 專案啟動後:clone 出 AP(評估計畫)與 SSP(系統安全計畫),跑稽核任務(橋接 flow-engine),產出 AR(評估結果與發現)。

erDiagram projects ||--|| project_extensions : "1:1 (module_frame_id)" projects ||--o{ project_participants : "" projects ||--o{ project_assessment_plan_mapping : "" project_assessment_plan_mapping }o--|| assessment_plans : "" assessment_plans ||--o{ assessment_plan_groups : "" assessment_plan_groups ||--o{ assessment_plan_controls : "" assessment_plans ||--o{ assessment_plan_tasks : "" assessment_plan_tasks }o--o{ assessment_plan_controls : "task_controls" assessment_plans ||--|| assessment_plan_extensions : "1:1" assessment_plan_tasks ||..o{ workflow_exec : "→ flow-engine" assessment_plans ||--o{ assessment_results : "" assessment_results ||--o{ assessment_result_datas : "run_no" assessment_result_datas ||--o{ assessment_result_controls : "verdict" assessment_result_controls ||--o{ assessment_result_evidences : "" assessment_result_controls ||--o{ assessment_result_findings : "缺失" assessment_result_findings ||--o| poams : "矯正 ar_finding_id" poams }o--|| assessment_plans : "所屬 AP" assessment_plans ||..|| ssps : "ssp_id(每輪一版 SSP)" ssps ||--|| ssp_system_characteristics : "" ssps ||--o{ ssp_components : "" ssps ||--o{ ssp_inventory_items : "" ssp_inventory_items }o--o{ ssp_components : "implemented_components" ssps ||--o{ ssp_leveraged_authorizations : "" ssps ||--o{ ssp_control_implementations : "" ssp_control_implementations ||--o{ ssp_control_implementation_objectives : "" ssp_control_implementations ||..o{ ssp_reference_documents : "程序書池"

▸ 專案核心(Project / 參與者 / 報告)

projects compliance 擴充 擴充(GRC 專案容器)

GRC 專案核心表(定義於 jedi-project 套件);每個專案 = 一次稽核活動。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidUUIDNo唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
tenant_idIntegerNo租戶(RLS)—(非 OSCAL:本專案擴充/內部表)
org_unit_idIntegerYes組織單位—(非 OSCAL:本專案擴充/內部表)
nameString(255)No專案標題—(非 OSCAL:本專案擴充/內部表)
descriptionTextYes專案描述—(非 OSCAL:本專案擴充/內部表)
start_dateDateTimeYes開始時間—(非 OSCAL:本專案擴充/內部表)
end_dateDateTimeYes結束時間—(非 OSCAL:本專案擴充/內部表)
statusString(50)Yespending / active / completed—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
tenant_id → tenants.id / org_unit_id → org_units.id

project_extensions compliance 擴充 擴充(1:1 延伸 projects)

GRC 專案延伸欄位(綁啟動時的 module_frame、負責人、軟刪除)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
project_idIntegerNoFK→projects.id(unique 1:1, CASCADE)—(非 OSCAL:本專案擴充/內部表)
module_frame_idIntegerYes啟動時的 module_frame(無 FK,clone 後獨立)—(非 OSCAL:本專案擴充/內部表)
owner_idIntegerYes專案負責人(soft → users.id)—(非 OSCAL:本專案擴充/內部表)
deleted_atDateTimeYes軟刪除時間(NULL=未刪)—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
project_id → projects.id(FK, CASCADE)
module_frame_id / owner_id(soft)

project_participants compliance 擴充 擴充(專案級參與者)

專案層級參與者與角色。

PK:(project_id, user_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
project_idIntegerNo專案 id(PK)—(非 OSCAL:本專案擴充/內部表)
user_idIntegerNo使用者 id(PK,FK→users.id)—(非 OSCAL:本專案擴充/內部表)
roleString(20)Nomanager / reviewer / auditor / viewer—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
user_id → users.id
project_id(soft)

project_group_participants compliance 擴充 擴充(群組級參與者)

特定控制項群組下的參與者與角色。

PK:(project_id, group_id, user_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
project_idIntegerNo專案 id(PK)—(非 OSCAL:本專案擴充/內部表)
group_idIntegerNo群組 id(PK)—(非 OSCAL:本專案擴充/內部表)
user_idIntegerNo使用者 id(PK, FK→users.id)—(非 OSCAL:本專案擴充/內部表)
roleString(20)Nomanager / reviewer / auditor / viewer—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
user_id → users.id
project_id / group_id(soft)

project_control_participants compliance 擴充 擴充(控制項級參與者)

特定控制項下的參與者與角色(control_id 指 assessment_plan_controls.id)。

PK:(project_id, group_id, control_id, user_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
project_idIntegerNo專案 id(PK)—(非 OSCAL:本專案擴充/內部表)
group_idIntegerNo群組 id(PK)—(非 OSCAL:本專案擴充/內部表)
control_idIntegerNo控制項 id(PK,soft → assessment_plan_controls.id)—(非 OSCAL:本專案擴充/內部表)
user_idIntegerNo使用者 id(PK, FK→users.id)—(非 OSCAL:本專案擴充/內部表)
roleString(20)Nomanager / reviewer / auditor / viewer—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
user_id → users.id
project_id / group_id / control_id(soft)

control_group_participants compliance 擴充 擴充(群組關聯參與者)

群組層級(非個別控制項)的參與者。

PK:(project_id, group_id, user_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
project_idIntegerNo專案 id(PK,便查)—(非 OSCAL:本專案擴充/內部表)
group_idIntegerNo群組 id(PK)—(非 OSCAL:本專案擴充/內部表)
user_idIntegerNo使用者 id(PK, FK→users.id)—(非 OSCAL:本專案擴充/內部表)
roleString(20)Nomanager / reviewer / auditor / viewer—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
user_id → users.id
project_id / group_id(soft)

process_participants compliance 擴充 擴充(流程參與者)

特定流程中的參與者與角色。

PK:(project_id, process_id, user_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
project_idIntegerNo專案 id(PK)—(非 OSCAL:本專案擴充/內部表)
process_idIntegerNo流程 id(PK)—(非 OSCAL:本專案擴充/內部表)
user_idIntegerNo使用者 id(PK)—(非 OSCAL:本專案擴充/內部表)
roleString(20)Nomanager / reviewer / auditor / viewer—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
全欄位 soft-ref(無 FK)

project_org_unit_mapping compliance 擴充 擴充(Project↔OrgUnit)

專案與組織單位的多對多關聯。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
project_idIntegerNoFK→projects.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
org_unit_idIntegerNoFK→org_units.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
project_id → projects.id(FK, CASCADE)
org_unit_id → org_units.id(FK, CASCADE)
Unique(project_id, org_unit_id)

project_system_characteristic_mapping compliance 擴充 擴充(Project↔SSP 系統特性)

專案與 SSP 系統特性的多對多關聯。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
project_idIntegerNoFK→projects.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
system_characteristic_idIntegerNoFK→ssp_system_characteristics.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
project_id → projects.id(FK, CASCADE)
system_characteristic_id → oscal.ssp_system_characteristics.id(FK, CASCADE)
Unique 二元組

project_assessment_plan_mapping compliance 擴充 擴充(Project↔AP 橋接)

專案與評估計畫(AP)的對應橋接。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
project_idIntegerNoFK→projects.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
assessment_plan_idIntegerNoFK→oscal.assessment_plans.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
project_id → projects.id(FK, CASCADE)
assessment_plan_id → oscal.assessment_plans.id(FK, CASCADE)
Unique 二元組

project_summary_reports compliance 擴充 擴充(專案總結報告)

專案總結報告主檔。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidString(50)No唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
project_idIntegerNoFK→projects.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
nameTextNo報告名稱—(非 OSCAL:本專案擴充/內部表)
summaryTextYes報告摘要—(非 OSCAL:本專案擴充/內部表)
is_deleteIntegerNo軟刪除(0/1)—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
project_id → projects.id(FK, CASCADE)

project_summary_report_histories compliance 擴充 擴充(報告歷史)

總結報告編輯/還原歷史快照。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidString(50)No唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
report_idIntegerNoFK→project_summary_reports.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
typeString(10)NoU=更新 / R=還原—(非 OSCAL:本專案擴充/內部表)
nameTextYes名稱快照—(非 OSCAL:本專案擴充/內部表)
summaryTextYes摘要快照—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
report_id → project_summary_reports.id(FK, CASCADE)

▸ 評估計畫 AP(Assessment Plan)+ 工作流程橋接

assessment_plans oscal OSCAL OSCAL 標準(AP 核心)

評估計畫主檔;一次具體執行的稽核。profile_id/ssp_id 為溯源 soft-ref。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)assessment-plan.uuidRequuidap · assessment-plan.required=[uuid,metadata,import-ssp,reviewed-controls]
metadata_idIntegerNoFK→oscal_metadatas.id(CASCADE)metadataReq免改(FK)ap · assessment-plan.required=[uuid,metadata,import-ssp,reviewed-controls]
document_idIntegerNoFK→oscal_documents.id(CASCADE)—(內部/審計/產品欄,無 OSCAL 對應)
profile_idString(36)Yes來源 Profile(溯源 soft)—(追溯)—(內部/審計/產品欄,無 OSCAL 對應)
ssp_idString(36)Yes來源 SSP(溯源 soft)import-ssp.hrefReq—(stringified int,見 import_ssp)ap · import-ssp.required=[href]
titleString(200)No稽核計畫名稱—(OSCAL 在 metadata.title)—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextYes說明—(產品;OSCAL 在 metadata)—(內部/審計/產品欄,無 OSCAL 對應)
statusString(30)Nodraft / active / completed / archived—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
start_dateDateYes開始日—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
end_dateDateYes結束日—(內部/審計/產品欄,無 OSCAL 對應)
frozen_atDateTimeYes凍結時間(結構定版)—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTimeNo建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
import_sspNEWUUIDYes本 AP 評估的 SSP UUID;對應 OSCAL import-ssp.href。既有 ssp_id(存 stringified int 追溯)保留並存。import-ssp.hrefReq新增(存 ssp uuid)ap · import-ssp.required=[href]
FK / soft-ref:
metadata_id → oscal_metadatas.id(FK)
document_id → oscal_documents.id(FK)
profile_id / ssp_id(soft)

assessment_plan_groups oscal OSCAL OSCAL 標準(AP 群組快照)

AP freeze 當下的控制項群組結構快照(對應 Catalog Group)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidUUIDNo唯一識別碼(unique)—(非 OSCAL:本專案擴充/內部表)
assessment_plan_idIntegerNoFK→assessment_plans.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
parent_group_idIntegerYes父群組(self-ref, CASCADE)—(非 OSCAL:本專案擴充/內部表)
nameString(100)No群組名稱—(非 OSCAL:本專案擴充/內部表)
descriptionTextYes說明—(非 OSCAL:本專案擴充/內部表)
order_noIntegerNo排序—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
assessment_plan_id → assessment_plans.id(FK, CASCADE)
parent_group_id → self(FK, CASCADE)

assessment_plan_controls oscal OSCAL OSCAL 標準(AP 控制項快照)

AP 納入的控制項快照(不與 Catalog 建 FK;進度追蹤的核心承載點)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)免改(內部)ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id]
assessment_plan_idIntegerNoFK→assessment_plans.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
group_idIntegerNoFK→assessment_plan_groups.id(CASCADE)—(擴充群組)—(內部/審計/產品欄,無 OSCAL 對應)
control_idString(50)No控制項識別碼,如 AC-02select-control-by-id.control-idReq免改ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id]
control_titleTextYes標題快照—(snapshot)—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextYesstatement / description—(snapshot)—(內部/審計/產品欄,無 OSCAL 對應)
guidanceTextYesguidance—(snapshot)—(內部/審計/產品欄,無 OSCAL 對應)
includeBooleanNo是否納入(預設 True)include-controls/exclude—(布林扁平)ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id]
order_noIntegerYes排序—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_plan_id → assessment_plans.id(FK, CASCADE)
group_id → assessment_plan_groups.id(FK, CASCADE)
id ← ssp_reference_document_mappings.context_id(程序書掛載點)

assessment_plan_tasks oscal OSCAL OSCAL 標準(AP Task)

稽核任務(評估物件 / Assessment Object);實際要執行的稽核行為。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo唯一識別碼(unique)task.uuidRequuidap · task.required=[uuid,type,title]
assessment_plan_idIntegerNoFK→assessment_plans.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
catalog_control_assessment_idIntegerYes來源評估樣板(soft)—(來源)—(內部/審計/產品欄,無 OSCAL 對應)
task_codeString(50)NoTask 編碼,如 AP-AC02-01—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(1000)No標題task.titleReq免改ap · task.required=[uuid,type,title]
descriptionTextYes說明task.descriptionOpt免改ap · task.required=[uuid,type,title]
assessment_methodsJSONNoexamine / interview / test—(屬 activity/assessment-method,非 task)—(內部/審計/產品欄,無 OSCAL 對應)
task_typeString(50)Yesmanual / automated / hybrid🔧 欄位語意衝突 原:此欄存 manual / automated / hybrid(佔用了 OSCAL task.type 的名稱)→ 新:manual/automated/hybrid 移到 prop,task_type 改存 OSCAL task.type 值域 milestone / action。task.typeReq—(詞彙 manual/hybrid→milestone/action)ap · task.required=[uuid,type,title]
statusString(50)Nopending / in_progress / complete—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
sequenceIntegerYes執行順序—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_plan_id → assessment_plans.id(FK, CASCADE)
catalog_control_assessment_id(soft)

assessment_task_controls oscal OSCAL OSCAL 標準(Task↔Control M:N)

稽核任務與控制項的多對多接合。

PK:(task_id, control_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
task_idIntegerNoFK→assessment_plan_tasks.id(PK, CASCADE)—(非 OSCAL:本專案擴充/內部表)
control_idIntegerNoFK→assessment_plan_controls.id(PK, CASCADE)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
task_id → assessment_plan_tasks.id(FK, CASCADE)
control_id → assessment_plan_controls.id(FK, CASCADE)

assessment_plan_extensions compliance 擴充 擴充(AP 1:1 延伸)

為 AP 綁 main workflow_execution 與範本 snapshot(不改 jedi-oscal)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
assessment_plan_idIntegerNoFK→oscal.assessment_plans.id(unique 1:1, CASCADE)—(非 OSCAL:本專案擴充/內部表)
workflow_execution_uidUUIDYes綁定的 main workflow_execution.uid—(非 OSCAL:本專案擴充/內部表)
flow_template_snapshot_uidUUIDYes採用的範本 snapshot.uid—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
assessment_plan_id → oscal.assessment_plans.id(跨 schema FK, CASCADE)

assessment_plan_task_workflow_mapping oscal 擴充 擴充(Task↔範本 橋接)

稽核任務 ↔ 工作流程範本(→ flow-engine 子系統)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
assessment_plan_task_idIntegerNoFK→assessment_plan_tasks.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
workflow_template_idIntegerNoFK→compliance.workflow_templates.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
assessment_plan_task_id → assessment_plan_tasks.id(FK, CASCADE)
workflow_template_id → compliance.workflow_templates.id(跨子系統 → flow-engine)
Unique 二元組

assessment_plan_task_workflow_execution_mapping oscal 擴充 擴充(Task↔執行 橋接)

稽核任務 ↔ 工作流程執行實例(→ flow-engine 子系統)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
assessment_plan_task_idIntegerNoFK→assessment_plan_tasks.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
workflow_execution_idIntegerNoFK→compliance.workflow_executions.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
assessment_plan_task_id → assessment_plan_tasks.id(FK, CASCADE)
workflow_execution_id → compliance.workflow_executions.id(跨子系統 → flow-engine)
Unique 二元組

workflow_execution_control_mapping compliance 擴充 擴充(執行↔框架版本×控制項)

工作流程執行 ↔ 框架版本 × 控制項(3 元組)。

PK:(workflow_execution_id, version_id, control_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
workflow_execution_idIntegerNoFK→compliance.workflow_executions.id(PK, CASCADE)—(非 OSCAL:本專案擴充/內部表)
version_idIntegerNoFK→oscal.oscal_framework_versions.id(PK, CASCADE)—(非 OSCAL:本專案擴充/內部表)
control_idString(50)No控制項 id(PK)—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
workflow_execution_id → compliance.workflow_executions.id(FK, CASCADE)
version_id → oscal.oscal_framework_versions.id(FK, CASCADE)

▸ 評估結果 AR(Assessment Results)

assessment_results oscal OSCAL OSCAL 標準(AR 文件主檔)

OSCAL assessment-results 文件主檔(可含多次執行結果)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoAR 文件 UUIDassessment-results.uuidRequuidar · assessment-results.required=[uuid,metadata,import-ap,results]
metadata_idIntegerNoFK→oscal_metadatas.id(RESTRICT)metadataReq免改(FK)ar · assessment-results.required=[uuid,metadata,import-ap,results]
document_idIntegerNoFK→oscal_documents.id(RESTRICT)—(內部/審計/產品欄,無 OSCAL 對應)
assessment_plan_idIntegerNoFK→assessment_plans.id(CASCADE),來源 APimport-ap.hrefReq—(內部FK,見 import_ap)ar · import-ap.required=[href]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
import_apNEWUUIDYes本 AR 來源的 AP UUID;對應 OSCAL import-ap.href。既有 assessment_plan_id(FK)保留並存。import-ap.hrefReq新增(存 ap uuid)ar · import-ap.required=[href]
FK / soft-ref:
metadata_id → oscal_metadatas.id(FK, RESTRICT)
document_id → oscal_documents.id(FK, RESTRICT)
assessment_plan_id → assessment_plans.id(FK, CASCADE)

assessment_result_datas oscal OSCAL OSCAL 標準(results[] 單次執行)

單次稽核執行結果(run_no 區分多輪)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoResult Data UUIDresult.uuidRequuidar · result.required=[uuid,title,description,start,reviewed-controls]
assessment_result_idIntegerNoFK→assessment_results.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
run_noIntegerNo第幾次執行—(產品多輪)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(200)Yes本次標題🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL result.title 必填。result.titleReq免改(nullable→NN)ar · result.required=[uuid,title,description,start,reviewed-controls]
started_atDateTime(tz)Yes開始時間🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:對應 OSCAL result.start 必填。result.startReq改名→start(nullable→NN)ar · result.required=[uuid,title,description,start,reviewed-controls]
completed_atDateTime(tz)Yes完成時間result.endOpt改名→endar · result.required=[uuid,title,description,start,reviewed-controls]
remarksString(1000)Yes備註result.remarksOpt免改ar · result.required=[uuid,title,description,start,reviewed-controls]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
descriptionNEWREQTextNo本次稽核執行的描述;對應 OSCAL result.description(必填)。result.descriptionReq新增ar · result.required=[uuid,title,description,start,reviewed-controls]
FK / soft-ref:
assessment_result_id → assessment_results.id(FK, CASCADE)
Unique(assessment_result_id, run_no)

assessment_result_controls oscal OSCAL OSCAL 標準(reviewed-controls 判定)

單次執行中某控制項的稽核判定結果(verdict)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo控制項稽核結果 UUID免改(內部;OSCAL 無此物件)ap · reviewed-controls.required=[control-selections];select-control-by-id.required=[control-id]
assessment_result_data_idIntegerNoFK→assessment_result_datas.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
control_idString(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_titleString(300)Yes標題(snapshot)—(snapshot)—(內部/審計/產品欄,無 OSCAL 對應)
verdictString(30)Yespass / 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
confidenceIntegerYes信心 0–100—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
rationaleString(1000)Yes判定理由—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
remarksString(1000)Yes補充說明—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_result_data_id → assessment_result_datas.id(FK, CASCADE)

assessment_result_evidences oscal OSCAL OSCAL 標準(evidence 證據)

支撐控制項判定的證據(file / link / text / system)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo證據 UUID免改(內部;relevant-evidence 無 uuid)ar · relevant-evidence.required=[description]
assessment_result_control_idIntegerNoFK→assessment_result_controls.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
evidence_typeString(30)Nofile / link / text / system—(產品分類)—(內部/審計/產品欄,無 OSCAL 對應)
descriptionString(1000)Yes證據說明🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL relevant-evidence.description 必填。relevant-evidence.descriptionReq免改(nullable→NN)ar · relevant-evidence.required=[description]
file_idIntegerYes上傳檔案 id(soft)—(soft)—(內部/審計/產品欄,無 OSCAL 對應)
reference_urlString(500)Yes外部連結 / 系統 URLrelevant-evidence.hrefOpt改名→hrefar · relevant-evidence.required=[description]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_result_control_id → assessment_result_controls.id(FK, CASCADE)
file_id(soft)

assessment_result_findings oscal OSCAL OSCAL 標準(findings 發現事項)

稽核發現事項(缺失/觀察/建議);POA&M 主要來源。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoFinding UUIDfinding.uuidRequuidar · finding.required=[uuid,title,description,target]
assessment_result_control_idIntegerNoFK→assessment_result_controls.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
ao_uidString(36)Yes對應的 Assessment Object(AP Task)uid(soft)—(產品 AO 對應)—(內部/審計/產品欄,無 OSCAL 對應)
categoryString(50)Nodeficiency / observation / recommendation—(產品;OSCAL 用 prop)—(內部/審計/產品欄,無 OSCAL 對應)
severityString(20)Nolow / medium / high / critical—(產品;OSCAL 用 prop)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(300)Yes標題🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL finding.title 必填。finding.titleReq免改(nullable→NN)ar · finding.required=[uuid,title,description,target]
descriptionString(2000)No描述finding.descriptionReq免改ar · finding.required=[uuid,title,description,target]
recommendationString(2000)Yes改善建議(可轉 POA&M)—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_result_control_id → assessment_result_controls.id(FK, CASCADE)
ao_uid(soft)

assessment_result_observations oscal OSCAL 🆕 規劃新增 OSCAL 標準(observation)

OSCAL result.observations[]。目前只有 control 層簡化 evidence,缺 methods/collected/subjects/origins。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoobservation.uuid(REQ)observation.uuidOpt*新增ar · observation.required=[uuid,description,methods,collected](observations 選填)
assessment_result_data_idIntegerNoFK→assessment_result_datas.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextNoobservation.description(REQ)observation.descriptionOpt*新增ar · observation.required=[uuid,description,methods,collected](observations 選填)
methodsJSONBNoobservation.methods(REQ)EXAMINE/INTERVIEW/TESTobservation.methodsOpt*新增ar · observation.required=[uuid,description,methods,collected](observations 選填)
typesJSONBYesobservation.typesobservation.typesOpt新增ar · observation.required=[uuid,description,methods,collected](observations 選填)
collectedDateTime(tz)Noobservation.collected(REQ)observation.collectedOpt*新增ar · observation.required=[uuid,description,methods,collected](observations 選填)
expiresDateTime(tz)Yesobservation.expiresobservation.expiresOpt新增ar · observation.required=[uuid,description,methods,collected](observations 選填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_result_data_id → assessment_result_datas.id(FK, CASCADE)

assessment_result_risks oscal OSCAL 🆕 規劃新增 OSCAL 標準(risk)

OSCAL result.risks[](含 status / characterization / response / risk-log / threat-id)。目前完全沒表。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNorisk.uuid(REQ)risk.uuidOpt*新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
assessment_result_data_idIntegerNoFK→assessment_result_datas.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(300)Norisk.title(REQ)risk.titleOpt*新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
descriptionTextNorisk.description(REQ)risk.descriptionOpt*新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
statementTextNorisk.statement(REQ)risk.statementOpt*新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
statusString(30)Norisk.status(REQ)open/investigating/remediating/closed…risk.statusOpt*新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
characterizationsJSONBYescharacterizations[](facets)risk.characterizationsOpt新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
mitigating_factorsJSONBYesmitigating-factors[]risk.mitigating-factorsOpt新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
remediationsJSONBYesremediations/response[]risk.remediations(response)Opt新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
risk_logJSONBYesrisk-log entriesrisk.risk-logOpt新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
threat_idsJSONBYesthreat-ids[]risk.threat-idsOpt新增ar · risk.required=[uuid,title,description,statement,status](risks 選填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
assessment_result_data_id → assessment_result_datas.id(FK, CASCADE)

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 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
finding_idIntegerNoFK→assessment_result_findings.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
target_typeString(40)Nofinding-target.type(REQ)statement-id/objective-idfinding-target.typeReq新增(type builtin→target_type)ar · finding-target.required=[type,target-id,status];status.state required
target_idString(100)Nofinding-target.target-id(REQ)finding-target.target-idReq新增ar · finding-target.required=[type,target-id,status];status.state required
status_stateString(30)Nostatus.state(REQ)satisfied/not-satisfiedfinding-target.status.stateReq新增ar · finding-target.required=[type,target-id,status];status.state required
implementation_statusString(30)Yesimplementation-status.statefinding-target.implementation-status.stateOpt新增ar · finding-target.required=[type,target-id,status];status.state required
related_observationsJSONBYesrelated-observations(observation-uuid[])finding.related-observations[].observation-uuidOpt新增ar · finding.required=[uuid,title,description,target]
related_risksJSONBYesrelated-risks(risk-uuid[])finding.related-risks[].risk-uuidOpt新增ar · finding.required=[uuid,title,description,target]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
finding_id → assessment_result_findings.id(FK, CASCADE)

▸ 矯正計畫 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 欄位必填改名後參考依據
idIntegerNoPK(BaseModel)—(內部/審計/產品欄,無 OSCAL 對應)
uidString(36)No唯一識別碼poam-item.uuidReq免改OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema)
assessment_plan_idIntegerNosoft → oscal.assessment_plans.id(所屬 AP)—(soft-ref)—(內部/審計/產品欄,無 OSCAL 對應)
ar_finding_idIntegerNosoft → 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_identifierString(50)No控制項識別碼(自 ar_control 帶入)—(產品帶入)—(內部/審計/產品欄,無 OSCAL 對應)
ao_uidString(36)Nosoft → assessment_plan_tasks.uid(評估物件 AO;退件補件用)—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
statusString(30)Noopen / in_progress / closed(預設 open)—(產品 prop)—(內部/審計/產品欄,無 OSCAL 對應)
closed_atDateTimeYes結案時間(status→closed 時自動寫,reopen 時清除)—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
tenant_idIntegerNo租戶(RLS)—(內部/審計/產品欄,無 OSCAL 對應)
org_unit_idIntegerYes組織單位—(內部/審計/產品欄,無 OSCAL 對應)
remediation_planTextYes矯正計畫(open→in_progress 必填)—(產品;≠ description)—(內部/審計/產品欄,無 OSCAL 對應)
due_dateDateYes矯正期限—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
assignee_uidString(36)Yessoft → users.uid(矯正負責人)—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTimeNo建立時間(BaseModel)—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTimeNo更新時間(BaseModel)—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者(BaseModel)—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者(BaseModel)—(內部/審計/產品欄,無 OSCAL 對應)
import_sspNEWString(36)Yes本矯正計畫對應的 SSP UUID;對應 OSCAL import-ssp.href。import-ssp.hrefOpt新增(存 ssp uuid)OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema)
titleNEWREQString(255)No矯正項目標題;對應 OSCAL poam-item.title(必填)。poam-item.titleReq新增OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema)
descriptionNEWREQTextNo矯正項目的問題描述;對應 OSCAL poam-item.description(必填)。與既有 remediation_plan(矯正計畫做法)語意不同。poam-item.descriptionReq新增OSCAL POA&M · poam-item.required=[uuid,title,description](POA&M model 非本5份schema)
FK / soft-ref:
ar_finding_id → oscal.assessment_result_findings.id(soft,矯正來源)
assessment_plan_id → oscal.assessment_plans.id(soft)
ao_uid → oscal.assessment_plan_tasks.uid(soft;in_progress 時退回該 AO workflow 補件)
assignee_uid → users.uid(soft)
狀態機:open→in_progress→closed;closed→in_progress(reopen)。前置:poam→closed 需該 AP 全部 POA&M closed

▸ 系統安全計畫 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 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoSSP UUIDsystem-security-plan.uuidRequuidssp · system-security-plan.required=[uuid,metadata,import-profile,system-characteristics,system-implementation,control-implementation]
profile_idIntegerNoFK→profiles.idimport-profile.hrefReq—(內部FK,見 import_profile)ssp · import-profile.required=[href]
metadata_idIntegerNoFK→oscal_metadatas.idmetadataReq免改(FK)ssp · system-security-plan.required=[uuid,metadata,import-profile,system-characteristics,system-implementation,control-implementation]
document_idIntegerNoFK→oscal_documents.id—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextYes描述—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
group_idUUIDNoSSP identity(跨版本不變)—(SSP 版本identity,產品)—(內部/審計/產品欄,無 OSCAL 對應)
version_noIntegerNo版本號(每輪 +1)—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
statusString(20)Nodraft / ready / archived—(產品 draft/ready/archived)—(內部/審計/產品欄,無 OSCAL 對應)
template_module_frame_idIntegerYes源頭 module_frame(lineage, soft)—(FR-036 lineage)—(內部/審計/產品欄,無 OSCAL 對應)
is_templateFR-036BooleanNo是否為樣板 SSP(True=module_frame 範本源頭,clone 成專案 SSP 的母本;專案 SSP 一律 False)。預設 false。SSP 清單 / AP / dashboard / 匯出一律排除 is_template=True。FR-036 新增。—(FR-036,非 OSCAL)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
import_profileNEWUUIDYes本 SSP 套用的 Profile(基準線)UUID;對應 OSCAL import-profile.href(匯出時合成 href="#uuid")。既有 profile_id(內部 FK)保留並存。import-profile.hrefReq新增(存 profile uuid)ssp · import-profile.required=[href]
FK / soft-ref:
profile_id → profiles.id(FK)
metadata_id → oscal_metadatas.id(FK)
document_id → oscal_documents.id(FK)
template_module_frame_id → module_frames.id(soft)
Unique(group_id, version_no)

ssp_system_characteristics oscal OSCAL OSCAL 標準(system-characteristics)

SSP 系統特性(FIPS 199 分類、系統識別、範圍);1:1 對應 SSP。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo外部識別碼免改(內部UUID,OSCAL sys-char 無 uuid)ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
system_security_plan_idIntegerNoFK→ssps.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
owner_uidString(50)Yes系統擁有者(soft → users.uid)—(產品 soft-ref)—(內部/審計/產品欄,無 OSCAL 對應)
nameString(255)No評估目標名稱system-characteristics.system-nameReq改名→system_namessp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
descriptionTextYes描述🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL system-characteristics.description 必填。system-characteristics.descriptionReq免改(nullable→NN)ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
system_identifierString(100)No系統識別碼,如 AIDC-DPCEsystem-ids[].idReq—(OSCAL 為陣列+identifier-type)ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
security_sensitivity_levelString(20)Nolow / moderate / high(FIPS 199)security-sensitivity-levelOpt免改(連字號)ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
target_typeString(50)Noit_system / management_system / logical_scope—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
scope_descriptionTextYes範圍 / 邊界描述🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:對應 OSCAL authorization-boundary.description 必填。authorization-boundary.descriptionReq—(巢狀;nullable→NN)ssp · authorization-boundary.required=[description]
statusString(20)Noactive / archived🔧 詞彙改值 原值:active / archived → 新值:operational / under-development / under-major-modification / disposition / other。原因:對齊 OSCAL status.state 值域。status.stateReq—(巢狀+詞彙 active/archived→OSCAL state)ssp · status.required=[state]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
system_name_shortNEWString(100)Yes系統簡稱;對應 OSCAL system-name-short。system-name-shortOpt新增(連字號)ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
date_authorizedNEWDateYes系統獲得授權(ATO)的日期;對應 OSCAL date-authorized。date-authorizedOpt新增(連字號)ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
network_architecture_descriptionNEWTextYes網路架構描述;對應 OSCAL network-architecture.description。network-architecture.descriptionOpt*新增ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
data_flow_descriptionNEWTextYes資料流描述;對應 OSCAL data-flow.description。data-flow.descriptionOpt*新增ssp · system-characteristics.required=[system-ids,system-name,description,system-information,status,authorization-boundary]
security_objective_confidentialityNEWString(50)Yes機密性安全衝擊等級(fips-199-low / moderate / high);對應 OSCAL security-impact-level.security-objective-confidentiality。security-impact-level.security-objective-confidentialityOpt*新增ssp · security-impact-level.required=[三 objective](本身選填)
security_objective_integrityNEWString(50)Yes完整性安全衝擊等級;對應 OSCAL security-impact-level.security-objective-integrity。security-impact-level.security-objective-integrityOpt*新增ssp · security-impact-level.required=[三 objective](本身選填)
security_objective_availabilityNEWString(50)Yes可用性安全衝擊等級;對應 OSCAL security-impact-level.security-objective-availability。security-impact-level.security-objective-availabilityOpt*新增ssp · security-impact-level.required=[三 objective](本身選填)
FK / soft-ref:
system_security_plan_id → ssps.id(FK, CASCADE)
owner_uid → users.uid(soft)
id ← project_system_characteristic_mapping.system_characteristic_id

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 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoOSCAL block uid免改(內部UUID,system-implementation 無 uuid)ssp · system-implementation.required=[components]
scope_typeString(20)Nossp / module_frame—(產品多型)—(內部/審計/產品欄,無 OSCAL 對應)
scope_idIntegerNo依 scope_type 指向(soft FK)—(產品多型)—(內部/審計/產品欄,無 OSCAL 對應)
remarksTextYesblock remarkssystem-implementation.remarksOpt免改ssp · system-implementation.required=[components]
props_jsonbJSONBYesblock propssystem-implementation.propsOpt改名→props?(評估)ssp · system-implementation.required=[components]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
scope_id → ssps.id 或 module_frames.id(依 scope_type, soft)
Unique(scope_type, scope_id)

ssp_components oscal OSCAL OSCAL 標準(component 抽象元件)

授權邊界內的抽象元件(服務/軟體/硬體/政策…14 type);可關聯繼承授權。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoComponent UUIDsystem-component.uuidRequuidssp · system-component.required=[uuid,type,title,description,status]
ssp_idIntegerNoFK→ssps.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
component_typeString(40)No14 OSCAL type 或 other(software/hardware/service/policy…)system-component.typeReq免改(type builtin 物件前綴名)ssp · system-component.required=[uuid,type,title,description,status]
titleString(255)No標題system-component.titleReq免改ssp · system-component.required=[uuid,type,title,description,status]
descriptionTextYes描述🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL component.description 必填。system-component.descriptionReq免改(nullable→NN)ssp · system-component.required=[uuid,type,title,description,status]
purposeTextYes用途system-component.purposeOpt免改ssp · system-component.required=[uuid,type,title,description,status]
statusString(20)Yesoperational / under-development…🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL component.status 必填。system-component.status.stateReq—(巢狀;nullable→NN)ssp · system-component.required=[uuid,type,title,description,status]
leveraged_authorization_uidUUIDYessoft → ssp_leveraged_authorizations.uid—(產品 soft-ref)—(內部/審計/產品欄,無 OSCAL 對應)
propsJSONBYesprops(implementation-point / cmmc:category…)system-component.propsOpt免改ssp · system-component.required=[uuid,type,title,description,status]
tenant_idIntegerNoRLS(soft → tenants.id)—(內部/審計/產品欄,無 OSCAL 對應)
org_unit_idIntegerYessoft → org_units.id—(內部/審計/產品欄,無 OSCAL 對應)
is_activeBooleanNo軟刪除(預設 True)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
ssp_id → ssps.id(FK, CASCADE)
leveraged_authorization_uid → ssp_leveraged_authorizations.uid(soft)
tenant_id / org_unit_id(soft, RLS)

ssp_inventory_items oscal OSCAL OSCAL 標準(inventory-item 實際資產)

實際部署資產(具體 host / IP / asset_tag);FR-032 asset_type + 資訊系統 hybrid soft-ref。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoInventoryItem UUIDinventory-item.uuidRequuidssp · inventory-item.required=[uuid,description]
ssp_idIntegerNoFK→ssps.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
descriptionTextNo描述(OSCAL 必填)inventory-item.descriptionReq免改ssp · inventory-item.required=[uuid,description]
propsJSONBYesprops(asset_id / ipv4_address / fqdn / hostname…)inventory-item.propsOpt免改ssp · inventory-item.required=[uuid,description]
asset_typeString(40)Nohardware / information_system(預設 hardware)—(FR-032 產品)—(內部/審計/產品欄,無 OSCAL 對應)
ref_typeString(40)Yesinformation_system(未來 device);自由輸入為 NULL—(FR-032)—(內部/審計/產品欄,無 OSCAL 對應)
ref_idString(64)Yessoft → information_systems.uid;自由輸入為 NULL—(FR-032)—(內部/審計/產品欄,無 OSCAL 對應)
tenant_idIntegerNoRLS(soft)—(內部/審計/產品欄,無 OSCAL 對應)
org_unit_idIntegerYessoft—(內部/審計/產品欄,無 OSCAL 對應)
is_activeBooleanNo軟刪除(預設 True)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
ssp_id → ssps.id(FK, CASCADE)
ref_id → information_systems.uid(soft, 可 NULL)
tenant_id / org_unit_id(soft)

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_idIntegerNoFK→ssp_inventory_items.id(PK, CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
component_idIntegerNoFK→ssp_components.id(PK, CASCADE)implemented-component.component-uuidOpt*—(OSCAL 用 uuid,現 int FK)ssp · implemented-component.required=[component-uuid]
FK / soft-ref:
inventory_item_id → ssp_inventory_items.id(FK, CASCADE)
component_id → ssp_components.id(FK, CASCADE)

ssp_leveraged_authorizations oscal OSCAL OSCAL 標準(leveraged-authorization)

引用的上游 ATO(如 FedRAMP CSP);SSP 從此繼承控制項實作。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoLeveraged-auth UUIDleveraged-authorization.uuidRequuidssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized]
ssp_idIntegerNoFK→ssps.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(255)No授權標題leveraged-authorization.titleReq免改ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized]
party_uuidUUIDYessoft → oscal_parties.uid(授權方/CSP)🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL leveraged-authorization.party-uuid 必填。leveraged-authorization.party-uuidReq免改(nullable→NN)ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized]
date_authorizedDateYes授權日期🔧 約束收緊 原:可為 NULL → 新:NOT NULL。原因:OSCAL date-authorized 必填。leveraged-authorization.date-authorizedReq免改(連字號;nullable→NN)ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized]
propsJSONBYesprops(fedramp_package_id / impact_level…)leveraged-authorization.propsOpt免改ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized]
remarksTextYes備註leveraged-authorization.remarksOpt免改ssp · leveraged-authorization.required=[uuid,title,party-uuid,date-authorized]
tenant_idIntegerNoRLS(soft)—(內部/審計/產品欄,無 OSCAL 對應)
org_unit_idIntegerYessoft—(內部/審計/產品欄,無 OSCAL 對應)
is_activeBooleanNo軟刪除(預設 True)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
ssp_id → ssps.id(FK, CASCADE)
party_uuid → oscal_parties.uid(soft)
tenant_id / org_unit_id(soft)

ssp_control_implementations oscal OSCAL OSCAL 標準(control-implementation)

每條控制項在本 SSP 的實作狀態+描述;control_identifier 在 SSP 內唯一。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNo控制項實施 UUIDimplemented-requirement.uuidRequuidssp · implemented-requirement.required=[control-id,uuid]
system_security_plan_idIntegerNoFK→ssps.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
catalog_control_idIntegerYesFK→catalog_controls.id(來源控制,可選)—(來源soft-ref)—(內部/審計/產品欄,無 OSCAL 對應)
control_identifierString(100)No控制項編號,如 AC.L1-3.1.1implemented-requirement.control-idReq改名→control_idssp · implemented-requirement.required=[control-id,uuid]
control_originationString(50)Yesorganization / system-specific / inherited / sharedprop(control-origination)Opt—(OSCAL 用 prop)ssp · control-implementation.required=[description,implemented-requirements]
remarksTextYes備註implemented-requirement.remarksOpt免改ssp · implemented-requirement.required=[control-id,uuid]
implementation_statusString(30)Nounknown / implemented / partial / inherited / not_applicable / not_implementedby-component.implementation-status.stateOpt—(OSCAL 在 by-component)ssp · control-implementation.required=[description,implemented-requirements]
implementation_descriptionTextYes系統特定實作說明—(產品彙整)—(內部/審計/產品欄,無 OSCAL 對應)
responsible_roleString(100)Yes負責角色implemented-requirement.responsible-roles[].role-idOpt—(單值 vs 多值)common · responsible-role.required=[role-id]
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
descriptionNEWREQTextNo控制項實作區塊的整體描述;對應 OSCAL control-implementation.description(必填)。control-implementation.descriptionReq新增(block-level)ssp · control-implementation.required=[description,implemented-requirements]
FK / soft-ref:
system_security_plan_id → ssps.id(FK, CASCADE)
catalog_control_id → catalog_controls.id(FK, 可選)
Unique(system_security_plan_id, control_identifier)

ssp_control_implementation_objectives oscal OSCAL OSCAL 標準(statement / objective)

控制項底下各評估目標([a][b]…)的實作細節;比 control-impl 細一階。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoObjective UUIDstatement.uuidRequuidssp · statement.required=[statement-id,uuid]
system_security_plan_idIntegerNoFK→ssps.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
control_implementation_idIntegerNoFK→ssp_control_implementations.id(CASCADE)免改(FK)—(內部/審計/產品欄,無 OSCAL 對應)
control_identifierString(100)No控制項編號—(冗余便查)—(內部/審計/產品欄,無 OSCAL 對應)
statement_identifierString(100)No目標識別符,如 a / bstatement.statement-idReq改名→statement_idssp · statement.required=[statement-id,uuid]
implementation_statusString(50)Yes實施狀態—(產品)—(內部/審計/產品欄,無 OSCAL 對應)
implementation_descriptionTextYes實施說明—(內部/審計/產品欄,無 OSCAL 對應)
remarksTextYes備註statement.remarksOpt免改ssp · statement.required=[statement-id,uuid]
reference_documentsJSONBYes參考文件清單(預設 [])—(程序書池,非 OSCAL)—(內部/審計/產品欄,無 OSCAL 對應)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(100)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(100)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
system_security_plan_id → ssps.id(FK, CASCADE)
control_implementation_id → ssp_control_implementations.id(FK, CASCADE)
Unique(control_implementation_id, statement_identifier)

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 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoinformation-type uuidinformation-type.uuidOpt新增ssp · system-information.required=[information-types];information-type 必填 title,description
system_characteristic_idIntegerNoFK→ssp_system_characteristics.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(255)Noinformation-type.title(REQ)information-type.titleReq新增ssp · system-information.required=[information-types];information-type 必填 title,description
descriptionTextNoinformation-type.description(REQ)information-type.descriptionReq新增ssp · system-information.required=[information-types];information-type 必填 title,description
categorization_systemString(255)Yescategorization.system(有則 REQ)categorization.systemOpt*新增ssp · system-information.required=[information-types];information-type 必填 title,description
confidentiality_impact_baseString(50)Yesconfidentiality-impact.base(有則 REQ)fips-199-*confidentiality-impact.baseOpt*新增ssp · impact.required=[base](C/I/A 選填,有則 base 必填)
confidentiality_impact_selectedString(50)Yesconfidentiality-impact.selectedconfidentiality-impact.selectedOpt新增ssp · impact.required=[base](C/I/A 選填,有則 base 必填)
integrity_impact_baseString(50)Yesintegrity-impact.base(有則 REQ)integrity-impact.baseOpt*新增ssp · impact.required=[base](C/I/A 選填,有則 base 必填)
integrity_impact_selectedString(50)Yesintegrity-impact.selectedintegrity-impact.selectedOpt新增ssp · impact.required=[base](C/I/A 選填,有則 base 必填)
availability_impact_baseString(50)Yesavailability-impact.base(有則 REQ)availability-impact.baseOpt*新增ssp · impact.required=[base](C/I/A 選填,有則 base 必填)
availability_impact_selectedString(50)Yesavailability-impact.selectedavailability-impact.selectedOpt新增ssp · impact.required=[base](C/I/A 選填,有則 base 必填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
system_characteristic_id → ssp_system_characteristics.id(FK, CASCADE)

ssp_system_users oscal OSCAL 🆕 規劃新增 OSCAL 標準(system-implementation.users)

OSCAL system-implementation.users[](system-user)。目前只有 system-characteristics.owner_uid 單一純量。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNouser.uuid(REQ)system-user.uuidOpt*新增ssp · system-user.required=[uuid](users 選填)
ssp_idIntegerNoFK→ssps.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(255)Yesuser.titlesystem-user.titleOpt新增ssp · system-user.required=[uuid](users 選填)
role_idsJSONBYesuser.role-ids[]system-user.role-idsOpt新增ssp · system-user.required=[uuid](users 選填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
ssp_id → ssps.id(FK, CASCADE)

ssp_authorized_privileges oscal OSCAL 🆕 規劃新增 OSCAL 標準(system-user.authorized-privileges)

OSCAL system-user.authorized-privileges[]。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
system_user_idIntegerNoFK→ssp_system_users.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
titleString(255)Noauthorized-privilege.title(REQ)authorized-privilege.titleOpt*新增ssp · authorized-privilege.required=[title,functions-performed]
functions_performedJSONBNoauthorized-privilege.functions-performed(REQ)authorized-privilege.functions-performedOpt*新增ssp · authorized-privilege.required=[title,functions-performed]
FK / soft-ref:
system_user_id → ssp_system_users.id(FK, CASCADE)

ssp_by_components oscal OSCAL 🆕 規劃新增 OSCAL 標準(by-component)

OSCAL implemented-requirement / statement.by-components[](元件層控制項實作 + 繼承責任 export/provided/inherited/satisfied)。目前只到 requirement+objective。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNoby-component.uuid(REQ)by-component.uuidOpt*新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
control_implementation_idIntegerYesFK→ssp_control_implementations.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
objective_idIntegerYesFK→ssp_control_implementation_objectives.id新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
component_uuidUUIDNoby-component.component-uuid(REQ)→ ssp_components.uidby-component.component-uuidOpt*新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
descriptionTextNoby-component.description(REQ)by-component.descriptionOpt*新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
implementation_statusString(30)Yesimplementation-status.stateby-component.implementation-status.stateOpt新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
export_providedJSONBYesexport.provided[]by-component.export.provided[]Opt新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
export_responsibilityJSONBYesexport.responsibility[]by-component.export.responsibility[]Opt新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
inheritedJSONBYesinherited[]by-component.inherited[]Opt新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
satisfiedJSONBYessatisfied[]by-component.satisfied[]Opt新增ssp · by-component.required=[component-uuid,uuid,description](by-components 選填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
control_implementation_id → ssp_control_implementations.id(FK, CASCADE)
component_uuid → ssp_components.uid(soft)

ssp_set_parameters oscal OSCAL 🆕 規劃新增 OSCAL 標準(set-parameter)

OSCAL set-parameter(control-implementation / implemented-requirement / by-component 三層)。目前完全沒表。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
context_typeString(40)Nocontrol_implementation / implemented_requirement / by_component新增(多型)—(內部/審計/產品欄,無 OSCAL 對應)
context_idIntegerNo依 context_type 指向(soft)新增—(內部/審計/產品欄,無 OSCAL 對應)
param_idString(100)Noset-parameter.param-id(REQ)set-parameter.param-idOpt*新增ssp · set-parameter.required=[param-id,values](set-parameters 選填)
valuesJSONBNoset-parameter.values(REQ)set-parameter.valuesOpt*新增ssp · set-parameter.required=[param-id,values](set-parameters 選填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
context_id → 依 context_type 多型(soft)

ssp_diagrams oscal OSCAL 🆕 規劃新增 OSCAL 標準(diagram)

OSCAL authorization-boundary / network-architecture / data-flow 的 diagrams[]。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(內部/審計/產品欄,無 OSCAL 對應)
uidUUIDNodiagram.uuid(REQ)diagram.uuidOpt*新增ssp · diagram.required=[uuid](diagrams 選填)
system_characteristic_idIntegerNoFK→ssp_system_characteristics.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
diagram_contextString(40)Noauthorization_boundary / network_architecture / data_flow新增(auth-boundary/network/data-flow)ssp · diagram.required=[uuid](diagrams 選填)
descriptionTextYesdiagram.descriptiondiagram.descriptionOpt新增ssp · diagram.required=[uuid](diagrams 選填)
captionString(255)Yesdiagram.captiondiagram.captionOpt新增ssp · diagram.required=[uuid](diagrams 選填)
created_atDateTime(tz)No建立時間—(內部/審計/產品欄,無 OSCAL 對應)
updated_atDateTime(tz)No更新時間—(內部/審計/產品欄,無 OSCAL 對應)
created_userString(50)Yes建立者—(內部/審計/產品欄,無 OSCAL 對應)
updated_userString(50)Yes更新者—(內部/審計/產品欄,無 OSCAL 對應)
FK / soft-ref:
system_characteristic_id → ssp_system_characteristics.id(FK, CASCADE)

ssp_component_responsible_roles oscal OSCAL 🆕 規劃新增 OSCAL 標準(component.responsible-roles)

OSCAL component.responsible-roles[](角色 → component link)。

PK:(component_id, role_id)

欄位型別Null說明OSCAL 欄位必填改名後參考依據
component_idIntegerNoFK→ssp_components.id(CASCADE)新增(FK)—(內部/審計/產品欄,無 OSCAL 對應)
role_idString(100)Noresponsible-role.role-id(REQ)responsible-role.role-idOpt*新增common · responsible-role.required=[role-id]
party_uuidsJSONBYesparty-uuids[]responsible-role.party-uuidsOpt新增common · responsible-role.required=[role-id]
FK / soft-ref:
component_id → ssp_components.id(FK, CASCADE)

ssp_reference_documents oscal 擴充 擴充(程序書池本體)

SSP 程序書文件「池」本體(檔案/URL);context_type 多型掛到 control_implementation / objective。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
uidString(36)NoUID(unique)—(非 OSCAL:本專案擴充/內部表)
context_typeString(30)Nocontrol_implementation / objective—(非 OSCAL:本專案擴充/內部表)
context_idIntegerNo依 context_type 指向(soft)—(非 OSCAL:本專案擴充/內部表)
file_idIntegerYesFK→upload_files.id(可選)—(非 OSCAL:本專案擴充/內部表)
descriptionTextYes文件說明—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
updated_atDateTimeNo更新時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
updated_userString(50)Yes更新者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
file_id → public.upload_files.id(可選)
context_id → 依 context_type 多型(soft)

ssp_reference_document_mappings oscal 擴充 擴充(程序書對應層)

程序書 ↔ 控制項/目標的 M:N 對應;context_id 通常指 assessment_plan_controls.id(掛在 AP 進度追蹤)。

PK:id

欄位型別Null說明OSCAL 欄位必填改名後參考依據
idIntegerNoPK—(非 OSCAL:本專案擴充/內部表)
reference_document_idIntegerNoFK→ssp_reference_documents.id(CASCADE)—(非 OSCAL:本專案擴充/內部表)
context_typeString(30)Nocontrol_implementation / objective—(非 OSCAL:本專案擴充/內部表)
context_idIntegerNo通常 → assessment_plan_controls.id(soft)—(非 OSCAL:本專案擴充/內部表)
created_atDateTimeNo建立時間—(非 OSCAL:本專案擴充/內部表)
created_userString(50)Yes建立者—(非 OSCAL:本專案擴充/內部表)
FK / soft-ref:
reference_document_id → ssp_reference_documents.id(FK, CASCADE)
context_id → assessment_plan_controls.id(soft)
Unique(reference_document_id, context_type, context_id)