From a8ade565fdf681d4e18378523d56701c8d63e34c Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 Jun 2026 03:30:27 +0800 Subject: [PATCH] =?UTF-8?q?docs(iwooos):=20=E8=A8=98=E9=8C=84=20tenants=20?= =?UTF-8?q?=E9=A2=A8=E9=9A=AA=E8=A1=A8=E8=84=AB=E6=95=8F=E9=A9=97=E8=AD=89?= =?UTF-8?q?=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/LOGBOOK.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index a95a767a..130daadf 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,44 @@ +## 2026-06-15|Tenants 風險表公開脫敏與內部狀態碼移除完成 + +**背景**:使用者指出 `/zh-TW/awooop/tenants` 的「原始碼 / 專案庫範圍」不應直接顯示個人 owner namespace、完整 repository slug 或內部 `blocked_waiting_*` 類狀態碼;這類資訊即使來自只讀治理台帳,也不應暴露在公開前端或 public API。這次修正將 Tenants source scope 改為公開安全的範圍代號與繁中狀態說明,並用 guard 鎖住 raw identity、raw readiness code 與內部工作語句不得再次進入前台。 + +**完成項目**: +- `/zh-TW/awooop/tenants` 的原始碼範圍表已改成 `SRC-###` 範圍代號、`已脫敏範圍`、繁中風險等級、繁中待辦狀態與下一步管控,不再顯示 raw owner namespace、完整 repository slug 或內部狀態碼。 +- `GET /api/v1/platform/tenants` 對外 `source_repos[].risk` 已收斂為 `high / medium / low / unknown`,`source_repos[].readiness_state` 已收斂為 `need_refs_evidence / need_target_decision / need_internal_remote_decision / need_scope_review / need_owner_evidence`。 +- `/zh-TW/awooop/tenants` 的全域資產邊界說明已改成繁中人讀文案,避免把 `repo_owner_namespace_redacted=true`、`raw_repository_namespace_visible=false`、`public_api_raw_repo_namespace_allowed=false` 這類內部控制鍵直接顯示給使用者。 +- `security-mirror-progress-guard.py` 已新增 Tenants 公開頁檢查,禁止 `{repo.risk}`、`{repo.readiness_state}`、`namespace_redacted={...}`、raw boundary key、raw source status 與內部工作語句再次進入前台文案。 +- `apps/api/tests/test_awooop_tenant_asset_inventory.py` 已新增 public API contract assertions,確認 payload 不含 `blocked_waiting_`、`observe_scope_review`,且 risk / readiness 只落在公開代碼集合。 + +**本地驗證**: +- `python3 -m json.tool apps/web/messages/zh-TW.json` 與 `apps/web/messages/en.json` 通過。 +- `python3 -m py_compile apps/api/src/services/platform_operator_service.py scripts/security/security-mirror-progress-guard.py` 通過。 +- `DATABASE_URL=postgresql+asyncpg://user:pass@localhost:5432/awoooi_test PYTHONPATH=apps/api python3.11 -m pytest apps/api/tests/test_awooop_tenant_asset_inventory.py` → `2 passed`。 +- `pnpm --dir apps/web typecheck` 通過。 +- `NEXT_PUBLIC_API_URL=https://awoooi.wooo.work SENTRY_SUPPRESS_GLOBAL_ERROR_HANDLER_FILE_WARNING=1 pnpm --dir apps/web build` 通過,92/92 static pages generated。 +- local build artifact scan:個人 owner namespace、外部 raw namespace、完整 agent bounty repository slug、舊英文產品片語、`blocked_waiting_refs_parity`、`blocked_waiting_target_decision`、`blocked_waiting_internal_remote_decision`、`observe_scope_review`、raw boundary key 與工作視窗溝通片語均未命中;`已脫敏範圍`、`下一步管控`、`待參照一致性證據`、`未接受前不得建立專案庫或改可見性`、`不揭露原始負責人或命名空間`、`不顯示完整來源字串` 均可見。 + +**Gitea / CD**: +- Code commit:`d388e5b4 fix(awooop): 脫敏 tenants 風險管控顯示`,已正常 push 到 `gitea/main`,無 force push。 +- Deploy marker:`fe21bfb4 chore(cd): deploy d388e5b [skip ci]`。 +- Gitea Actions:CD `2995` Success、code-review `2996` Success。 +- Code commit:`8eff94a4 fix(awooop): 移除 tenants 公開內部狀態碼`,已正常 push 到 `gitea/main`,無 force push。 +- Deploy marker:`2d27eeb5 chore(cd): deploy 8eff94a [skip ci]`。 +- Gitea Actions:CD `2997` 已產生 deploy marker;code-review `2998` Success。 + +**Production 只讀驗證(deploy marker `2d27eeb5`)**: +- API 連續 8 次 readback:`/api/v1/platform/tenants?_v=8eff94a4-api-redaction-*` 均未命中 `blocked_waiting_` 或 `observe_scope_review`;risk 集合為 `high / medium / low`,readiness 集合為 `need_internal_remote_decision / need_refs_evidence / need_scope_review / need_target_decision`。 +- In-app browser desktop `1440x900`:`/zh-TW/awooop/tenants?_v=8eff94a4-final-redaction` 可見 `脫敏原始碼範圍`、`已脫敏範圍`、`下一步管控`、`待參照一致性證據`、`待目標與可見性決策`、`未接受前不得建立專案庫或改可見性`、`SRC-001`、`SRC-010`;`scrollWidth=1440`、`clientWidth=1440`、`horizontalOverflow=false`。 +- In-app browser mobile `390x844`:同一路由可見相同必要文字與範圍代號;`scrollWidth=390`、`clientWidth=390`、`horizontalOverflow=false`。 +- Production desktop / mobile 均未命中個人 owner namespace、外部 raw namespace、完整 repository slug、舊英文產品片語、`blocked_waiting_refs_parity`、`blocked_waiting_target_decision`、`blocked_waiting_internal_remote_decision`、`observe_scope_review`、`namespace_redacted=true`、`repo_owner_namespace_redacted=true`、`raw_repository_namespace_visible=false`、`public_api_raw_repo_namespace_allowed=false`。 + +**完成度與邊界**: +- Tenants public redaction / risk readability:`100%`。 +- Public API source risk / readiness contract:`100%`。 +- Production API / desktop / mobile sensitive scan:`100%`。 +- IwoooS headline:維持 `64%`;active runtime gate:維持 `0`。 +- owner response received / accepted、target decision accepted、refs parity accepted、repository creation、refs sync、workflow modification、secret collection、runtime execution、action button 全部維持 `0 / false`。 +- 這次完成的是公開資訊外洩修補與前台風險可讀性收斂;不代表 source repo、owner response、GitHub primary、Kali、Nginx、firewall、runner、secret 或任何 runtime 風險已解除。 + ## 2026-06-15|K8s / ArgoCD GitOps 變更證據驗收正式部署與 production 驗證完成 **背景**:110 冷啟動事件中曾出現 ArgoCD `Synced / Degraded`、drift-scanner pod pending、部分服務依賴啟動順序不穩等訊號。既有高價值配置控管已把 K8s / ArgoCD GitOps 列為 C0,但仍缺少專門針對 manifest diff、ArgoCD readback、sync revision、rollout evidence、NetworkPolicy / Secret / RBAC / NodePort 影響與 rollback owner 的只讀驗收帳本。若缺少此層,後續容易把「UI 看得到 GitOps 風險」誤判成 `argocd sync`、`kubectl apply`、Helm upgrade 或 live patch 已獲授權。