Files
awoooi/docs/security/SOURCE-CONTROL-CANONICAL-DECISION-TABLE.md
Your Name 9e15fd08b3
All checks were successful
CD Pipeline / tests (push) Successful in 1m39s
Code Review / ai-code-review (push) Successful in 15s
CD Pipeline / build-and-deploy (push) Successful in 5m19s
CD Pipeline / post-deploy-checks (push) Successful in 2m11s
feat(web): land iwooos security posture surfaces
2026-05-25 20:35:52 +08:00

7.6 KiB
Raw Permalink Blame History

Source Control Canonical Repo 判定表

項目 內容
日期 2026-05-12
狀態 第一版read-only evidence
上游 evidence docs/security/GITEA-PUBLIC-REPO-SEARCH-SNAPSHOT.mddocs/security/LOCAL-GIT-REMOTE-INVENTORY-SNAPSHOT.mddocs/security/GITHUB-TARGET-PROBE-SNAPSHOT.mddocs/security/GITHUB-TARGET-VISIBILITY-DECISION-TABLE.mddocs/security/LOCAL-REPO-CANONICAL-EWOOOC-MOMO-SNAPSHOT.md
原則 只判定風險與下一步,不合併、不同步、不刪除、不切 primary

0. 核心結論

目前不能假設「本機資料夾名稱相近」就代表同一個 canonical repo。

尤其 momo-pro-systemmomo_pro_systemwooo/ewooocroot/momo-pro-system 看起來高度相關,但來源 remote、repo host、HEAD 都不同。第一輪本機 lineage probe 顯示三個 working tree 在最近 100 個 commits sample 內沒有共同 commit因此這一組必須先人工判定 canonical 關係,否則 GitHub 遷移時可能發生錯誤合併、漏轉、或把舊版覆蓋新版。

1. Server-side public search 結果

未提供 token 的 Gitea users/wooo/repos 與 public repo search 可見:

Gitea repo default branch GitHub candidate 狀態
wooo/awoooi main owenhytsai/awoooi 已有 GitHub但 refs blocked
wooo/ewoooc main owenhytsai/ewoooc GitHub candidate 未建立或不可見

此結果只代表 public-only 可見範圍private/internal repos 仍需只讀 token 或管理匯出。操作契約見 docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md

2. P0 canonical 判定

群組 Evidence 目前判定 風險 下一步
ewoooc / momo-pro-system wooo/ewoooc public Gitea repo/Users/ogt/momo-pro-system 與 iCloud momo-pro-system 都指向 Gitealineage probe 顯示兩份 working tree no_shared_history 待人工判定,禁止自動視為複本 同名資料夾不同 HEAD且近期 sample 無共同 commitGitHub target 未確認 確認部署真相、完整 refs / ancestry 後再決定 GitHub target
momo_pro_system / GitLab 110 /Users/ogt/momo_pro_system 指向 root/momo-pro-system GitLab 類 remotelineage probe 顯示與 Gitea 兩份 working tree no_shared_history 待人工判定,禁止自動合併 可能是同產品不同歷史、舊版重建、或完全不同 repo 確認是否仍 active、不得自動合併
bitan-pharmacy 指向 110 SSH 類 remote110 remote main 與本機 main 對齊GitHub owenhytsai/bitan-pharmacy 未授權 probe 看不到 待建立 target GitHub target 未確認 確認是否 active、建立或指定 GitHub target
tsenyang-website 指向 110 SSH 類 remote110 remote main 與本機 main 對齊GitHub owenhytsai/tsenyang-website 未授權 probe 看不到 待建立 target GitHub target 未確認 確認是否仍 active、建立或指定 GitHub target
wooo-infra-config GitHub remote 存在且 main 與本機對齊110 internal remote 因 SSH 權限不足或不可讀 待判定 110 remote 用途 可能是舊 remote、mirror、或權限未配置 確認 110 remote 用途;若為舊 remote降級或移除

2.1 GitHub target probe

GitHub repo probe status heads 判定
owenhytsai/awoooi exists 2 可見但 refs blocked
owenhytsai/clawbot-v5 exists 1 可見但 refs blocked
owenhytsai/wooo-aiops exists 3 可見但 refs blocked
owenhytsai/wooo-infra-config exists 1 可見,需判斷 110 internal remote
owenhytsai/ewoooc not_found_or_private 0 未建立或為 private 且未授權,不能當作已轉移
owenhytsai/bitan-pharmacy not_found_or_private 0 未建立或為 private 且未授權,不能當作已轉移
owenhytsai/tsenyang-website not_found_or_private 0 未建立或為 private 且未授權,不能當作已轉移
nexu-io/open-design exists 186 外部/設計 repo需 scope 判定

2.1.1 GitHub target 決策

docs/security/GITHUB-TARGET-VISIBILITY-DECISION-TABLE.md 顯示:

類型 Repos 判定
refs blocked awoooiclawbot-v5wooo-aiops 不得切 primary需 refs reconcile approval
create / grant access after approval ewooocbitan-pharmacytsenyang-website 不得自動建立或修改 visibility
internal remote purpose pending wooo-infra-config 需確認 110 internal remote 用途
external scope nexu-io/open-design 先做 scope review

此決策只補足 target owner / visibility 的下一步,不取代 canonical 判定與 server-side refs diff。

2.2 Internal 110 refs probe

docs/security/GIT-REMOTE-REFS-BITAN-TSENYANG-SNAPSHOT.md 顯示:

Repo Relation Heads Tags 判定
bitan-pharmacy aligned_current_branch 1 0 110 remote 可作為 source candidate但 GitHub target 未確認
tsenyang-website aligned_current_branch 1 0 110 remote 可作為 source candidate但 GitHub target 未確認
wooo-infra-config GitHub aligned_current_branch 1 0 GitHub target 可讀且與本機 main 對齊
wooo-infra-config 110 internal unreachable 0 0 110 internal remote 用途與權限待判定

3. 本機 lineage evidence

docs/security/LOCAL-REPO-CANONICAL-EWOOOC-MOMO-SNAPSHOT.md 顯示:

比對 Relation Common commits
local-momo-gitea vs icloud-momo-gitea no_shared_history 0
local-momo-gitea vs local-momo-gitlab no_shared_history 0
icloud-momo-gitea vs local-momo-gitlab no_shared_history 0

此結果仍只代表本機 sample未 fetch 遠端;但足以阻止自動把這三者當成同一個 repo 複本處理。

4. 本機 HEAD evidence

Working tree Remote 類型 短 SHA 判定
/Users/ogt/momo-pro-system Gitea wooo/ewoooc 61a9c4c 不可直接視為 iCloud 複本
/Users/ogt/Library/Mobile Documents/com~apple~CloudDocs/momo-pro-system Gitea wooo/ewoooc fe6180b 與本機 momo-pro-system 不同 HEAD
/Users/ogt/momo_pro_system GitLab 類 110 remote 5a4294e wooo/ewoooc 關係待判定
/Users/ogt/bitan-pharmacy 110 SSH 類 remote 7423a08 GitHub target 未確認
/Users/ogt/tsenyang-website 110 SSH 類 remote b103112 GitHub target 未確認

上述短 SHA 只用於人工辨識,不代表 server-side 最新狀態。

5. Credential hygiene

本輪 read-only 檢查發現,部分本機 remote URL 仍含 embedded credential 或個人 token 形式。文件只記錄風險,不記錄任何值。

後續處理 gate

  1. 先完成 repo inventory 與 canonical 判定。
  2. 以 credential helper、只讀 token 或 secret store 取代 embedded credential。
  3. 對既有 token 做 rotation。
  4. 在 AwoooP / AWOOOI audit 中只記錄「已輪替」與 evidence ref不記錄 token value。

6. 下一步

  1. 用只讀 token 或管理匯出取得 Gitea server 全量 repo list。
  2. wooo/ewooocroot/momo-pro-system 做 server-side refs diff。
  3. 確認三個 momo/ewoooc working tree 的產品關係與部署真相。
  4. 確認 bitan-pharmacytsenyang-website 是否仍 active。
  5. 依 GitHub target 決策表完成 repo / owner / visibility approval。
  6. 完成 canonical 判定前,不建立自動 mirror、不刪除任何 remote、不切 GitHub primary。