Files
awoooi/docs/security/SECURITY-MIRROR-DRY-RUN.md
Your Name 58e760fae2
All checks were successful
CD Pipeline / tests (push) Successful in 1m25s
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / build-and-deploy (push) Successful in 4m2s
CD Pipeline / post-deploy-checks (push) Successful in 1m48s
feat(security): 擴充 S4.10 target owner response
2026-06-11 20:30:41 +08:00

76 lines
5.3 KiB
Markdown
Raw Permalink 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.
# 資安鏡像 Dry-run 報告契約
| 項目 | 內容 |
|------|------|
| 日期 | 2026-05-13 |
| 狀態 | 草案 |
| Schema | `docs/schemas/security_mirror_dry_run_v1.schema.json` |
| Snapshot | `docs/security/security-mirror-dry-run.snapshot.json` |
| 模式 | `mirror_only` |
| runtime 執行授權 | `false` |
## 0. 核心結論
`security_mirror_dry_run_v1` 定義 AwoooP 進行資安供應鏈 mirror-only 接入演練時應回報的結果格式。
本輪只建立契約,尚未代表 AwoooP 已實際執行 dry-run。
## 1. Dry-run Steps
| Step | 目的 | 必須維持 |
|------|------|----------|
| `LOAD_CONTRACT_INDEXES` | 載入 manifest / readiness / route / acceptance / quarantine / workflow-secret inventory indexes | 不執行 contract |
| `CHECK_EVENT_ENVELOPE` | 確認每筆 payload 不可執行、不可顯示執行按鈕 | `execution_authorized=false` |
| `CHECK_ROUTE_COVERAGE` | 確認 route groups 覆蓋所有 contracts | 不建立 fallback execution route |
| `CHECK_ACCEPTANCE_AND_QUARANTINE` | 確認驗收與隔離只處理 mirror payload | 不阻擋 runtime |
| `CHECK_PROGRESS_GUARD` | 確認 58% headline 進度與 micro progress delta ledger 只作狀態顯示 | 不把進度或 delta ledger 當 approval 或 runtime authorization |
| `CHECK_OWNER_RESPONSE_GUARD` | 確認四包 owner response 仍未收到 / 接受,且 S4.9 request packet / template status ledger / audit event templates / redaction examples / display sections / collection checks / preflight / outcome lanes 只提示 owner、逐項顯示 waiting、只定義 0 emitted 的 metadata audit 模板、脫敏範例與只讀 UI 區塊、維持收件狀態分離、分類可審、補證、隔離、拒收或等待S4.10 request packet / template status ledger / audit event templates / redaction examples / collection checks / intake preflight checks 也只提示 9 個 GitHub target 要回覆的欄位、逐項顯示 waiting / request ready、定義 0 emitted 的脫敏 metadata、維持 request / received / accepted 分離並只分類可收、補證、隔離或拒收S4.11 request packet 只提示 5 類 refs truth owner response 欄位template status ledger 逐項顯示 waiting / request readyaudit event templates 只定義 0 emitted 的脫敏 metadataredaction examples 只示範安全 metadata shapecollection checks 只維持 request / received / accepted 分離intake preflight checks 只分類可審、補證、隔離、拒收或等待S4.12 request packet 只提示 5 類 workflow / secret 名稱 owner response 欄位template status ledger 逐項顯示 waiting / request readyaudit event templates 只定義 0 emitted 的脫敏 metadataredaction examples 只示範安全 metadata shapecollection checks 只維持 request / received / accepted 分離intake preflight checks 只分類可審、補證、隔離或拒收 | 不把 guard pass、request packet、template status ledger、audit event templates、redaction examples、collection checks、intake preflight checks 或 response packet 當成 repo、refs、workflow、secret、runner、primary、audit production ingestion 或 runtime 授權 |
| `CHECK_LOW_NOISE_CHANNEL` | 確認 Channel Event 低噪音 | 不對 LOW / MEDIUM 或 non-blocking escalation lanes 洗版 |
| `CONFIRM_NO_RUNTIME_ACTION` | 確認 dry-run 沒有任何 runtime action | 不掃描、不 deploy、不 sync refs |
本地只讀驗證指令:
```text
python3 scripts/security/security-mirror-progress-guard.py
python3 scripts/security/source-control-owner-response-guard.py
```
這兩個指令只讀 committed snapshots確認 dry-run 仍維持 `runtime_actions_executed=false``payloads_ingested=false`,且 owner response received / accepted 仍為 0。
## 1.1 最新本機只讀驗證
| 項目 | 結果 |
|------|------|
| 日期 | 2026-05-18 |
| 範圍 | `repo_snapshot_only` |
| 指令 | `python3 scripts/security/security-mirror-progress-guard.py && python3 scripts/security/source-control-owner-response-guard.py` |
| 結果 | `SECURITY_MIRROR_PROGRESS_GUARD_OK; SOURCE_CONTROL_OWNER_RESPONSE_GUARD_OK` |
| dry-run 狀態 | `contract_defined_not_executed` |
| production ingestion | `false` |
| runtime actions | `false` |
| payload ingestion | `false` |
這表示 repo 內 committed snapshots 的只讀 guard 已通過;不表示 AwoooP production ingestion 已啟用,也不授權任何 scan、execute、repo、refs、workflow、secret、runner 或 primary 動作。
## 2. AwoooP 可做
1. 顯示 dry-run 報告。
2. 顯示每個 step 的 pass / warn / blocked 狀態。
3. 將 dry-run 結果寫入 Audit evidence。
4. 對 blocked step 顯示需要修正的 contract 或 snapshot。
5. 維持 `runtime_actions_executed=false`
## 3. AwoooP 不可做
1. 不把 dry-run 轉成 production ingestion。
2. 不在 dry-run 中啟動 scan、execute、repo、refs、deploy、secret 類動作。
3. 不把 LOW / MEDIUM、缺 owner response、partial mirror、source-control drift、Kali observe finding、workflow / secret name gap 或 headline holding 變成 blocking gate。
4. 不保存 raw secret、token、cookie、private key 或 exploit payload。
5. 不自動建立 repo、不 sync refs、不切 GitHub primary。
## 4. 階段定位
S2.6 只提供 dry-run 報告格式,讓 AwoooP 主線未來可以用同一套欄位回報接入演練。
它仍然屬於框架期,不代表鏡像資料已進 production ingestion也不代表任何執行面已開啟。