📌 專案摘要與合規定位 📌 Executive Summary & Compliance Positioning
本儲存庫為一項企業管治示範專案,展示如何運用 Microsoft 365 原生標準連接器與零信任架構落實「治理即代碼」(Governance-as-Code)。
This repository is an Enterprise Demo showcasing how to implement Governance-as-Code using native Microsoft 365 Standard Connectors and Zero-Trust architecture.
EnterpriseDemo-DOIS 專為對標香港法例第 201 章《防止賄賂條例》(POBO)第 9 條、廉政公署誠信管理指引及 ISO/IEC 27001 資訊安全規範而設計,徹底解決傳統紙本申報「耗時過久、處置未追蹤、員工不知悉結果、審計鏈斷裂」四大痛點。
EnterpriseDemo-DOIS aligns with Section 9 of Hong Kong's Prevention of Bribery Ordinance (POBO, Cap. 201), ICAC integrity guidelines, and ISO/IEC 27001 controls—eliminating paper-based delays, untracked disposals, unacknowledged directives, and broken audit trails.
系統在無需購買額外 Power Platform Premium 授權的前提下,透過雙流程自動化引擎(Flow1 主審批+Flow2 閉環確認)串聯 Microsoft Forms、SharePoint Online、Power Automate 及 Teams Adaptive Cards,達成「員工申報 ➔ RLS 隔離建單 ➔ HR 初審 ➔ 管理層 7 選 1 批示 ➔ HR 實體處置歸檔 ➔ 員工數位確認蓋印 HKT 時間戳記」之 100% 封閉式合規閉環。
Operating with zero Power Platform Premium licensing cost, the dual-flow architecture (Flow1 main approval + Flow2 closure acknowledgment) integrates Microsoft Forms, SharePoint Online, Power Automate, and Teams Adaptive Cards to achieve a 100% closed-loop lifecycle from declaration to HKT-timestamped employee sign-off.
🏛️ 流程生命週期與治理閉環 🏛️ Workflow Lifecycle & Closed-Loop Governance
員工填報 10 項資訊並上傳憑證,自動生成 DEC-YYYYMMDD-ID 並打斷權限繼承。Declarant submits 10 fields with proof; system assigns DEC-YYYYMMDD-ID and breaks role inheritance.
核實估值合理性與單據完整性,一鍵核准呈交管理層,或退回要求員工補正。HR verifies valuation and evidence; approves escalation to management or rejects for amendment.
管理層於 Teams 調適型卡片下拉選取法定處置方案(保留/陳列/分享/抽獎/慈善/退回/其他)。Executives choose one of 7 statutory disposal options via compact Teams Adaptive Card dropdown.
HR 依批示完成實體處置並登錄流水帳,將狀態切換為「已完成歸檔」以觸發子流程。HR executes physical disposal, logs details in SharePoint, and sets status to Archived.
員工按掣確認並蓋印 HKT 時間戳記,發送數位審計收據同時阻斷子流程二次觸發。Employee acknowledges with HKT timestamp; digital audit receipt sent and loop gate locked.
🧪 互動式四部曲治理模擬器(1:1 還原 M365 雙流程引擎) 🧪 Interactive 4-Part Governance Simulator (1:1 Dual-Flow M365 Replica)
親身操作完整 甲 ➔ 乙 ➔ 丙 ➔ 丁 防貪合規閉環:體驗 10 項表單揭露、即時 SharePoint REST API 權限隔離(RLS)指令、HR 審核退件分流、Teams Adaptive Card 7 選 1 下拉批示,以及 Flow2 防無限迴圈門閘與 HKT 審計收據。
Walk through the end-to-end Part A ➔ B ➔ C ➔ D anti-corruption loop: test the 10-field declaration, live SharePoint REST API Row-Level Security payload, HR approve/reject routing, Teams Adaptive Card 7-option dropdown, and Flow2 infinite-loop gate with HKT audit receipt.
📋 業務四部曲治理對照表 📋 Governance & Segregation of Duties Matrix
| 階段Stage | 責任角色Role | 承載平台Platform | 處置動作與審計控制紀錄Governance Action & Audit Control |
|---|---|---|---|
| 甲部:申報Part A: Filing | 申報同事Declarant | Microsoft Forms (Group Form) | 填報 10 項揭露資訊、純數字估值並上傳最多 3 份證明文件;系統自動生成 DEC-YYYYMMDD-ID 並執行 RLS 權限隔離。Submits 10 fields, numeric valuation, and up to 3 supporting files; generates DEC-YYYYMMDD-ID and applies SharePoint RLS. |
| 乙部:初審Part B: Review | HR 團隊HR Team | Outlook / Teams Approvals | 查驗市價與單據完整性,一鍵 Approve 送呈管理層,或 Reject 退回並自動發送補正電郵。Validates fair market value and completeness; approves escalation to management or rejects with email feedback. |
| 丙部:批示Part C: Directive | 管理層 / 董事經理Management / MD | Teams Adaptive Cards (v1.4) | 透過調適型卡片下拉選單(Input.ChoiceSet)於 7 種法定處置選項擇一並附帶具體指令。Selects 1 of 7 statutory disposal directives via compact Input.ChoiceSet dropdown with optional comments. |
| 丁部:落實Part D: Execution | HR 團隊HR Team | SharePoint Online | 收到執行通知後完成實體處置,登錄 DisposalActionLog 並將狀態改為「已完成歸檔」。Executes physical disposal upon notice, records DisposalActionLog, and updates status to Archived. |
| 丁部:閉環Part D: Closure | 申報同事Declarant | Approvals + Audit Email | 經防迴圈門閘派發確認卡片,員工按掣確認並蓋印 HKT 時間戳記,同步寄出不可抵賴數位收據。Loop-guarded acknowledgment card captures HKT timestamp upon click and dispatches non-repudiable digital receipt. |
⚙️ 技術亮點與進階架構 ⚙️ Technical Implementation & Security Architecture
1. 零信任權限隔離 (RLS)Row-Level Security (RLS)
透過 SharePoint REST API(breakroleinheritance)動態打斷單據權限繼承,僅授權申報人、主管與 HR 存取,落實 ISO/IEC 27001 機密性。Calls SharePoint REST API (breakroleinheritance) per item to restrict visibility strictly to declarant, manager, and HR per ISO/IEC 27001.
2. 高管友善調適型卡片Executive Adaptive Cards
以 JSON Adaptive Card v1.4 將 7 項法定處置封裝為下拉選單(Input.ChoiceSet)與備註框,徹底告別冗長審批按鈕。Encapsulates 7 statutory disposal directives into a clean Adaptive Card v1.4 dropdown (Input.ChoiceSet) and remarks input.
3. 零額外授權成本架構Zero-License Architecture
全流程採用 M365 Standard Connectors(Forms、SharePoint、Outlook、Teams、Approvals),免除 Power Platform Premium 授權開支。Built exclusively with M365 Standard Connectors (Forms, SharePoint, Outlook, Teams, Approvals)—zero Premium license overhead.
4. 多附件動態解析管線Dynamic Attachment Pipeline
透過 Parse JSON 校驗附件元數據並批次轉存至 SharePoint 清單;正式環境建議採用 HR Group Forms 防止資產孤立。Validates attachment metadata via Parse JSON and archives files into SharePoint; recommends HR Group Forms in production to avoid orphaned assets.
5. 無限迴圈防禦門閘Infinite Loop Defense Gate
子流程 Flow2 內建雙重 Trigger Condition,僅在已歸檔且未確認時觸發,寫入確認狀態後即時鎖定防二次循環。Flow2 enforces a dual Trigger Condition gate firing only when Archived and Unacknowledged, locking out recursive loops after write-back.
6. 香港時區標準化與收據HKT Normalization & Receipt
全面將 UTC 轉換為 China Standard Time (UTC+8) 寫入時間戳並寄發數位完結收據,滿足法規審計不可抵賴性要求。Converts UTC to China Standard Time (UTC+8) for audit timestamps and issues a digital closure receipt ensuring legal non-repudiation.