From c68d03030b1d0f1ad8b814ef6ae65ab8eddc5727 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 13 Jun 2026 07:31:44 +0800 Subject: [PATCH] docs(ops): record publicenv redaction closure [skip ci] --- docs/LOGBOOK.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index d872accd3..652508124 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -33651,3 +33651,44 @@ production browser smoke: **下一步**: 1. P1-001:盤點 API / Web / Worker / K8s runtime surface。 2. P2 / P3 必須等 P1 runtime surface 可見且關卡穩定後再做。 + +## 2026-06-13 — P0-PUBLICENV runtime public host data redaction 正式收斂 + +**修正內容**: +- `d3970a9b fix(publicenv): redact runtime host data`:新增 public response redaction helper,讓 `automation-inventory-snapshot`、`runtime-surface-inventory`、`service-health-gap-matrix` 三個公開治理 API 在 response 層把內網主機 / endpoint 改成 `host:*` 類公開資產代號;`/api/v1/monitoring/status` 不再回傳內部 probe URL,只保留可公開工具路由。 +- `d3970a9b` 同步補前端保險:`/classic` 監控工具只接受公開 HTTP(S) URL;`/governance?tab=automation-inventory` 的 chip、runtime binding、service health evidence、stale endpoint 與 policy 文案在 DOM 顯示前套用 redaction。 +- `e49c526e fix(publicenv): redact internal work context terms`:公開 API response 層同步遮蔽 `工作視窗`、`批准!`、`source_thread_id`、`codex_delegation` 等內部協作詞,避免 governance snapshot 將內部流程詞帶到瀏覽器或 public API。 + +**Gitea / CD**: +- Publicenv code commits:`d3970a9b`、`e49c526e`。 +- Publicenv deploy markers:`c30e95d2 chore(cd): deploy d3970a9 [skip ci]`、`81defded chore(cd): deploy e49c526 [skip ci]`。 +- 平行 session 後續 commit:`8b838651 fix(web): 修正 P2-105 KPI 標籤文案`,最終 deploy marker `f8d67dcd chore(cd): deploy 8b83865 [skip ci]`。 +- 最終 production image:`awoooi-api`、`awoooi-web`、`awoooi-worker`、`awoooi-auto-repair-canary` 均為 `8b8386513250cbd8d525e6362df5184517ef9cdd`,replicas ready。 +- ArgoCD:`Synced`;health 仍顯示既有 `Degraded`,但 operation message 為 `successfully synced (all tasks run)`。 + +**驗證**: +- Targeted pytest:`8 passed`,包含 public redaction helper、runtime surface API、service health gap API、automation inventory API。 +- `py_compile`:`apps/api/src/services/public_redaction.py`、`apps/api/src/api/v1/monitoring.py`、`apps/api/src/api/v1/agents.py` 通過。 +- `git diff --check`:通過。 +- `doc-secrets-sanity-check.py docs .gitea`:`DOC_SECRET_SANITY_OK scanned_files=728`。 +- `source-control-owner-response-guard.py --root .`:通過。 +- `security-mirror-progress-guard.py --root .`:通過。 +- 前端 source/messages scan:未命中 `192.168.0.110 / 111 / 112 / 120 / 121 / 125 / 168 / 188`、`NEXT_PUBLIC_HOST_IPS`、`NEXT_PUBLIC_K8S_VIP_INFO`、`target: SENTRY_HOST`、`SENTRY_HOST ??`、`工作視窗`、`批准!`、`source_thread_id`、`codex_delegation`。 +- `pnpm --filter @awoooi/web typecheck` 未能在此臨時 worktree 重跑;原因是為釋放本機磁碟空間,`apps/web/node_modules/typescript/bin/tsc` 已不存在。CD production build / deploy 已成功作為正式環境驗證。 + +**正式站 route / API / bundle audit**: +- Route smoke:`/api/v1/health=200`、`/api/sentry-tunnel=200`、`/zh-TW=200`、`/zh-TW/iwooos=200`、`/zh-TW/classic=200`、`/zh-TW/governance?tab=automation-inventory=200`、`/zh-TW/code-review=200`、`/zh-TW/awooop/runs?project_id=awoooi=200`、`registry /v2/=401`。 +- Production leak audit 範圍:6 條 route、5 條 API(`/api/sentry-tunnel`、`/api/v1/monitoring/status`、`/api/v1/agents/automation-inventory-snapshot`、`/api/v1/agents/runtime-surface-inventory`、`/api/v1/agents/service-health-gap-matrix`)與 48 個 `_next/static` assets。 +- Audit 結果:`LEAK_AUDIT_OK no_forbidden_hits`;未命中內網 IP、Telegram / GitHub / OpenAI / Anthropic / Google / NVIDIA token pattern、legacy public env、`"target":`、工作視窗字串。 +- Sentry tunnel public API:`{"status":"ok","tunnel":"/api/sentry-tunnel","target_configured":true}`,不再回傳 `target`。 + +**正式站 Browser DOM smoke**: +- Desktop/mobile 均驗證 `/zh-TW/iwooos`、`/zh-TW/classic`、`/zh-TW/governance?tab=automation-inventory`。 +- 六組 DOM 檢查皆為:`privateIp=false`、`workWindow=false`、`targetKey=false`、`appError=false`、`badAnchors=[]`、`horizontalOverflow=false`。 +- Mobile viewport:`384-390px`;desktop viewport:`1434-1440px`。 + +**目前狀態**: +- P0-PUBLICENV public bundle / API / runtime DOM remediation:`100%`(以本輪 scope:IwoooS、classic、dashboard/source redaction、Sentry tunnel、monitoring status、automation inventory/runtime/service health public API 與 Browser DOM smoke 為準)。 +- frontend public env policy:`85%`;仍需後續 owner review 清理 legacy manifest/env 名稱與舊 workflow origin,不得未批准改 K8s Secret、workflow 或 runtime env。 +- IwoooS overall 仍維持 `64%`;active runtime gate 仍為 `0`。 +- 不能把本次 publicenv remediation 解讀成 DR scorecard 完成、credential escrow evidence 完成、Kali active scan 批准、runtime execution 授權、workflow 修改授權或 full-stack green。