From 61196b0799048bf18d4816093ed848f279e00837 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 May 2026 15:50:03 +0800 Subject: [PATCH] docs(security): explain headline progress hold --- docs/LOGBOOK.md | 14 ++++ ...curity_mirror_status_rollup_v1.schema.json | 58 +++++++++++++++ ...WOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md | 4 +- ...ECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md | 4 +- docs/security/SECURITY-MIRROR-ACCEPTANCE.md | 2 +- docs/security/SECURITY-MIRROR-DRY-RUN.md | 2 +- .../security/SECURITY-MIRROR-STATUS-ROLLUP.md | 22 ++++++ ...SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md | 2 +- .../SECURITY-SUPPLY-CHAIN-PROGRESS.md | 13 ++++ .../security-mirror-acceptance.snapshot.json | 4 +- .../security-mirror-dry-run.snapshot.json | 2 +- ...ecurity-mirror-status-rollup.snapshot.json | 70 +++++++++++++++++++ ...pply-chain-contract-manifest.snapshot.json | 4 +- .../security-mirror-progress-guard.py | 39 +++++++++++ 14 files changed, 230 insertions(+), 10 deletions(-) diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index fefa3f8c5..acbb648ae 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,17 @@ +## 2026-05-18 | 資安供應鏈:58% Headline Progress 判讀與 Delta Ledger + +**背景**:統帥提醒整體進度看起來像卡住;實際原因是 58% 為 headline progress,只在 owner response、runtime gate、payload ingestion、GitHub primary readiness 或 AwoooP production landing 等高層 gate 有實質 evidence 時調整。近期 S4.10 多輪工作屬於 framework detail,應顯示微進度,但不能灌水成落地進度。 + +**完成**: +- `security_mirror_status_rollup_v1` schema 新增 `progress_display_policy` 與 `progress_delta_ledger`。 +- `security-mirror-status-rollup.snapshot.json` 固定 58% 為 `holding_until_owner_response_or_runtime_gate`,並列出 4 個 S4.10 micro progress:request packet、template status ledger、audit event templates、redaction examples。 +- `SECURITY-MIRROR-STATUS-ROLLUP.md` 與 `SECURITY-SUPPLY-CHAIN-PROGRESS.md` 新增「為什麼 58% 看起來沒動」說明,明確列出 headline 要再往上所需的 owner response / runtime gate / primary readiness evidence。 +- `security-mirror-progress-guard.py` 補驗證 progress display policy 與 delta ledger,避免後續把 micro progress 誤當成 authorization。 + +**仍禁止**: +- 不把 progress delta ledger 當成 approval、runtime gate、scan authorization、repo / refs / workflow / secret / runner 執行授權或 GitHub primary approval。 +- 不為了讓百分比好看而把 read-only scaffold 算成 owner response received、accepted 或 production ingestion。 + ## 2026-05-18 | 資安供應鏈 S4.10:GitHub Target Owner Response Redaction Examples **背景**:S4.10 已有 owner response request packet、7 個 template status ledger 與 3 個 audit event templates;本輪補上 5 個 redaction examples,讓 AwoooP / owner 知道如何用脫敏 metadata 回覆 GitHub target owner / visibility / canonical 決策,避免把 token、private clone URL credential、API raw body、repo archive、git object pack 或 refs 執行指令貼進 response。 diff --git a/docs/schemas/security_mirror_status_rollup_v1.schema.json b/docs/schemas/security_mirror_status_rollup_v1.schema.json index 022fcd82b..3fe594ff3 100644 --- a/docs/schemas/security_mirror_status_rollup_v1.schema.json +++ b/docs/schemas/security_mirror_status_rollup_v1.schema.json @@ -14,6 +14,8 @@ "source_indexes", "summary", "phase_status", + "progress_display_policy", + "progress_delta_ledger", "next_safe_actions", "session_sync_notes", "forbidden_actions" @@ -361,6 +363,62 @@ "additionalProperties": false } }, + "progress_display_policy": { + "type": "object", + "description": "說明 headline percent 為何維持不動,以及哪些 gate 通過後才允許調整整體進度;此欄位只供顯示與跨 Session 同步,不代表批准。", + "required": [ + "headline_percent", + "headline_status", + "why_headline_is_holding", + "recent_micro_progress_visible", + "headline_can_increase_after", + "runtime_execution_authorized", + "not_authorization" + ], + "properties": { + "headline_percent": {"type": "integer", "minimum": 0, "maximum": 100}, + "headline_status": {"type": "string", "enum": ["holding_until_owner_response_or_runtime_gate"]}, + "why_headline_is_holding": {"type": "array", "items": {"type": "string"}, "minItems": 1}, + "recent_micro_progress_visible": {"type": "boolean", "const": true}, + "headline_can_increase_after": {"type": "array", "items": {"type": "string"}, "minItems": 1}, + "runtime_execution_authorized": {"type": "boolean", "const": false}, + "not_authorization": {"type": "boolean", "const": true} + }, + "additionalProperties": false + }, + "progress_delta_ledger": { + "type": "array", + "description": "列出 headline 58% 內部已完成的框架微進度;每筆 delta 都不得當成 runtime、scan、repo 或 primary 授權。", + "items": { + "type": "object", + "required": [ + "delta_id", + "display_order", + "completed_stage", + "progress_axis", + "headline_percent_delta", + "framework_delta_visible", + "why_headline_unchanged", + "runtime_delta", + "execution_authorized", + "not_authorization" + ], + "properties": { + "delta_id": {"type": "string"}, + "display_order": {"type": "integer", "minimum": 1}, + "completed_stage": {"type": "string"}, + "progress_axis": {"type": "string", "enum": ["framework_detail"]}, + "headline_percent_delta": {"type": "integer", "const": 0}, + "framework_delta_visible": {"type": "boolean", "const": true}, + "why_headline_unchanged": {"type": "string"}, + "runtime_delta": {"type": "boolean", "const": false}, + "execution_authorized": {"type": "boolean", "const": false}, + "not_authorization": {"type": "boolean", "const": true} + }, + "additionalProperties": false + }, + "minItems": 1 + }, "next_safe_actions": { "type": "array", "minItems": 1, diff --git a/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md b/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md index 78f1bd91c..38482e06a 100644 --- a/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md +++ b/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md @@ -41,7 +41,7 @@ AwoooP 初期不得直接啟動掃描、不得呼叫 Codex patch runner、不得 | `security_mirror_acceptance_v1` | AwoooP 鏡像驗收契約 | Operator Console、Runtime State、Audit | mirror-only | 只驗收 contract count、event envelope、route coverage、redaction、progress estimate guard;不作 runtime blocker | | `security_mirror_quarantine_v1` | AwoooP 鏡像隔離契約 | Operator Console、Audit | mirror-only | 只隔離驗收失敗 payload、顯示 recovery request 與 retry gate;不作 runtime blocker | | `security_mirror_dry_run_v1` | AwoooP 鏡像 dry-run 報告契約 | Operator Console、Audit | mirror-only | 只回報接入演練結果,且必須包含 progress guard、owner response guard 與 latest local validation;不得轉成 production ingestion | -| `security_mirror_status_rollup_v1` | AwoooP 鏡像狀態彙整契約 | Operator Console、Runtime State、Audit | mirror-only | 只顯示階段狀態、58% 進度估算、下一個 gate 與禁止事項;不得視為 runtime authorization | +| `security_mirror_status_rollup_v1` | AwoooP 鏡像狀態彙整契約 | Operator Console、Runtime State、Audit | mirror-only | 只顯示階段狀態、58% headline 進度、progress display policy、delta ledger、下一個 gate 與禁止事項;不得視為 runtime authorization | | `source_control_owner_response_validation_rollup_v1` | S4.9 / S4.10 / S4.11 / S4.12 owner response validation rollup | Operator Console、Source-control review、Audit | mirror-only | 只顯示四包 response packets、22 個 templates、missing response lanes、owner response collection order、next collection candidate、10 個 cross-packet checks、quarantine rules 與 latest local validation;不得視為 approval 或 runtime gate | | `coding_task_v1` | Code Review / Codex Security / manual review | Approval candidate、Channel Event、Audit | suggest-only | 不自動開 patch runner、不自動 merge | | `source_control_migration_event_v1` | Gitea/GitHub branch/tag/SHA diff | Supply-chain evidence、Approval candidate | mirror-only | 不觸發 deploy、不切換 primary | @@ -111,7 +111,7 @@ AwoooP 初期不得直接啟動掃描、不得呼叫 Codex patch runner、不得 | `security_mirror_acceptance_v1.status=draft` | `observe` | 顯示 8 個 acceptance checks,其中 progress estimate guard 必須確認 58% 不是執行授權;只可驗收鏡像資料,不得阻擋 runtime | | `security_mirror_quarantine_v1.status=draft` | `observe` | 顯示 5 個 quarantine lanes、recovery request 與 retry gate;不得自動重試失敗 payload | | `security_mirror_dry_run_v1.dry_run_status=contract_defined_not_executed` | `observe` | 顯示 8 個 dry-run steps 與 `latest_local_validation.status=repo_snapshot_guard_pass`;`CHECK_PROGRESS_GUARD` 必須維持 58% 不是執行授權,`CHECK_OWNER_RESPONSE_GUARD` 必須維持 owner response received / accepted 皆為 0,不得視為 production ingestion 已啟用 | -| `security_mirror_status_rollup_v1.rollup_status=framework_ready_waiting_approval` | `observe` | 顯示 S0-S4 階段、58% 進度估算、approval queue summary 與下一個 gate;不得新增 execution action | +| `security_mirror_status_rollup_v1.rollup_status=framework_ready_waiting_approval` | `observe` | 顯示 S0-S4 階段、58% headline 進度、micro progress delta ledger、approval queue summary 與下一個 gate;不得新增 execution action | | `source_control_owner_response_validation_rollup_v1.status=draft_waiting_owner_responses` | `observe` | 顯示四包 owner response packets、4 條 missing response lanes、4 步收件順序、22 個 templates、received / accepted / rejected 皆為 0,且 `latest_local_validation.result=SOURCE_CONTROL_OWNER_RESPONSE_GUARD_OK`;不得當成 approval 或 execution authorization | | `coding_task_v1.risk=LOW|MEDIUM` | `warn` | 可排入 Codex patch-only backlog | | `coding_task_v1.risk=HIGH|CRITICAL` | `approve_required` | 必須指定 `critic`、`vuln-verifier` | diff --git a/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md b/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md index e6ef39875..bd32176c9 100644 --- a/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md +++ b/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md @@ -36,6 +36,8 @@ AwoooP 目前應同步顯示 S4.9-S4.13 owner response 缺口、Gitea authenticated inventory partial 狀態、GitHub primary ready 0/7、workflow / secret inventory complete 0,以及 Kali `/execute` block candidate。這些狀態只供治理與人工審查,不代表 scan、repo 建立、refs sync、workflow 修改、secret 搬移、runner 啟用或 GitHub primary cutover 已獲授權。 +2026-05-18 補充:58% 是 headline progress,近期 S4.10 request packet、template status ledger、audit event templates 與 redaction examples 屬於 framework detail,所以會列入 `progress_delta_ledger`,但 `headline_percent_delta=0`。headline 要再往上,需要 owner response received / accepted、redacted payload ingestion、active runtime gate、GitHub primary readiness 或 AwoooP production ingestion 等實質 evidence。 + 同步驗收時可先跑: ```text @@ -889,7 +891,7 @@ Console 初期不提供高風險執行按鈕。 2026-05-13 mirror dry-run 追加,2026-05-18 已對齊 progress guard 與 owner response guard:已新增 `docs/schemas/security_mirror_dry_run_v1.schema.json`、`docs/security/security-mirror-dry-run.snapshot.json` 與 `docs/security/SECURITY-MIRROR-DRY-RUN.md`。AwoooP 未來可用 8 個 dry-run steps 回報接入演練結果;本 snapshot 狀態為 `contract_defined_not_executed`,不得視為 production ingestion 已啟用。 -2026-05-13 mirror status rollup 追加:已新增 `docs/schemas/security_mirror_status_rollup_v1.schema.json`、`docs/security/security-mirror-status-rollup.snapshot.json` 與 `docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md`。AwoooP 與 Security Supply Chain Session 可用同一份 rollup 同步 S0-S4、35 個 contracts、approval queue summary、review packet summary、state transition summary、follow-up runtime gate template summary、GitHub primary readiness summary、rollback ADR summary、workflow / secret name inventory summary 與下一個安全 gate;本契約不授權任何 runtime action。 +2026-05-13 mirror status rollup 追加,2026-05-18 補 progress display policy / delta ledger:已新增 `docs/schemas/security_mirror_status_rollup_v1.schema.json`、`docs/security/security-mirror-status-rollup.snapshot.json` 與 `docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md`。AwoooP 與 Security Supply Chain Session 可用同一份 rollup 同步 S0-S4、35 個 contracts、approval queue summary、review packet summary、state transition summary、follow-up runtime gate template summary、GitHub primary readiness summary、rollback ADR summary、workflow / secret name inventory summary、58% headline progress、micro progress delta ledger 與下一個安全 gate;本契約不授權任何 runtime action。 2026-05-13 S3 approval gate 追加:已新增 `docs/schemas/security_approval_gate_v1.schema.json`、`docs/security/security-approval-gate.snapshot.json` 與 `docs/security/SECURITY-APPROVAL-GATE.md`。AwoooP 可用 8 個 gate items 記錄人工批准、拒絕、延後或補 evidence;批准後仍需 follow-up runtime gate,不得直接執行。 diff --git a/docs/security/SECURITY-MIRROR-ACCEPTANCE.md b/docs/security/SECURITY-MIRROR-ACCEPTANCE.md index 74a14594a..ed1865312 100644 --- a/docs/security/SECURITY-MIRROR-ACCEPTANCE.md +++ b/docs/security/SECURITY-MIRROR-ACCEPTANCE.md @@ -32,7 +32,7 @@ | `EVENT_ENVELOPE_REQUIRED` | 確認每筆 payload 都不可執行、不可顯示執行按鈕 | 是 | | `ROUTE_GROUP_COVERAGE` | 確認 5 個 route groups 覆蓋所有 contracts | 是 | | `REDACTION_ONLY` | 確認不保存 raw sensitive value | 是 | -| `PROGRESS_ESTIMATE_NOT_AUTHORIZATION` | 確認 58% 進度估算只作跨 Session 狀態顯示,不授權 scan / execute / repo / refs / workflow / secret / runner / primary 動作 | 是 | +| `PROGRESS_ESTIMATE_NOT_AUTHORIZATION` | 確認 58% headline 進度與 micro progress delta ledger 只作跨 Session 狀態顯示,不授權 scan / execute / repo / refs / workflow / secret / runner / primary 動作 | 是 | | `LOW_MEDIUM_NOT_BLOCKING` | 確認低中風險 observation 初期只 observe / warn | 否 | | `APPROVAL_IS_NOT_EXECUTION` | 確認 approval 只留痕、不自動執行 | 否 | | `CHANNEL_LOW_NOISE` | 確認通知低噪音 | 否 | diff --git a/docs/security/SECURITY-MIRROR-DRY-RUN.md b/docs/security/SECURITY-MIRROR-DRY-RUN.md index da5400ad7..3f84dad79 100644 --- a/docs/security/SECURITY-MIRROR-DRY-RUN.md +++ b/docs/security/SECURITY-MIRROR-DRY-RUN.md @@ -23,7 +23,7 @@ | `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% 進度估算只作狀態顯示 | 不把進度當 approval 或 runtime authorization | +| `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 也只提示 7 個 GitHub target 要回覆的欄位、逐項顯示 waiting / request ready、定義 0 emitted 的脫敏 metadata | 不把 guard pass、request packet、template status ledger、audit event templates、redaction examples 或 response packet 當成 repo、refs、workflow、secret、runner、primary、audit production ingestion 或 runtime 授權 | | `CHECK_LOW_NOISE_CHANNEL` | 確認 Channel Event 低噪音 | 不對 LOW / MEDIUM 洗版 | | `CONFIRM_NO_RUNTIME_ACTION` | 確認 dry-run 沒有任何 runtime action | 不掃描、不 deploy、不 sync refs | diff --git a/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md b/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md index 253599df9..a8b485814 100644 --- a/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md +++ b/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md @@ -46,6 +46,28 @@ 因此跨 Session 採用 **58%** 作為目前整體進度。這代表「框架健康、尚未過度收緊」,不是 runtime enforcement 或 primary cutover 授權。 +## 1.2 為什麼 58% 看起來沒動 + +58% 是 headline progress,只在高層 gate 真正改變時調整。最近幾輪 S4.10 的工作確實有前進,但屬於框架細節與收件安全,不會直接推高 headline。 + +| 最近完成 | 進度軸 | headline delta | 為什麼整體百分比不變 | +|----------|--------|----------------|----------------------| +| S4.10 request packet | framework detail | 0 | 只顯示 owner 要回覆什麼,不代表 request sent、response received 或 approval | +| S4.10 template status ledger | framework detail | 0 | 只逐項顯示 7 個 target 仍為 waiting,received / accepted 仍為 0 | +| S4.10 audit event templates | framework detail | 0 | event templates 仍為 `template_only_not_emitted`,production ingestion 尚未啟用 | +| S4.10 redaction examples | framework detail | 0 | 只示範安全 metadata shape,不代表 owner response 已收到或可執行 repo / refs / primary 動作 | + +headline 進度要再往上,至少需要下列任一高層 gate 有實質 evidence: + +1. S4.9 Gitea owner attestation response 收到並接受脫敏 evidence。 +2. S4.10 GitHub target owner / visibility / canonical response 收到並接受脫敏 evidence。 +3. S4.11 refs truth owner response 收到並接受脫敏 evidence。 +4. S4.12 workflow / secret name owner response 收到並接受脫敏 evidence。 +5. redacted payload ingestion 或 active runtime gate 在人工批准後啟用。 +6. GitHub primary readiness gate 的 `primary_ready_count` 大於 0。 + +因此現在不是停住,而是進入「避免灌水」的區段:框架小步有累積,但 headline 需要 owner response / runtime gate / primary readiness 這類真正落地訊號才會跳。 + 只讀驗證: ```text diff --git a/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md b/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md index 76d2514f8..cc5645bd9 100644 --- a/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md +++ b/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md @@ -36,7 +36,7 @@ | `security_mirror_acceptance_v1` | mirror-only | AwoooP 只讀鏡像接入驗收 checks | `security-mirror-acceptance.snapshot.json` | | `security_mirror_quarantine_v1` | mirror-only | AwoooP 鏡像驗收失敗隔離與 retry gate | `security-mirror-quarantine.snapshot.json` | | `security_mirror_dry_run_v1` | mirror-only | AwoooP 鏡像接入演練回報格式 | `security-mirror-dry-run.snapshot.json` | -| `security_mirror_status_rollup_v1` | mirror-only | AwoooP / Security Supply Chain 跨 Session 狀態總覽;S4.13 owner response validation rollup 與 next collection candidate | `security-mirror-status-rollup.snapshot.json` / `source-control-owner-response-validation-rollup.snapshot.json` | +| `security_mirror_status_rollup_v1` | mirror-only | AwoooP / Security Supply Chain 跨 Session 狀態總覽;含 58% headline progress、progress display policy、micro progress delta ledger、S4.13 owner response validation rollup 與 next collection candidate | `security-mirror-status-rollup.snapshot.json` / `source-control-owner-response-validation-rollup.snapshot.json` | | `coding_task_v1` | suggest-only | Code Review 接 Codex patch-only | 無正式 snapshot | | `source_control_migration_event_v1` | mirror-only | Gitea/GitHub refs 差異 | `gitea-github-awoooi`、`clawbot-v5`、`wooo-aiops` | | `gitea_repo_inventory_v1` | mirror-only | Gitea repo inventory;S4.5 已補認證清冊匯出請求,S4.6 已補匯入驗收契約,S4.7 已補 owner coverage attestation,S4.9 已補 owner response request packet、template status ledger、audit event templates、redaction examples、display sections、collection checks、owner response 收件包、intake preflight checks 與 outcome lanes | public-only / blocked endpoint / S4.5 export request / S4.6 import acceptance / S4.7 coverage attestation / S4.9 response snapshots | diff --git a/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md b/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md index 46b83d9bf..3ec01dd2b 100644 --- a/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md +++ b/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md @@ -25,6 +25,19 @@ python3 scripts/security/security-mirror-progress-guard.py ``` +### 0.2 Headline 58% 不代表停滯 + +近期 S4.10 request packet、template status ledger、audit event templates 與 redaction examples 都是有效進展,但它們是 framework detail,不是 owner response、runtime gate 或 GitHub primary readiness。因此 headline 仍維持 58%,避免把只讀框架誤算成已落地執行。 + +| 最近完成 | 目前狀態 | headline delta | +|----------|----------|----------------| +| S4.10 request packet | 已完成草案,只顯示 owner 要回覆什麼 | 0 | +| S4.10 template status ledger | 已完成草案,7 個 targets 仍 waiting owner response | 0 | +| S4.10 audit event templates | 已完成草案,`emitted_event_count=0` | 0 | +| S4.10 redaction examples | 已完成草案,只示範脫敏 metadata shape | 0 | + +headline 要再往上,需要 S4.9 / S4.10 / S4.11 / S4.12 任一 owner response 收到並通過脫敏驗收,或人工批准後出現 active runtime gate、redacted payload ingestion、GitHub primary readiness 這類落地 evidence。 + | 階段 | 狀態 | 目前結果 | 下一個 gate | |------|------|----------|-------------| | S0 文件與契約同步 | 完成 | Kali / Codex / GitHub / Gitea / AwoooP 邊界已文件化,核心 schema 草案已建立 | AwoooP 只讀 mirror 消費 | diff --git a/docs/security/security-mirror-acceptance.snapshot.json b/docs/security/security-mirror-acceptance.snapshot.json index 9d7261f12..f3a74af80 100644 --- a/docs/security/security-mirror-acceptance.snapshot.json +++ b/docs/security/security-mirror-acceptance.snapshot.json @@ -97,7 +97,7 @@ { "check_id": "PROGRESS_ESTIMATE_NOT_AUTHORIZATION", "title": "進度估算不是執行授權", - "expected_result": "AwoooP 顯示 `security_mirror_status_rollup_v1.progress_estimate.overall_percent=58`,且 `not_authorization=true`、`runtime_execution_authorized=false`、`active_runtime_gate_count=0`、`github_primary_ready_count=0`。", + "expected_result": "AwoooP 顯示 `security_mirror_status_rollup_v1.progress_estimate.overall_percent=58`、`progress_display_policy.headline_status=holding_until_owner_response_or_runtime_gate` 與 `progress_delta_ledger`;所有 progress 欄位仍必須 `not_authorization=true`、`runtime_execution_authorized=false`、`active_runtime_gate_count=0`、`github_primary_ready_count=0`。", "evidence_refs": [ "docs/security/security-mirror-status-rollup.snapshot.json", "docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md", @@ -107,11 +107,13 @@ "blocking_if_failed": true, "allowed_processing": [ "顯示整體 58%、框架 80-85%、落地 35-40%", + "顯示 micro progress delta ledger,但 headline_percent_delta 必須維持 0", "顯示 owner response、runtime gate、GitHub primary 與 AwoooP production ingestion 缺口", "要求來源修正 rollup 後再 mirror" ], "blocked_processing": [ "把 58% 視為 approval", + "把 micro progress delta 視為 approval", "把 58% 視為 runtime authorization", "隱藏 owner response 或 runtime landing 缺口", "新增 scan / execute / repo / refs / workflow / secret / runner / primary action button" diff --git a/docs/security/security-mirror-dry-run.snapshot.json b/docs/security/security-mirror-dry-run.snapshot.json index ca62a92f7..8430ae157 100644 --- a/docs/security/security-mirror-dry-run.snapshot.json +++ b/docs/security/security-mirror-dry-run.snapshot.json @@ -87,7 +87,7 @@ }, { "step_id": "CHECK_PROGRESS_GUARD", - "expected_observation": "AwoooP dry-run 必須確認 58% 進度估算只作狀態顯示,不代表 approval、runtime gate、GitHub primary、repo / refs / workflow / secret / runner 或 Kali scan 授權。", + "expected_observation": "AwoooP dry-run 必須確認 58% headline 進度與 micro progress delta ledger 只作狀態顯示,不代表 approval、runtime gate、GitHub primary、repo / refs / workflow / secret / runner 或 Kali scan 授權;所有 delta 的 headline_percent_delta 必須為 0。", "evidence_refs": [ "docs/security/security-mirror-status-rollup.snapshot.json", "docs/security/security-mirror-acceptance.snapshot.json", diff --git a/docs/security/security-mirror-status-rollup.snapshot.json b/docs/security/security-mirror-status-rollup.snapshot.json index 21f986535..93c132aa1 100644 --- a/docs/security/security-mirror-status-rollup.snapshot.json +++ b/docs/security/security-mirror-status-rollup.snapshot.json @@ -147,6 +147,76 @@ "next_gate": "依 S4.13 先集中檢查四包 owner response validation 狀態,AwoooP 只顯示 next_collection_candidate=S4.9 Gitea owner attestation,依 S4.9 owner response request packet 要求 owner 回覆,並用 template status ledger / audit event templates / redaction examples / display sections / collection checks 維持 request / received / accepted 分離;再依 S4.9 收到並驗收 S4.7 Gitea owner response、依 S4.10 request packet、template status ledger、audit event templates 與 redaction examples 收到並驗收 7 個 GitHub target owner / visibility / canonical response、依 S4.11 收到並驗收 5 個 refs truth owner response templates、依 S4.12 收到並驗收 5 個 workflow / secret 名稱 owner response templates、authenticated inventory payload 通過 S4.6 驗收、rollback ADR owner approval 與逐 repo 人工批准。" } ], + "progress_display_policy": { + "headline_percent": 58, + "headline_status": "holding_until_owner_response_or_runtime_gate", + "why_headline_is_holding": [ + "最近完成的是 S4.10 owner response request / status / audit / redaction 的框架細節,改善可見性與收件安全,但 owner response received / accepted 仍為 0。", + "overall_percent 只在 owner response、redacted payload ingestion、active runtime gate、GitHub primary readiness 或 AwoooP production ingestion 這些高層 gate 有實質變化時調整。", + "維持 58% 是為了避免把 read-only scaffold 誤算成 runtime enforcement、Kali scan、repo migration 或 GitHub primary cutover。" + ], + "recent_micro_progress_visible": true, + "headline_can_increase_after": [ + "S4.9 Gitea owner attestation response received/accepted 有實際脫敏 evidence", + "S4.10 GitHub target owner / visibility / canonical response received/accepted 有實際脫敏 evidence", + "S4.11 refs truth owner response received/accepted 有實際脫敏 evidence", + "S4.12 workflow / secret name owner response received/accepted 有實際脫敏 evidence", + "redacted payload ingestion 或 active runtime gate 在人工批准後啟用", + "GitHub primary readiness gate 的 primary_ready_count 大於 0" + ], + "runtime_execution_authorized": false, + "not_authorization": true + }, + "progress_delta_ledger": [ + { + "delta_id": "s4_10_owner_response_request_packet", + "display_order": 1, + "completed_stage": "S4.10 GitHub target owner response request packet", + "progress_axis": "framework_detail", + "headline_percent_delta": 0, + "framework_delta_visible": true, + "why_headline_unchanged": "request packet 只讓 AwoooP 顯示 owner 要回覆什麼,不代表 request sent、response received 或 approval。", + "runtime_delta": false, + "execution_authorized": false, + "not_authorization": true + }, + { + "delta_id": "s4_10_owner_response_template_status_ledger", + "display_order": 2, + "completed_stage": "S4.10 GitHub target owner response template status ledger", + "progress_axis": "framework_detail", + "headline_percent_delta": 0, + "framework_delta_visible": true, + "why_headline_unchanged": "template status ledger 只逐項顯示 7 個 target 仍為 waiting_owner_response,received / accepted 皆為 0。", + "runtime_delta": false, + "execution_authorized": false, + "not_authorization": true + }, + { + "delta_id": "s4_10_owner_response_audit_event_templates", + "display_order": 3, + "completed_stage": "S4.10 GitHub target owner response audit event templates", + "progress_axis": "framework_detail", + "headline_percent_delta": 0, + "framework_delta_visible": true, + "why_headline_unchanged": "audit event templates 仍為 template_only_not_emitted,emitted_event_count=0,尚未啟用 production ingestion。", + "runtime_delta": false, + "execution_authorized": false, + "not_authorization": true + }, + { + "delta_id": "s4_10_owner_response_redaction_examples", + "display_order": 4, + "completed_stage": "S4.10 GitHub target owner response redaction examples", + "progress_axis": "framework_detail", + "headline_percent_delta": 0, + "framework_delta_visible": true, + "why_headline_unchanged": "redaction examples 只示範安全 metadata shape,不代表 owner response 已收到、已接受或授權 repo / refs / primary 操作。", + "runtime_delta": false, + "execution_authorized": false, + "not_authorization": true + } + ], "next_safe_actions": [ { "action_id": "mirror_owner_response_validation_rollup", diff --git a/docs/security/security-supply-chain-contract-manifest.snapshot.json b/docs/security/security-supply-chain-contract-manifest.snapshot.json index 8e5ba1620..484b85fb0 100644 --- a/docs/security/security-supply-chain-contract-manifest.snapshot.json +++ b/docs/security/security-supply-chain-contract-manifest.snapshot.json @@ -335,7 +335,7 @@ ], "consumer": "AwoooP Operator Console / Runtime State / Audit", "consumption_mode": "mirror_only", - "allowed_actions": ["mirror_status_rollup", "display_phase_status", "display_next_safe_gate"], + "allowed_actions": ["mirror_status_rollup", "display_phase_status", "display_progress_delta_ledger", "display_next_safe_gate"], "forbidden_actions": [ "execute_rollup_action", "runtime_authorization", @@ -346,7 +346,7 @@ "sync_refs", "store_secret_value" ], - "notes": "定義 AwoooP 與 Security Supply Chain Session 的共同狀態摘要;S4.13 已補 owner response validation rollup,彙整 S4.9/S4.10/S4.11/S4.12 共 22 個 response templates、received=0、accepted=0、next_collection_candidate=S4.9;只顯示階段、下一個 gate 與禁止事項,不授權執行。" + "notes": "定義 AwoooP 與 Security Supply Chain Session 的共同狀態摘要;目前顯示 58% headline progress、progress display policy 與 micro progress delta ledger,說明近期 S4.10 framework detail 不會推高 headline;S4.13 已補 owner response validation rollup,彙整 S4.9/S4.10/S4.11/S4.12 共 22 個 response templates、received=0、accepted=0、next_collection_candidate=S4.9;只顯示階段、下一個 gate 與禁止事項,不授權執行。" }, { "contract": "coding_task_v1", diff --git a/scripts/security/security-mirror-progress-guard.py b/scripts/security/security-mirror-progress-guard.py index 0f99eaa09..8085ee5db 100755 --- a/scripts/security/security-mirror-progress-guard.py +++ b/scripts/security/security-mirror-progress-guard.py @@ -66,6 +66,45 @@ def validate(root: Path) -> None: assert_equal("progress.runtime_landing_percent_max", progress["runtime_landing_percent_max"], 40) assert_true("progress.not_authorization", progress["not_authorization"]) + progress_display_policy = rollup["progress_display_policy"] + assert_equal("progress_display_policy.headline_percent", progress_display_policy["headline_percent"], 58) + assert_equal( + "progress_display_policy.headline_status", + progress_display_policy["headline_status"], + "holding_until_owner_response_or_runtime_gate", + ) + assert_true("progress_display_policy.recent_micro_progress_visible", progress_display_policy["recent_micro_progress_visible"]) + assert_false( + "progress_display_policy.runtime_execution_authorized", + progress_display_policy["runtime_execution_authorized"], + ) + assert_true("progress_display_policy.not_authorization", progress_display_policy["not_authorization"]) + + progress_delta_ledger = rollup["progress_delta_ledger"] + expected_delta_ids = [ + "s4_10_owner_response_request_packet", + "s4_10_owner_response_template_status_ledger", + "s4_10_owner_response_audit_event_templates", + "s4_10_owner_response_redaction_examples", + ] + assert_equal( + "progress_delta_ledger.delta_ids", + [item["delta_id"] for item in progress_delta_ledger], + expected_delta_ids, + ) + assert_equal( + "progress_delta_ledger.display_order", + [item["display_order"] for item in progress_delta_ledger], + list(range(1, len(expected_delta_ids) + 1)), + ) + for item in progress_delta_ledger: + assert_equal(f"progress_delta_ledger.{item['delta_id']}.progress_axis", item["progress_axis"], "framework_detail") + assert_equal(f"progress_delta_ledger.{item['delta_id']}.headline_percent_delta", item["headline_percent_delta"], 0) + assert_true(f"progress_delta_ledger.{item['delta_id']}.framework_delta_visible", item["framework_delta_visible"]) + assert_false(f"progress_delta_ledger.{item['delta_id']}.runtime_delta", item["runtime_delta"]) + assert_false(f"progress_delta_ledger.{item['delta_id']}.execution_authorized", item["execution_authorized"]) + assert_true(f"progress_delta_ledger.{item['delta_id']}.not_authorization", item["not_authorization"]) + assert_false("rollup.runtime_execution_authorized", rollup["runtime_execution_authorized"]) assert_equal("rollup.active_runtime_gate_count", rollup_summary["active_runtime_gate_count"], 0) assert_false("rollup.runtime_actions_executed", rollup_summary["runtime_actions_executed"])