Files
awoooi/docs/security/SECURITY-MIRROR-ROUTE.md

60 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 資安鏡像路由矩陣
| 項目 | 內容 |
|------|------|
| 日期 | 2026-05-13 |
| 狀態 | 草案 |
| Schema | `docs/schemas/security_mirror_route_v1.schema.json` |
| Snapshot | `docs/security/security-mirror-route.snapshot.json` |
| 模式 | `mirror_only` |
| runtime 執行授權 | `false` |
## 0. 核心結論
`security_mirror_route_v1` 是 AwoooP 消費資安供應鏈 contracts 時的只讀分流矩陣。
它只回答三個問題:
1. 哪些 contract 應該進 Operator Console / Runtime State / Channel Event / Audit evidence / Approval Queue。
2. 哪些 contract 只能顯示、哪些需要人工 review lane。
3. 哪些處理永遠 blocked避免 mirror evidence 被誤解為 execution authorization。
這個契約不新增任何 runtime endpoint、不新增執行按鈕、不啟動 Kali scan、不做 Gitea/GitHub refs sync。
## 1. Route Groups
| Route group | 目的 | 初期 channel policy | review lane |
|-------------|------|---------------------|-------------|
| `M0_index_bootstrap` | 載入 readiness、manifest、policy、event、intake、route、acceptance、quarantine、dry-run、status rollup、S3 review packet 與 state transition 位置 | `no_channel_event` | `observe` |
| `M1_kali_visibility` | 顯示 Kali 112、111 / 168 scope、approval queue 與 finding sample | `approval_required_only` | `approval_required` |
| `M2_source_control_visibility` | 顯示 Gitea / GitHub repo、branch、tag、canonical 差異 | `low_noise_status` | `source_control_review` |
| `M3_approval_candidates` | 顯示人工批准候選、S3 gate、decision record、review packet、state transition 與留痕 | `approval_required_only` | `approval_required` |
| `M4_patch_only_backlog` | 顯示 Code Review 後的 Codex patch-only backlog lane | `no_channel_event` | `patch_only` |
## 2. AwoooP 可做
1. 依 route group 顯示不同 review lane。
2. 把 ready / partial snapshot 包成 `security_mirror_event_v1`
3. 把高風險候選放進 Approval Queue但不執行。
4. 把 LOW / MEDIUM observation 留在 observe / warn。
5. 將每個 route group 的 blocked processing 顯示給 Operator。
## 3. AwoooP 不可做
1. 不新增 scan、execute、repo、refs、deploy、secret 類執行按鈕。
2. 不把 Approval Queue 視為 execution queue。
3. 不把 GitHub target `not_found_or_private` 視為可自動建立 repo。
4. 不把 refs truth classification 視為可自動 sync refs。
5. 不把 Kali health / finding sample 視為可啟動 active scan。
6. 不保存 raw secret、token、cookie、private key 或 exploit payload。
## 4. 驗收
S2.7 後AwoooP 主線只需要能讀到:
1. 31 個 contracts。
2. 5 個 route groups。
3. 所有 route group 都是 `runtime_execution_authorized=false`
4. Channel Event 初期低噪音。
5. Approval Queue 只留痕,不執行。