# 資安後續 Runtime Gate 準備契約 | 項目 | 內容 | |------|------| | 日期 | 2026-05-13 | | 狀態 | 草案 | | Schema | `docs/schemas/security_followup_runtime_gate_v1.schema.json` | | Snapshot | `docs/security/security-followup-runtime-gate.snapshot.json` | | 模式 | `runtime_gate_preparation_only` | | runtime 執行授權 | `false` | ## 0. 核心結論 `security_followup_runtime_gate_v1` 是 S3.4 的後續 runtime gate 準備契約。 它只定義一件事:如果未來某個 `approve_scope` 真的要進一步走向 runtime gate,AwoooP 必須先看到哪些前置 evidence、preflight checks、rollback / disable plan,以及哪些動作仍然禁止。 它不是 runtime gate 本身,也不是執行授權。目前 `active_runtime_gates=0`。 ## 1. 目前狀態 | 指標 | 數量 | |------|------| | Gate templates | 8 | | Active runtime gates | 0 | | Approved scope count | 0 | | Runtime actions authorized | `false` | | Action buttons allowed | `false` | ## 2. Gate Templates | Template | 風險 | 初期定位 | |----------|------|----------| | Redacted finding ingestion | MEDIUM | 只準備 ingestion adapter 的 redaction / audit 前置條件 | | Safe web crawl scope | MEDIUM | 只準備 TLS/header/basic crawl 的低噪音 scope | | Gitea read-only inventory | MEDIUM | 只準備 read-only token 或 redacted export inventory | | GitHub target decision | HIGH | 只準備 owner / visibility / canonical / workflow parity 決策 | | Ref truth review | HIGH | 只準備 refs truth / deprecated / release tag 人工判定 | | Credentialed scan exception | HIGH | 只準備人工 exception、credential lifecycle 與停用方式 | | Kali full-upgrade / reboot | HIGH | 只準備維護窗口、snapshot、rollback 與 post-health | | Kali `/execute` exception | CRITICAL | 預設 blocked,只準備 disable / allowlist / audit 設計 | ## 3. AwoooP 可做 1. 顯示每個 template 需要的 minimum evidence、preflight checks、reviewers 與 rollback / disable requirement。 2. 顯示目前沒有 active runtime gate。 3. 在 `approve_scope` 後提醒仍需要 follow-up runtime gate。 4. 對 Kali `/execute` 顯示 blocked by default。 5. 將 gate preparation 狀態寫入 Audit evidence。 ## 4. AwoooP 不可做 1. 不啟用 runtime gate。 2. 不顯示 scan、execute、repo、refs、deploy、secret 類 action button。 3. 不因為 template 存在就執行 scan、Kali `/execute`、credentialed scan、repo 建立、visibility 修改、refs sync 或 GitHub primary cutover。 4. 不保存 raw secret、token、cookie、private key、credential value 或 exploit payload。 5. 不把 LOW / MEDIUM observation 變成 blocking gate。 ## 5. 階段定位 S3.4 是「批准後仍不能直接做事」的保險絲。 它讓未來真正進 runtime 前的資料門檻先被定義清楚,但仍維持初期低摩擦:目前只顯示、只準備、只留痕,不執行。