diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 3728e7398..4b51b3f5d 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -1,3 +1,37 @@ +## 2026-05-17 | 資安供應鏈 S4.9:Gitea Owner Attestation Response 收件包 + +**背景**:S4.7 已定義 Gitea coverage gap 的 5 個 owner attestation items,S4.8 已把既有 Gitea approval queue / gate / review packet / follow-up runtime gate 對齊成 S4.7 先行;但 owner 真正回覆時仍缺一份可填、可驗收、可拒收的 response intake 格式。為了維持低摩擦,本輪不新增第 36 個主 contract、不新增第 9 個 approval item、不啟用 runtime gate;只新增 S4.9 owner response 收件包。 + +**完成**: +- 新增 `docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json`。 +- 新增 `docs/security/gitea-inventory-owner-attestation-response.snapshot.json` 與 `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md`。 +- 定義 5 個 response templates,對應 S4.7 的 public-only/local gap、org/user endpoint、110 adjacent source、repo owner/canonical、legacy/inaccessible disposition。 +- 定義 8 個 acceptance checks 與 10 個 rejection rules,避免 owner response 夾帶 token、secret、DB dump、git object、repo 建立、refs sync 或 GitHub primary approval。 +- 更新 manifest、mirror readiness、status rollup、approval queue / gate / review packet / follow-up gate、primary readiness gate、Gitea runbook、read-only approval package、AwoooP checklist、handoff 與 progress,使 AwoooP 能顯示 S4.9 response templates 與 rejection rules。 + +**仍未完成**: +- 尚未收到任何 owner response。 +- 尚未收到任何 owner coverage attestation。 +- 尚未收到任何 owner / admin redacted inventory payload。 +- 尚未產出 `gitea_repo_inventory_v1.status=ok` snapshot。 +- 尚未解開 GitHub primary readiness 中的 Gitea inventory blocker。 + +**仍禁止**: +- 不保存 token value、raw secret、cookie、session、private key、DB dump 或 git object pack。 +- 不使用 write token。 +- 不建立、刪除、封存或修改 Gitea repo。 +- 不建立 GitHub repo、不修改 visibility、不 sync refs、不 delete refs、不 force push。 +- 不把 S4.9 owner response packet 當成 read-only inventory 已執行、repo migration approval 或 GitHub primary approval。 + +**驗證**: +- JSON 全量 parse 通過:89 個 JSON files。 +- S4.9 assertion 通過:contract manifest 仍為 35 個主 contracts、mirror readiness 維持 32 ready / 2 partial / 1 contract-only / 0 blocked。 +- Owner response assertion 通過:required response items 5 個、received / accepted / rejected response 皆為 0、response templates 5 個、acceptance checks 8 個、rejection rules 10 個。 +- Approval lane assertion 通過:approval queue / review packets / follow-up runtime gate templates 維持 8 / 8 / 8,`active_runtime_gates=0`,`github_primary_ready_count=0`。 +- dangerous runtime/write flags 維持 false。 +- `git diff --check` 通過。 +- 敏感字串掃描確認本輪未保存 Kali SSH 密碼樣式、常見 token pattern、private key material 或 `GITEA_READONLY_TOKEN` value。 + ## 2026-05-17 | 資安供應鏈 S4.8:Gitea Owner Attestation Approval Lane 對齊 **背景**:S4.7 已把 Gitea coverage gap 的 owner attestation request 建立出來,但 AwoooP 既有 approval queue / gate / review packet / follow-up runtime gate 仍偏向「直接審 read-only token 或 redacted admin export」。為了維持低摩擦且避免流程跳太快,本輪不新增第 9 個 approval item,也不新增 runtime action;只把既有 Gitea 審查項明確改成 S4.7 owner attestation 先行。 diff --git a/docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json b/docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json new file mode 100644 index 000000000..4dc97ff41 --- /dev/null +++ b/docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json @@ -0,0 +1,215 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "urn:awoooi:gitea-inventory-owner-attestation-response-v1", + "title": "Gitea 清冊 Owner Attestation Response 收件契約 v1", + "description": "定義 owner 回覆 S4.7 coverage attestation 時的收件欄位、驗收規則與拒收規則。此 schema 不授權 token 收集、Gitea/GitHub 寫入、refs sync 或 GitHub primary cutover。", + "type": "object", + "required": [ + "schema_version", + "status", + "date", + "mode", + "runtime_execution_authorized", + "source_contract", + "target_contract", + "source_indexes", + "summary", + "response_templates", + "acceptance_checks", + "rejection_rules", + "allowed_outputs", + "forbidden_actions" + ], + "properties": { + "schema_version": { + "const": "gitea_inventory_owner_attestation_response_v1" + }, + "status": { + "type": "string", + "enum": ["draft_waiting_owner_response"] + }, + "date": { + "type": "string" + }, + "mode": { + "type": "string", + "enum": ["owner_response_intake_only"] + }, + "runtime_execution_authorized": { + "type": "boolean", + "const": false + }, + "source_contract": { + "type": "string", + "const": "gitea_inventory_coverage_attestation_v1" + }, + "target_contract": { + "type": "string", + "const": "gitea_repo_inventory_v1" + }, + "source_indexes": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "summary": { + "type": "object", + "required": [ + "owner_response_status", + "required_response_item_count", + "received_response_count", + "accepted_response_count", + "rejected_response_count", + "response_template_count", + "acceptance_check_count", + "rejection_rule_count", + "token_value_collection_allowed", + "raw_secret_allowed", + "repo_write_allowed", + "refs_sync_allowed", + "github_primary_switch_authorized", + "action_buttons_allowed" + ], + "properties": { + "owner_response_status": { + "type": "string", + "enum": ["waiting_owner_response"] + }, + "required_response_item_count": {"type": "integer", "minimum": 0}, + "received_response_count": {"type": "integer", "minimum": 0}, + "accepted_response_count": {"type": "integer", "minimum": 0}, + "rejected_response_count": {"type": "integer", "minimum": 0}, + "response_template_count": {"type": "integer", "minimum": 0}, + "acceptance_check_count": {"type": "integer", "minimum": 0}, + "rejection_rule_count": {"type": "integer", "minimum": 0}, + "token_value_collection_allowed": { + "type": "boolean", + "const": false + }, + "raw_secret_allowed": { + "type": "boolean", + "const": false + }, + "repo_write_allowed": { + "type": "boolean", + "const": false + }, + "refs_sync_allowed": { + "type": "boolean", + "const": false + }, + "github_primary_switch_authorized": { + "type": "boolean", + "const": false + }, + "action_buttons_allowed": { + "type": "boolean", + "const": false + } + }, + "additionalProperties": false + }, + "response_templates": { + "type": "array", + "items": { + "type": "object", + "required": [ + "template_id", + "attestation_item_id", + "title", + "required_owner_fields", + "acceptable_decisions", + "minimum_evidence_refs", + "acceptance_criteria", + "rejection_conditions", + "allowed_outputs", + "execution_authorized" + ], + "properties": { + "template_id": {"type": "string"}, + "attestation_item_id": {"type": "string"}, + "title": {"type": "string"}, + "required_owner_fields": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "acceptable_decisions": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "minimum_evidence_refs": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "acceptance_criteria": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "rejection_conditions": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "allowed_outputs": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "execution_authorized": { + "type": "boolean", + "const": false + } + }, + "additionalProperties": false + }, + "minItems": 1 + }, + "acceptance_checks": { + "type": "array", + "items": { + "type": "object", + "required": [ + "check_id", + "title", + "required", + "pass_condition", + "failure_lane", + "execution_authorized" + ], + "properties": { + "check_id": {"type": "string"}, + "title": {"type": "string"}, + "required": {"type": "boolean"}, + "pass_condition": {"type": "string"}, + "failure_lane": {"type": "string"}, + "execution_authorized": { + "type": "boolean", + "const": false + } + }, + "additionalProperties": false + }, + "minItems": 1 + }, + "rejection_rules": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "allowed_outputs": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + }, + "forbidden_actions": { + "type": "array", + "items": {"type": "string"}, + "minItems": 1 + } + }, + "additionalProperties": false +} diff --git a/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md b/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md index f964b233b..bec6a5191 100644 --- a/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md +++ b/docs/security/AWOOOP-MIRROR-ONLY-CONSUMPTION-CHECKLIST.md @@ -44,7 +44,7 @@ AwoooP 初期不得直接啟動掃描、不得呼叫 Codex patch runner、不得 | `security_mirror_status_rollup_v1` | AwoooP 鏡像狀態彙整契約 | Operator Console、Runtime State、Audit | mirror-only | 只顯示階段狀態、下一個 gate 與禁止事項;不得視為 runtime authorization | | `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 | -| `gitea_repo_inventory_v1` | Gitea org/user repo list 或管理匯出 | Supply-chain evidence、migration matrix | mirror-only | 顯示 public-only evidence、S4.5 authenticated/admin export request、S4.6 redacted import acceptance 與 S4.7 owner coverage attestation;不保存 token value、不刪除或停用 Gitea repo | +| `gitea_repo_inventory_v1` | Gitea org/user repo list 或管理匯出 | Supply-chain evidence、migration matrix | mirror-only | 顯示 public-only evidence、S4.5 authenticated/admin export request、S4.6 redacted import acceptance、S4.7 owner coverage attestation 與 S4.9 owner response 收件包;不保存 token value、不刪除或停用 Gitea repo | | `local_git_remote_inventory_v1` | 本機可見 Git working tree remote | Source-control coverage evidence、migration matrix | mirror-only | 不視為 Gitea server 全量、不修改 remote | | `github_target_probe_v1` | 候選 GitHub repo read-only probe | Migration target evidence | mirror-only | `not_found_or_private` 不等同確認不存在 | | `github_target_decision_v1` | GitHub target 建立與可見性決策草案 | Approval candidate、Migration target evidence | mirror-only | approval 前不得建立 repo、修改 visibility、同步 refs | @@ -116,7 +116,7 @@ AwoooP 初期不得直接啟動掃描、不得呼叫 Codex patch runner、不得 | `source_control_migration_event_v1.status=blocked` | `observe` | 顯示 blocking reason,不允許切 primary | | `source_control_migration_event_v1.status=verified` | `approve_required` | 仍需人工批准主控切換 | | `gitea_repo_inventory_v1.status=blocked` | `observe` | 補只讀 token 或管理匯出,不做同步 | -| `gitea_repo_inventory_v1.status=partial` | `observe` | 視為 public-only evidence,顯示 S4.5 export request、S4.6 import acceptance、S4.7 owner attestation request 與 coverage gap,不做同步 | +| `gitea_repo_inventory_v1.status=partial` | `observe` | 視為 public-only evidence,顯示 S4.5 export request、S4.6 import acceptance、S4.7 owner attestation request、S4.9 owner response templates 與 coverage gap,不做同步 | | `gitea_repo_inventory_v1.status=ok` | `warn` | 進入 repo mapping / branch tag diff | | `approval_required_event_v1.requested_action=run_gitea_readonly_inventory` | `approve_required` | 只允許 read-only token 或 redacted admin export,不保存 token value | | `local_git_remote_inventory_v1.status=partial` | `observe` | 補 server-side inventory,不做主控切換 | @@ -157,6 +157,7 @@ AwoooP 初期不得直接啟動掃描、不得呼叫 Codex patch runner、不得 | Gitea authenticated inventory export request | `docs/security/gitea-authenticated-inventory-export-request.snapshot.json` / `docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md` | | Gitea authenticated inventory import acceptance | `docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json` / `docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md` | | Gitea inventory coverage owner attestation | `docs/security/gitea-inventory-coverage-attestation.snapshot.json` / `docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md` | +| Gitea inventory owner attestation response 收件包 | `docs/security/gitea-inventory-owner-attestation-response.snapshot.json` / `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` | | Gitea org endpoint blocked snapshot | `docs/security/gitea-org-repo-inventory-blocked.snapshot.json` / `docs/security/GITEA-ORG-REPO-INVENTORY-BLOCKED-SNAPSHOT.md` | | Gitea server-side inventory runbook | `docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md` | | Gitea read-only inventory approval package | `docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md` | diff --git a/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md b/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md index 15fd819e7..75c810435 100644 --- a/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md +++ b/docs/security/AWOOOP-SECURITY-SUPPLYCHAIN-INTEGRATION-HANDOFF.md @@ -327,7 +327,7 @@ Schema:`docs/schemas/security_mirror_status_rollup_v1.schema.json` Snapshot:`docs/security/security-mirror-status-rollup.snapshot.json` -目前 rollup:`framework_ready_waiting_approval`;35 個 contracts、32 ready、2 partial、1 contract-only、0 blocked;approval queue 仍為 8 items,其中 7 pending approval、1 block candidate;review packets 8 筆;state transition rules 5 筆;follow-up runtime gate templates 8 筆;active runtime gates 0 筆;GitHub primary candidate repos 8 筆;primary ready 0 筆;S4.4 rollback ADR repo plans 7 筆、owner approved 0 筆、dry-run completed 0 筆;Gitea inventory 目前 `partial_waiting_authenticated_inventory`,public-only repo 2 個、本機可見 Gitea unique repo 4 個、export source options 2 類、S4.6 import acceptance payload 0 筆、S4.7 owner attestation items 5 筆、received attestation 0 筆、quarantine required=true、token value collection allowed=false;workflow / secret 名稱 inventory candidate repos 8 筆、complete 0 筆;S4.2 local evidence repos 4 筆、workflow files 31 筆、referenced secret names 43 筆;decision records 目前 0 筆。 +目前 rollup:`framework_ready_waiting_approval`;35 個 contracts、32 ready、2 partial、1 contract-only、0 blocked;approval queue 仍為 8 items,其中 7 pending approval、1 block candidate;review packets 8 筆;state transition rules 5 筆;follow-up runtime gate templates 8 筆;active runtime gates 0 筆;GitHub primary candidate repos 8 筆;primary ready 0 筆;S4.4 rollback ADR repo plans 7 筆、owner approved 0 筆、dry-run completed 0 筆;Gitea inventory 目前 `partial_waiting_authenticated_inventory`,public-only repo 2 個、本機可見 Gitea unique repo 4 個、export source options 2 類、S4.6 import acceptance payload 0 筆、S4.7 owner attestation items 5 筆、received attestation 0 筆、S4.9 owner response templates 5 筆、received response 0 筆、quarantine required=true、token value collection allowed=false;workflow / secret 名稱 inventory candidate repos 8 筆、complete 0 筆;S4.2 local evidence repos 4 筆、workflow files 31 筆、referenced secret names 43 筆;decision records 目前 0 筆。 AwoooP 初期處理方式:只顯示階段狀態、下一個 gate 與禁止事項,可寫入 Audit evidence;不得把 rollup 當 runtime authorization。 @@ -481,6 +481,8 @@ S4.6 支援性驗收:已新增 `docs/schemas/gitea_authenticated_inventory_imp S4.7 支援性 owner attestation:已新增 `docs/schemas/gitea_inventory_coverage_attestation_v1.schema.json`、`docs/security/gitea-inventory-coverage-attestation.snapshot.json` 與 `docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md`。此 attestation 仍不新增第 36 個主 contract,只定義 public-only / local remote gap、org/user endpoint、110 internal adjacent source、canonical owner 與 legacy/inaccessible disposition 的 owner decision;目前 `required_attestation_item_count=5`、`received_attestation_count=0`、`accepted_attestation_count=0`、`runtime_execution_authorized=false`,不得把 attestation request 視為 repo migration approval。 +S4.9 支援性 owner response 收件包:已新增 `docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json`、`docs/security/gitea-inventory-owner-attestation-response.snapshot.json` 與 `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md`。此 response packet 仍不新增第 36 個主 contract,只定義 owner 回覆 S4.7 五個 items 時的必填欄位、驗收規則、拒收規則與 allowed output;目前 `required_response_item_count=5`、`received_response_count=0`、`accepted_response_count=0`、`runtime_execution_authorized=false`,不得把 response packet 視為 read-only inventory 已執行、repo migration approval 或 GitHub primary approval。 + ### `local_git_remote_inventory_v1` 用途:在 Gitea API 受阻時,盤點本機可見 Git working tree 的 remote URL,找出仍指向 Gitea、GitHub、110 內部 Git 或 GitLab 類 remote 的專案。 @@ -825,6 +827,8 @@ Console 初期不提供高風險執行按鈕。 2026-05-17 S4.8 Gitea owner attestation approval lane 對齊追加:已更新既有 `security_approval_queue_v1`、`security_approval_gate_v1`、`security_approval_review_packet_v1` 與 `security_followup_runtime_gate_v1` 的 Gitea lane,要求 AwoooP 先顯示 S4.7 的 5 個 owner attestation items 與 scope decision evidence。queue / review packet / follow-up template 數量維持 8 / 8 / 8,`active_runtime_gates=0`,不得新增 action button、不得執行 read-only inventory、不得把 owner attestation 視為 repo migration approval 或 GitHub primary approval。 +2026-05-17 S4.9 Gitea owner attestation response 收件包追加:已新增 `docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json`、`docs/security/gitea-inventory-owner-attestation-response.snapshot.json` 與 `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md`。AwoooP 可顯示 5 個 response templates、8 個 acceptance checks 與 10 個 rejection rules;目前收到 response 0 筆、接受 0 筆,仍不得保存 token value、不得寫 Gitea、不得 sync refs、不得切 GitHub primary。 + 2026-05-13 Kali 112 live 整合狀態追加:已在授權下登入 `192.168.0.112` 做 read-only 盤點與低風險更新,並新增 `docs/schemas/kali_integration_status_v1.schema.json`、`docs/security/kali-integration-status.snapshot.json` 與 `docs/security/KALI-INTEGRATION-STATUS.md`。Kali Scanner API `/health` healthy、`kali-scanner.service` active/enabled、node-exporter 與 wg-easy container up;已 targeted update `nmap`、`nikto`、`nuclei`、`curl`、`openssl`、CA 套件,安裝 `jq`,時區改為 `Asia/Taipei`,更新後無 reboot required。AwoooP 可 mirror health / update / gap evidence,但不得直接啟動 scan、credentialed scan 或 `/execute`。 本波仍不做: @@ -863,6 +867,8 @@ Console 初期不提供高風險執行按鈕。 - [gitea_authenticated_inventory_import_acceptance_v1 snapshot](/Users/ogt/awoooi/docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json) - [Gitea 清冊覆蓋 owner attestation](/Users/ogt/awoooi/docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md) - [gitea_inventory_coverage_attestation_v1 snapshot](/Users/ogt/awoooi/docs/security/gitea-inventory-coverage-attestation.snapshot.json) +- [Gitea 清冊 owner attestation response 收件包](/Users/ogt/awoooi/docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md) +- [gitea_inventory_owner_attestation_response_v1 snapshot](/Users/ogt/awoooi/docs/security/gitea-inventory-owner-attestation-response.snapshot.json) - [Gitea admin export redaction checklist](/Users/ogt/awoooi/docs/security/GITEA-ADMIN-EXPORT-REDACTION-CHECKLIST.md) - [Gitea public repo search snapshot](/Users/ogt/awoooi/docs/security/GITEA-PUBLIC-REPO-SEARCH-SNAPSHOT.md) - [gitea public repo search JSON](/Users/ogt/awoooi/docs/security/gitea-public-repo-search.snapshot.json) diff --git a/docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md b/docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md index cafc8073f..ff2927a32 100644 --- a/docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md +++ b/docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md @@ -9,6 +9,7 @@ | 來源契約 | `gitea_repo_inventory_v1` | | 上游請求 | `gitea_authenticated_inventory_export_request_v1` | | 覆蓋 Attestation | `docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md` | +| Attestation response 收件包 | `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` | | 模式 | `redacted_payload_acceptance_only` | | 執行面授權 | `false` | @@ -18,7 +19,7 @@ S4.6 定義「收到 owner 或 Gitea 管理者提供的脫敏清冊後,怎麼 這不是實際匯入,也不是宣告 Gitea inventory 完成。它只把未來可接受的 payload 形狀、必要欄位、拒收規則、隔離 lane 與允許輸出先固定下來,避免 owner 提供資料時把 token、DB dump、git object 或 repo 操作要求混進來。 -S4.7 已補 owner coverage attestation:即使 payload 通過 S4.6,也仍需 owner 對 public-only / local remote gap、org/user endpoint、110 internal adjacent source、canonical owner 與 legacy/inaccessible disposition 作 scope decision,才可把 blocker 往 primary readiness 下一關推進。 +S4.7 已補 owner coverage attestation,S4.9 已補 owner response 收件包:即使 payload 通過 S4.6,也仍需 owner 依 S4.9 回覆 public-only / local remote gap、org/user endpoint、110 internal adjacent source、canonical owner 與 legacy/inaccessible disposition,且 response 通過驗收後,才可把 blocker 往 primary readiness 下一關推進。 ## 1. 驗收摘要 diff --git a/docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md b/docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md index a4aedcc62..94b223e40 100644 --- a/docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md +++ b/docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md @@ -8,6 +8,7 @@ | 快照 | `docs/security/gitea-inventory-coverage-attestation.snapshot.json` | | 來源契約 | `gitea_repo_inventory_v1` | | 上游請求 | `gitea_authenticated_inventory_export_request_v1` / `gitea_authenticated_inventory_import_acceptance_v1` | +| Response 收件包 | `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` | | 模式 | `coverage_attestation_only` | | 執行面授權 | `false` | @@ -15,6 +16,8 @@ S4.7 補的是「owner 怎麼說明 Gitea 清冊覆蓋缺口」。 +S4.9 已補上 owner response 收件包,規範 owner 回覆這 5 個 items 時的必填欄位、驗收規則與拒收規則;目前仍未收到 response。 + 目前 `gitea_repo_inventory_v1` 仍是 public-only / partial:未認證公開範圍只看到 2 個 repos,本機 remote evidence 看到 4 個 Gitea unique repos,另有 4 個 110 internal adjacent sources 需要判定是否屬本輪 GitHub migration scope。 此文件不要求使用者貼 token,不匯入 payload,不寫 Gitea,不建立 GitHub repo,不 sync refs,也不切 GitHub primary。它只把 owner 需要表態的 5 個 coverage items 固定下來,讓 AwoooP 可以 mirror 成 review lane。 @@ -28,6 +31,8 @@ S4.7 補的是「owner 怎麼說明 Gitea 清冊覆蓋缺口」。 | 已收到 attestation | 0 | | 已接受 attestation | 0 | | 已拒收 attestation | 0 | +| S4.9 owner response templates | 5 | +| 已收到 owner response | 0 | | 未認證公開範圍 repos | 2 | | 本機可見 Gitea unique repos | 4 | | 本機 Gitea 覆蓋缺口 | 2 | diff --git a/docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md b/docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md new file mode 100644 index 000000000..f811fd633 --- /dev/null +++ b/docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md @@ -0,0 +1,107 @@ +# Gitea 清冊 Owner Attestation Response 收件包 + +| 項目 | 內容 | +|------|------| +| 日期 | 2026-05-17 | +| 狀態 | 草案,等待 owner response | +| 資料契約 | `docs/schemas/gitea_inventory_owner_attestation_response_v1.schema.json` | +| 快照 | `docs/security/gitea-inventory-owner-attestation-response.snapshot.json` | +| 來源契約 | `gitea_inventory_coverage_attestation_v1` | +| 目標契約 | `gitea_repo_inventory_v1` | +| 模式 | `owner_response_intake_only` | +| 執行面授權 | `false` | + +## 0. 核心結論 + +S4.9 補的是「owner 要怎麼回覆 S4.7 的 5 個 coverage attestation items」。 + +S4.7 已定義要問什麼,S4.8 已把它接到 AwoooP approval lane;S4.9 則把回覆欄位、驗收規則、拒收規則與允許輸出固定下來,避免 owner response 混入 token、DB dump、git object、repo 建立、refs sync 或 GitHub primary approval。 + +此文件不要求貼 token,不接受 raw secret,不寫 Gitea,不建立 GitHub repo,不 sync refs,也不把任何 attestation response 當成 migration approval。 + +## 1. Response 摘要 + +| 指標 | 值 | +|------|----| +| owner response 狀態 | `waiting_owner_response` | +| 必要 response items | 5 | +| 已收到 response | 0 | +| 已接受 response | 0 | +| 已拒收 response | 0 | +| response templates | 5 | +| acceptance checks | 8 | +| rejection rules | 10 | +| 允許收集 token value | `false` | +| 允許 raw secret | `false` | +| 允許 repo write / refs sync | `false` | +| 授權切換 GitHub primary | `false` | +| 允許 action button | `false` | + +## 2. Owner Response 必填欄位 + +每筆 response 至少要能回答: + +1. `owner_role_or_team`:回覆者的角色或團隊,不要求個人敏感資訊。 +2. `decision`:必須是該 S4.7 item 允許的決策值。 +3. `decision_reason`:為什麼做此 scope / disposition 判定。 +4. `affected_repos`、`affected_sources` 或 `canonical_namespace`:指出受影響 repo、namespace 或 110 adjacent source。 +5. `evidence_refs`:只能指向 repo 內文件、snapshot 或 owner 提供的脫敏 metadata。 +6. `followup_owner`:若需要補 evidence,需指定下一個負責角色或團隊。 + +## 3. 五個 Response Template + +| Template | 對應 S4.7 item | 驗收重點 | +|----------|----------------|----------| +| `response-public-only-vs-local-gitea-gap` | `public_only_vs_local_gitea_gap` | 逐項判定 `wooo/clawbot-v5`、`wooo/wooo-aiops` 是否屬本輪 scope | +| `response-org-user-endpoint-identity` | `org_user_endpoint_identity` | 說明 `wooo` 應以 user、org 或兩者盤點;不得把 404 視為完成 | +| `response-internal-110-adjacent-scope` | `internal_110_adjacent_scope` | 逐項判定 `bitan-pharmacy`、`root/momo-pro-system`、`tsenyang-website`、`wooo/wooo-infra-config` | +| `response-repo-owner-canonical-scope` | `repo_owner_canonical_scope` | 為 in-scope repo 指定 owner、canonical source、GitHub target candidate 與 visibility review owner | +| `response-legacy-or-inaccessible-disposition` | `legacy_or_inaccessible_repo_disposition` | 對 legacy / inaccessible / external repo 留下 disposition、理由與後續 owner | + +## 4. 驗收規則 + +1. response 必須對應 S4.7 的 5 個 item 之一。 +2. `decision` 必須在該 item 的允許值內。 +3. 必須有 owner 理由,不能只有「同意」或「排除」。 +4. `evidence_refs` 必須已脫敏,不得包含 token、secret、cookie、session、private key 或私有 URL 憑證。 +5. 必須列出受影響 repo、namespace 或 source。 +6. 不得夾帶 runtime 或 source-control 執行要求。 +7. 要把 S4.7 標示為 accepted 前,5 個 items 都必須有可驗收 response。 +8. response 通過後,GitHub primary readiness 仍維持 blocked,`primary_ready_count` 不得因此大於 0。 + +## 5. 必須拒收 + +1. token value、PAT、cookie、session、CSRF token 或 partial token。 +2. webhook secret、repository secret value、runner registration token 或 deploy key private key。 +3. private key、DB dump、git object pack、裸 repo tarball 或可還原 credential 的 artifact。 +4. 要求使用 write-capable token、admin token 或 secret scope token。 +5. 要求建立、刪除、封存或修改 Gitea repo。 +6. 要求建立 GitHub repo、修改 visibility、sync refs、delete refs 或 force push。 +7. 未逐項對應 S4.7 attestation item。 +8. 只提供口頭同意、截圖或不完整 repo metadata。 +9. 把 owner attestation 當成 repo migration approval 或 GitHub primary approval。 +10. 任何不確定是否含敏感值的回覆。 + +## 6. AwoooP 可做 + +1. 顯示 5 個 owner response templates。 +2. 顯示 acceptance checks 與 rejection rules。 +3. 在 owner response 到來後,只更新 read-only snapshot、matrix、decision table、readiness gate 與 status rollup。 +4. 將不完整或可疑 response 放進 mirror quarantine。 +5. 持續顯示 `received_response_count=0`、`accepted_response_count=0`,直到真的收到脫敏 response。 + +## 7. AwoooP 不可做 + +1. 不要求使用者貼 token、secret、private key、cookie、session 或 DB dump。 +2. 不把 response 當成 read-only inventory 已執行。 +3. 不把 response 當成 repo migration approval。 +4. 不建立 GitHub repo。 +5. 不修改 Gitea repo。 +6. 不 sync refs。 +7. 不新增執行按鈕。 + +## 8. 階段定位 + +S4.9 是 S4.7 / S4.8 後面的安全收件包。 + +它讓 owner response 變得可審、可驗收、可拒收,但仍然停在框架期。真正讓 `gitea_repo_inventory_v1.status=ok`,仍必須等 S4.6 脫敏 payload 通過、S4.7 五個 owner response 全部接受、refs truth / workflow-secret parity / rollback ADR / runtime gate 都補齊後,才能進下一階段。 diff --git a/docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md b/docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md index 7318a8e60..f8d0c3bde 100644 --- a/docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md +++ b/docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md @@ -10,6 +10,7 @@ | S4.5 export request | `docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md` | | S4.6 import acceptance | `docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md` | | S4.7 coverage attestation | `docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md` | +| S4.9 owner response 收件包 | `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` | | 目的 | 補齊 Gitea private/internal server-side repo list | | 原則 | 低摩擦、只讀、只盤 metadata、不保存 token value、不做同步或主控切換 | @@ -34,6 +35,8 @@ S4.6 已補 `gitea_authenticated_inventory_import_acceptance_v1`,把 owner / S4.7 已補 `gitea_inventory_coverage_attestation_v1`,把 public-only / local remote gap、org/user endpoint、110 internal adjacent source、canonical owner 與 legacy/inaccessible repo disposition 的 owner decision 正式文件化。attestation 只做 scope 判定,不等於 repo migration 或 primary cutover approval。 +S4.9 已補 `gitea_inventory_owner_attestation_response_v1`,把 owner 回覆 S4.7 五個 items 時的必填欄位、驗收規則與拒收規則正式文件化。response 通過只代表可更新 read-only matrix / decision table,不等於 read-only inventory 已執行。 + ## 1. 申請批准的動作 | 動作 | 風險 | 批准後允許 | 仍然禁止 | @@ -86,7 +89,7 @@ python3 scripts/security/gitea-repo-inventory.py \ | Redaction checklist | `docs/security/GITEA-ADMIN-EXPORT-REDACTION-CHECKLIST.md` 已通過 | | Coverage gap | public-only 2 repos 與 local Gitea 4 repos 的差異已解釋 | | Import acceptance | S4.6 驗收檢查通過;敏感 payload 必須進隔離 | -| Owner attestation | S4.7 五個 coverage items 已有 owner scope decision | +| Owner attestation response | S4.9 已收到並驗收 S4.7 五個 coverage items 的 owner response | | 後續動作 | 只更新 matrix / decision table,不同步 refs | ## 5. 批准前不得做 diff --git a/docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md b/docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md index 2d162da4b..9b101bbc9 100644 --- a/docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md +++ b/docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md @@ -11,6 +11,7 @@ | S4.5 export request | `docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md` | | S4.6 import acceptance | `docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md` | | S4.7 coverage attestation | `docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md` | +| S4.9 owner response 收件包 | `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` | | 原則 | 不寫入 Gitea、不搬 secret value、不建立或刪除 repo | ## 0. 核心結論 @@ -36,6 +37,8 @@ S4.6 已補 `gitea_authenticated_inventory_import_acceptance_v1`:收到 owner S4.7 已補 `gitea_inventory_coverage_attestation_v1`:owner 必須先對 public-only / local remote gap、org/user endpoint、110 internal adjacent source、canonical owner 與 legacy/inaccessible repo disposition 作 scope decision。此 attestation 仍不授權 token 收集、repo 寫入、refs sync 或 primary cutover。 +S4.9 已補 `gitea_inventory_owner_attestation_response_v1`:owner response 必須依 5 個 template 填寫並通過基本驗收,才能把 S4.7 coverage attestation 視為可審 evidence。此 response 收件包仍不授權 read-only inventory runtime、repo migration 或 primary cutover。 + ## 1. Public-only 快照指令 ```bash @@ -145,4 +148,4 @@ python3 scripts/security/gitea-repo-inventory.py \ 4. 每個 repo 建立 mirror / archive / keep-local 判定。 5. 產出 GitHub primary ADR 與 rollback plan。 -S4.6 驗收通過只代表「脫敏清冊 payload 可以變成 evidence」;S4.7 owner attestation 通過只代表「coverage gap 有 scope decision」。任何 GitHub repo 建立、visibility 修改、refs sync、primary cutover 或 Gitea 停用仍需後續人工批准與 runtime gate。 +S4.6 驗收通過只代表「脫敏清冊 payload 可以變成 evidence」;S4.9 owner response 驗收通過只代表「S4.7 coverage gap 有可審 scope decision」。任何 GitHub repo 建立、visibility 修改、refs sync、primary cutover 或 Gitea 停用仍需後續人工批准與 runtime gate。 diff --git a/docs/security/SECURITY-APPROVAL-GATE.md b/docs/security/SECURITY-APPROVAL-GATE.md index 58f14b193..d4022dda1 100644 --- a/docs/security/SECURITY-APPROVAL-GATE.md +++ b/docs/security/SECURITY-APPROVAL-GATE.md @@ -37,7 +37,7 @@ S3.1 開始,實際人工決策紀錄由 `security_approval_decision_record_v1` |------|------|--------------| | 1 | Redacted finding ingestion | 只批准設計或 draft PR | | 2 | Safe web crawl | 只批准低噪音 scope 定義 | -| 3 | Gitea owner attestation + read-only inventory | 先批准 S4.7 owner scope decision,再只批准只讀 inventory 或 redacted admin export | +| 3 | Gitea owner attestation + read-only inventory | 先依 S4.9 驗收 S4.7 owner response,再只批准只讀 inventory 或 redacted admin export | | 4 | GitHub target decisions | 只批准逐 repo 決策草案 | | 5 | Ref truth review | 只批准人工分類與 reconcile 草案 | | 6 | Credentialed scan | 只允許人工 exception 設計,仍需 runtime gate | @@ -72,3 +72,5 @@ S3.0 只讓人工批准有一致語言與可稽核格式。 它仍然不是 runtime enforcement,也不是一次把資安等級拉滿。低風險與中風險觀察仍以 observe / warn 為主;只有不可逆或高風險動作才進 gate。 2026-05-17 S4.8 追加:Gitea gate 的批准範圍已改為 owner attestation 先行。`approve_scope` 最多允許補 S4.7 owner coverage attestation、更新 matrix / decision table,並在後續 runtime gate 準備妥當後才可做一次 read-only inventory;仍不得保存 token value、寫 Gitea、建立 GitHub repo、sync refs 或切 primary。 + +2026-05-17 S4.9 追加:Gitea gate 現在要求 owner response 依 S4.9 收件包通過基本驗收後,才可把 S4.7 coverage attestation 視為可審 evidence。此驗收仍只更新 read-only matrix / decision table / readiness gate,不授權 inventory runtime、repo migration 或 GitHub primary。 diff --git a/docs/security/SECURITY-APPROVAL-QUEUE.md b/docs/security/SECURITY-APPROVAL-QUEUE.md index 2d3998ce4..72ef9f03a 100644 --- a/docs/security/SECURITY-APPROVAL-QUEUE.md +++ b/docs/security/SECURITY-APPROVAL-QUEUE.md @@ -34,7 +34,7 @@ S3.0 開始,人工批准範圍由 `security_approval_gate_v1` 承接。S3.1 |------|------------|------------| | 1 | `kali-finding-runtime-ingestion-approval-20260513` | 先接 redacted finding evidence,風險低、價值高 | | 2 | `kali-safe-web-crawl-approval-20260513` | TLS/header/basic crawl 屬低噪音,但仍需批准 scope | -| 3 | `gitea-private-internal-server-side-inventory-2026-05-12` | 先審 S4.7 owner coverage attestation,再審 Gitea 全量版本轉 GitHub 的只讀 inventory gate | +| 3 | `gitea-private-internal-server-side-inventory-2026-05-12` | 先依 S4.9 收到並驗收 S4.7 owner coverage attestation response,再審 Gitea 全量版本轉 GitHub 的只讀 inventory gate | | 4 | `source-control-target-repo-approval-bundle-20260513` | 逐 repo owner / visibility / canonical 決策 | | 5 | `source-control-ref-truth-review-bundle-20260513` | refs truth / deprecated / release tag review | | 6 | `kali-credentialed-scan-approval-20260513` | 需要憑證,風險較高 | @@ -70,3 +70,5 @@ S3.0 開始,人工批准範圍由 `security_approval_gate_v1` 承接。S3.1 `kali-execute-endpoint-approval-20260513` 則應維持 block candidate。除非未來建立 allowlist、disable gate、完整 audit 與人工 exception,否則不應讓 AwoooP runtime 直接碰這條路徑。 2026-05-17 S4.8 追加:Gitea queue item 不新增第 9 筆,而是把既有 `gitea-private-internal-server-side-inventory-2026-05-12` 升級為「S4.7 owner coverage attestation 先行」。AwoooP 應先要求 owner 對 5 個 coverage items 作 scope decision;未完成前不得把 inventory 標記 complete,也不得啟動 read-only token / redacted admin export runtime gate。 + +2026-05-17 S4.9 追加:Gitea queue item 仍維持同一筆,新增 owner response 收件包作為 S4.7 的填寫與驗收格式。AwoooP 可顯示 5 個 response templates、8 個 acceptance checks 與 10 個 rejection rules;未收到並驗收 response 前,不得把 owner attestation 視為完成。 diff --git a/docs/security/SECURITY-APPROVAL-REVIEW-PACKET.md b/docs/security/SECURITY-APPROVAL-REVIEW-PACKET.md index 419f77234..717825981 100644 --- a/docs/security/SECURITY-APPROVAL-REVIEW-PACKET.md +++ b/docs/security/SECURITY-APPROVAL-REVIEW-PACKET.md @@ -38,7 +38,7 @@ S3.4 開始,等待 runtime gate 時要看哪些前置條件,由 `security_fo |------|--------|-------------|----------| | 1 | Redacted finding ingestion | `design_or_draft_review` | 只審是否可設計或建立 draft PR | | 2 | Safe web crawl | `low_noise_scan_scope_review` | 只審低噪音 scope 定義 | -| 3 | Gitea owner attestation + read-only inventory | `read_only_inventory_review` | 先審 S4.7 owner scope decision,再審只讀 token 或 redacted export | +| 3 | Gitea owner attestation + read-only inventory | `read_only_inventory_review` | 先依 S4.9 審 S4.7 owner response,再審只讀 token 或 redacted export | | 4 | GitHub target decisions | `design_or_draft_review` | 只審 owner / visibility / canonical 草案 | | 5 | Ref truth review | `design_or_draft_review` | 只審人工分類與 reconcile 草案 | | 6 | Credentialed scan | `manual_exception_review` | 只審 exception 設計 | @@ -70,3 +70,5 @@ S3.2 只補上「讓人好審」的封包,不提高資安阻力。 低風險與中風險仍以 observe / warn / draft review 為主;只有不可逆或高風險動作才持續留在 approval gate,且批准後仍必須再過 runtime gate。 2026-05-17 S4.8 追加:Gitea review packet 會顯示 S4.7 的 5 個 owner attestation items、`received_attestation_count=0` 與 `accepted_attestation_count=0`。這讓 reviewer 先判斷 coverage gap 與 scope decision,不會把 read-only inventory approval 誤解成 repo migration 或 GitHub primary approval。 + +2026-05-17 S4.9 追加:Gitea review packet 會顯示 S4.9 的 5 個 owner response templates、`received_response_count=0`、8 個 acceptance checks 與 10 個 rejection rules。reviewer 應先看 response 是否可驗收,再看 read-only inventory gate;review packet 仍不代表批准,也不授權執行。 diff --git a/docs/security/SECURITY-FOLLOWUP-RUNTIME-GATE.md b/docs/security/SECURITY-FOLLOWUP-RUNTIME-GATE.md index 7bcefb695..93d15b1ba 100644 --- a/docs/security/SECURITY-FOLLOWUP-RUNTIME-GATE.md +++ b/docs/security/SECURITY-FOLLOWUP-RUNTIME-GATE.md @@ -33,7 +33,7 @@ |----------|------|----------| | Redacted finding ingestion | MEDIUM | 只準備 ingestion adapter 的 redaction / audit 前置條件 | | Safe web crawl scope | MEDIUM | 只準備 TLS/header/basic crawl 的低噪音 scope | -| Gitea owner attestation + read-only inventory | MEDIUM | 先準備 S4.7 owner scope decision,再準備 read-only token 或 redacted export inventory | +| Gitea owner attestation + read-only inventory | MEDIUM | 先依 S4.9 驗收 S4.7 owner response,再準備 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 與停用方式 | @@ -63,3 +63,5 @@ S3.4 是「批准後仍不能直接做事」的保險絲。 它讓未來真正進 runtime 前的資料門檻先被定義清楚,但仍維持初期低摩擦:目前只顯示、只準備、只留痕,不執行。 2026-05-17 S4.8 追加:Gitea follow-up runtime gate 已要求 S4.7 owner coverage attestation 先完成。即使未來 read-only inventory 被批准,仍要先看 public-only / local remote gap、org/user endpoint、110 adjacent source、canonical owner 與 legacy/inaccessible disposition 的 owner decision;未完成前不得執行 inventory。 + +2026-05-17 S4.9 追加:Gitea follow-up runtime gate 已要求 S4.9 owner response 通過基本驗收後,才可把 S4.7 owner scope decision 當成 read-only inventory 的前置 evidence。未收到或未驗收 owner response 前,不得執行 inventory,也不得標記 inventory complete。 diff --git a/docs/security/SECURITY-MIRROR-READINESS.md b/docs/security/SECURITY-MIRROR-READINESS.md index bd60b6eeb..5ae926ad0 100644 --- a/docs/security/SECURITY-MIRROR-READINESS.md +++ b/docs/security/SECURITY-MIRROR-READINESS.md @@ -35,7 +35,7 @@ | Contract | 狀態 | 原因 | 下一步 | |----------|------|------|--------| | `security_finding_v1` | `partial_ready` | 目前只有 Kali sample snapshot,runtime ingestion 尚未啟用 | 先 review `kali-finding-runtime-ingestion-approval-20260513` | -| `gitea_repo_inventory_v1` | `partial_ready` | 目前只有 public-only / blocked endpoint evidence;S4.5 已補認證清冊匯出請求,S4.6 已補匯入驗收契約,S4.7 已補 owner coverage attestation;未認證公開範圍 2 個、本機可見 Gitea unique 4 個、覆蓋缺口 2 個、attestation items 5 個 | 先取得 S4.7 owner scope decision,再依 S4.5 請求取得脫敏清冊並用 S4.6 驗收 / 拒收 / 隔離;不保存 token value | +| `gitea_repo_inventory_v1` | `partial_ready` | 目前只有 public-only / blocked endpoint evidence;S4.5 已補認證清冊匯出請求,S4.6 已補匯入驗收契約,S4.7 已補 owner coverage attestation,S4.9 已補 owner response 收件包;未認證公開範圍 2 個、本機可見 Gitea unique 4 個、覆蓋缺口 2 個、attestation items 5 個、owner response 0 筆 | 先依 S4.9 收到並驗收 S4.7 owner response,再依 S4.5 請求取得脫敏清冊並用 S4.6 驗收 / 拒收 / 隔離;不保存 token value | | `coding_task_v1` | `contract_only` | 已有 schema 與 handoff prompt,尚無正式 coding task snapshot | 等 code review 產生實際 task 後再 mirror | ## 2. AwoooP 鏡像目的地 @@ -82,7 +82,7 @@ AwoooP 可以將 ready / partial contracts mirror 到: 14. 再 mirror `security_followup_runtime_gate_v1`,只顯示 runtime gate 準備模板、preflight checks 與 rollback / disable requirement。 15. 再 mirror `source_control_primary_readiness_gate_v1`,只顯示 GitHub primary parity、owner、rollback 與人工批准缺口。 16. 再 mirror `source_control_primary_rollback_adr_v1`,只顯示 7 個 in-scope repo 的 rollback ADR 草案、validation window 與 owner review;不執行 rollback、不切 primary。 -17. 再 mirror `gitea_repo_inventory_v1`、S4.5 認證清冊匯出請求、S4.6 匯入驗收契約與 S4.7 owner coverage attestation,只顯示未認證公開範圍 / 本機 evidence 覆蓋缺口、只讀 / 管理脫敏匯出選項、payload 驗收 / 拒收 / 隔離規則與 5 個 owner scope decision items;不保存 token value、不寫 Gitea、不 sync refs。 +17. 再 mirror `gitea_repo_inventory_v1`、S4.5 認證清冊匯出請求、S4.6 匯入驗收契約、S4.7 owner coverage attestation 與 S4.9 owner response 收件包,只顯示未認證公開範圍 / 本機 evidence 覆蓋缺口、只讀 / 管理脫敏匯出選項、payload 驗收 / 拒收 / 隔離規則、5 個 owner scope decision items 與 response templates;不保存 token value、不寫 Gitea、不 sync refs。 18. 再 mirror `source_control_workflow_secret_name_inventory_v1`、S4.2 local evidence 與 S4.3 redacted export request,只顯示 workflow / webhook / runner / deploy key / branch protection / CODEOWNERS / secret 名稱 inventory 缺口;目前 local evidence 有 4 個 repos、31 個 workflow files、43 個 referenced secret names,export request 有 7 個 repos、5 類 lanes,不保存 secret value。 19. 再 mirror `kali_integration_status_v1` 與 `kali_scan_scope_approval_v1`。 20. 最後再 mirror source-control 其他 contracts。 diff --git a/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md b/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md index 815251e74..11fbd05bf 100644 --- a/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md +++ b/docs/security/SECURITY-MIRROR-STATUS-ROLLUP.md @@ -29,7 +29,7 @@ | Follow-up runtime gate templates | S3.4 已建立;8 個 templates、0 個 active runtime gates | | GitHub primary readiness gate | S4.0 已建立;8 個 candidate repos、7 個 in-scope blocked、0 個 primary ready | | GitHub primary rollback ADR | S4.4 已建立;7 個 in-scope rollback drafts、0 個 owner approved、0 個 dry-run completed、0 個 active cutover | -| Gitea inventory | S4.5 已補認證清冊匯出請求;S4.6 已補匯入驗收契約;S4.7 已補 owner coverage attestation;S4.8 已把既有 Gitea queue/gate/review packet/follow-up gate 對齊 attestation 先行;目前 status=`partial_waiting_authenticated_inventory`、未認證公開範圍 repos 2 個、本機可見 Gitea unique repos 4 個、匯出來源選項 2 類、匯入驗收 payload 0 筆、owner attestation items 5 個、收到 attestation 0 筆、敏感 payload 必須隔離、允許收集 token value=false | +| Gitea inventory | S4.5 已補認證清冊匯出請求;S4.6 已補匯入驗收契約;S4.7 已補 owner coverage attestation;S4.8 已把既有 Gitea queue/gate/review packet/follow-up gate 對齊 attestation 先行;S4.9 已補 owner response 收件包;目前 status=`partial_waiting_authenticated_inventory`、未認證公開範圍 repos 2 個、本機可見 Gitea unique repos 4 個、匯出來源選項 2 類、匯入驗收 payload 0 筆、owner attestation items 5 個、收到 attestation 0 筆、owner response 0 筆、敏感 payload 必須隔離、允許收集 token value=false | | Workflow / secret name inventory | S4.1 已建立;S4.2 補 4 個 repos、31 個 workflow files、43 個 referenced secret names 的 local evidence;S4.3 補 7 個 repos、5 類 lanes 的 redacted export request;0 個 inventory complete、禁止收集 secret value、禁止 write token | | Dry-run | `contract_defined_not_executed` | | Runtime actions | `false` | @@ -59,7 +59,7 @@ 1. redacted finding ingestion adapter。 2. safe web crawl scope。 -3. Gitea private/internal read-only inventory:先依 S4.7 取得 owner coverage attestation,且 S4.8 已把這個先行條件接到既有 approval queue / gate / review packet / follow-up runtime gate;再依 S4.5 認證匯出請求補全量清冊;收到脫敏 payload 後先依 S4.6 驗收 / 拒收 / 隔離;目前未認證公開範圍 2 個、本機可見 Gitea unique 4 個、覆蓋缺口 2 個、attestation items 5 個,不保存 token value。 +3. Gitea private/internal read-only inventory:先依 S4.9 收到並驗收 S4.7 owner coverage attestation response,且 S4.8 已把這個先行條件接到既有 approval queue / gate / review packet / follow-up runtime gate;再依 S4.5 認證匯出請求補全量清冊;收到脫敏 payload 後先依 S4.6 驗收 / 拒收 / 隔離;目前未認證公開範圍 2 個、本機可見 Gitea unique 4 個、覆蓋缺口 2 個、attestation items 5 個、owner response 0 筆,不保存 token value。 4. GitHub target / owner / visibility / canonical。 5. Kali `/execute` 維持 block candidate。 6. GitHub primary readiness blockers 與 rollback ADR 缺口。 diff --git a/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md b/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md index a370f96f4..a61de30b8 100644 --- a/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md +++ b/docs/security/SECURITY-SUPPLY-CHAIN-CONTRACT-MANIFEST.md @@ -39,7 +39,7 @@ | `security_mirror_status_rollup_v1` | mirror-only | AwoooP / Security Supply Chain 跨 Session 狀態總覽 | `security-mirror-status-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 | public-only / blocked endpoint / S4.5 export request / S4.6 import acceptance / S4.7 coverage attestation snapshots | +| `gitea_repo_inventory_v1` | mirror-only | Gitea repo inventory;S4.5 已補認證清冊匯出請求,S4.6 已補匯入驗收契約,S4.7 已補 owner coverage attestation,S4.9 已補 owner response 收件包 | public-only / blocked endpoint / S4.5 export request / S4.6 import acceptance / S4.7 coverage attestation / S4.9 response snapshots | | `local_git_remote_inventory_v1` | mirror-only | 本機 remote coverage | `local-git-remote-inventory.snapshot.json` | | `github_target_probe_v1` | mirror-only | GitHub target visibility | `github-target-probe.snapshot.json` | | `github_target_decision_v1` | mirror-only | GitHub target 決策 | `github-target-decision.snapshot.json` | @@ -60,7 +60,7 @@ 1. 先讀 `security_rollout_policy_v1`,確認目前仍是 `mirror_only`。 2. 再讀本 manifest,取得可消費 contract 與禁止動作。 3. 將 snapshot mirror 成 Runtime State / Channel Event / Audit evidence。 -4. 只對 `approval_required_event_v1`、repo approval package、`security_approval_review_packet_v1`、`security_approval_state_transition_v1`、`security_followup_runtime_gate_v1`、`source_control_primary_readiness_gate_v1`、`source_control_primary_rollback_adr_v1` 與 `source_control_workflow_secret_name_inventory_v1` 建 approval candidate / review lane / next-state display / runtime gate preparation / primary readiness display / rollback ADR display / workflow-secret name inventory gate / redacted export request display;`gitea_repo_inventory_v1` 只能顯示 S4.5 認證匯出請求、S4.6 匯入驗收契約、S4.7 owner coverage attestation request 與覆蓋缺口,不得觸發 token collection 或 Gitea write。 +4. 只對 `approval_required_event_v1`、repo approval package、`security_approval_review_packet_v1`、`security_approval_state_transition_v1`、`security_followup_runtime_gate_v1`、`source_control_primary_readiness_gate_v1`、`source_control_primary_rollback_adr_v1` 與 `source_control_workflow_secret_name_inventory_v1` 建 approval candidate / review lane / next-state display / runtime gate preparation / primary readiness display / rollback ADR display / workflow-secret name inventory gate / redacted export request display;`gitea_repo_inventory_v1` 只能顯示 S4.5 認證匯出請求、S4.6 匯入驗收契約、S4.7 owner coverage attestation request、S4.9 owner response 收件包與覆蓋缺口,不得觸發 token collection 或 Gitea write。 5. 不新增執行按鈕,不做 runtime enforcement。 ## 3. 永久禁止 diff --git a/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md b/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md index d4c485e6e..f7f2d5ef7 100644 --- a/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md +++ b/docs/security/SECURITY-SUPPLY-CHAIN-PROGRESS.md @@ -4,7 +4,7 @@ |------|------| | 日期 | 2026-05-17 | | 狀態 | S0/S1 read-only evidence 建置中 | -| 本階段完成 | 資安供應鏈 contract manifest + Source Control Approval Board + Draft Reconcile Plan + Ref Detail Diff + Ref Truth Classification + GitHub Primary Readiness Gate + GitHub Primary Rollback ADR + Gitea 認證清冊匯出請求 + Gitea 認證清冊匯入驗收契約 + Gitea 清冊覆蓋 Owner Attestation + Gitea Owner Attestation Approval Lane 對齊 + Workflow / Secret Name Inventory + Workflow / Secret Name Local Evidence + Workflow / Secret Name Redacted Export Request + Kali 112 live integration status + Security Finding contract + Kali scan scope approval package + Security Approval Queue + S3 人工批准 Gate + S3 人工決策紀錄 + S3 人工審查封包 + S3 人工決策狀態轉移 + S3 後續 runtime gate 準備契約 + 鏡像 readiness index + 鏡像接收計畫 + 鏡像事件信封 + 鏡像路由矩陣 + 鏡像驗收契約 + 鏡像隔離契約 + 鏡像 dry-run 報告契約 + 鏡像狀態彙整契約 | +| 本階段完成 | 資安供應鏈 contract manifest + Source Control Approval Board + Draft Reconcile Plan + Ref Detail Diff + Ref Truth Classification + GitHub Primary Readiness Gate + GitHub Primary Rollback ADR + Gitea 認證清冊匯出請求 + Gitea 認證清冊匯入驗收契約 + Gitea 清冊覆蓋 Owner Attestation + Gitea Owner Attestation Approval Lane 對齊 + Gitea Owner Attestation Response 收件包 + Workflow / Secret Name Inventory + Workflow / Secret Name Local Evidence + Workflow / Secret Name Redacted Export Request + Kali 112 live integration status + Security Finding contract + Kali scan scope approval package + Security Approval Queue + S3 人工批准 Gate + S3 人工決策紀錄 + S3 人工審查封包 + S3 人工決策狀態轉移 + S3 後續 runtime gate 準備契約 + 鏡像 readiness index + 鏡像接收計畫 + 鏡像事件信封 + 鏡像路由矩陣 + 鏡像驗收契約 + 鏡像隔離契約 + 鏡像 dry-run 報告契約 + 鏡像狀態彙整契約 | | 原則 | 低摩擦分階段;文件、schema、read-only evidence 優先;不做 runtime enforcement、不切 primary | ## 0. 本階段完成後整體進度 @@ -47,6 +47,7 @@ | S4.6 Gitea 認證清冊匯入驗收契約 | 完成草案 | 已建立匯入驗收 schema / snapshot / 人讀版;目前 received payload 0、accepted 0、rejected 0;定義 10 個驗收檢查、10 個拒收規則與 4 個 quarantine lanes | owner 提供脫敏 payload 後先驗收 / 拒收 / 隔離;仍不可把驗收當 primary approval | | S4.7 Gitea 清冊覆蓋 Owner Attestation | 完成草案 | 已建立 coverage attestation schema / snapshot / 人讀版;5 個 owner decision items、received attestation 0、accepted 0、execution authorized=false | owner 判定 public-only / local remote gap、org/user endpoint、110 adjacent source、canonical owner 與 legacy/inaccessible disposition;仍不可把 attestation 當 migration approval | | S4.8 Gitea Owner Attestation Approval Lane 對齊 | 完成草案 | 已將既有 Gitea approval queue / gate / review packet / follow-up runtime gate 對齊 S4.7 先行條件;queue items 維持 8、review packets 維持 8、active runtime gates 維持 0 | AwoooP 先顯示 5 個 attestation items,owner decision 接受前不得執行 read-only inventory 或標記 complete | +| S4.9 Gitea Owner Attestation Response 收件包 | 完成草案 | 已建立 owner response schema / snapshot / 人讀版;5 個 response templates、8 個 acceptance checks、10 個 rejection rules、received response 0、accepted 0、execution authorized=false | owner 依模板回覆 S4.7 五個 items;response 通過只更新 read-only matrix / decision table / readiness gate,不代表 inventory 執行或 primary approval | | S4 migration execution | 未開始 | GitHub primary 長期方向已確認,但 refs / tags / workflow / secret 名稱尚未全量驗證,rollback ADR 仍待 owner approval | SHA/tag/workflow parity、rollback ADR owner approval 與 runtime gate | ## 1. 已建立的主要 evidence @@ -65,6 +66,8 @@ | Gitea 認證清冊匯入驗收契約 JSON | `docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json` | | Gitea 清冊覆蓋 owner attestation | `docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md` | | Gitea 清冊覆蓋 owner attestation JSON | `docs/security/gitea-inventory-coverage-attestation.snapshot.json` | +| Gitea owner attestation response 收件包 | `docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` | +| Gitea owner attestation response JSON | `docs/security/gitea-inventory-owner-attestation-response.snapshot.json` | | Gitea 管理匯出 redaction checklist | `docs/security/GITEA-ADMIN-EXPORT-REDACTION-CHECKLIST.md` | | Gitea org endpoint blocked evidence | `docs/security/GITEA-ORG-REPO-INVENTORY-BLOCKED-SNAPSHOT.md` | | Source-control migration matrix | `docs/security/SOURCE-CONTROL-MIGRATION-MATRIX.md` | @@ -150,11 +153,11 @@ ## 3. 下一階段建議 -1. 先依 S4.7 `GITEA-INVENTORY-COVERAGE-ATTESTATION.md` 取得 owner coverage attestation;S4.8 已把這件事接到既有 approval queue / gate / review packet / follow-up runtime gate。之後再依 S4.5 `GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md` 取得 Gitea 認證清冊;收到 payload 後依 S4.6 `GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md` 驗收 / 拒收 / 隔離。目前未認證公開範圍 2 個、本機可見 Gitea unique 4 個、覆蓋缺口 2 個、attestation items 5 個;只能用只讀 token API 或已脫敏管理匯出補私有 / 內部 server-side 全量 repo list,不保存 token value。 +1. 先依 S4.9 `GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md` 收到並驗收 S4.7 `GITEA-INVENTORY-COVERAGE-ATTESTATION.md` 的 owner response;S4.8 已把這件事接到既有 approval queue / gate / review packet / follow-up runtime gate。之後再依 S4.5 `GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md` 取得 Gitea 認證清冊;收到 payload 後依 S4.6 `GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md` 驗收 / 拒收 / 隔離。目前未認證公開範圍 2 個、本機可見 Gitea unique 4 個、覆蓋缺口 2 個、attestation items 5 個、owner response 0 筆;只能用只讀 token API 或已脫敏管理匯出補私有 / 內部 server-side 全量 repo list,不保存 token value。 2. 依 `SOURCE-CONTROL-APPROVAL-BOARD.md` 對 7 個 `approval_required=true` 的 GitHub target 做 owner / visibility / canonical 決策。 3. 依 `SOURCE-CONTROL-REF-TRUTH-CLASSIFICATION.md` 對 `awoooi`、`clawbot-v5`、`wooo-aiops` 做單 repo / 單 ref owner 判定;仍不得 push refs。 4. 對 `ewoooc` / `momo-pro-system` 完成 server-side canonical 判定。 5. 依 `KALI-SCAN-SCOPE-APPROVAL-PACKAGE.md` 取得 safe crawl、credentialed scan、runtime ingestion、full-upgrade / reboot 等 gate 的人工批准;不得直接接 `/execute`。 -6. AwoooP 主線先讀 `security_mirror_readiness_v1`、`security_mirror_intake_plan_v1`、`security_mirror_event_v1`、`security_mirror_route_v1`、`security_mirror_acceptance_v1`、`security_mirror_quarantine_v1`、`security_mirror_dry_run_v1`、`security_mirror_status_rollup_v1`、`security_approval_gate_v1`、`security_approval_decision_record_v1`、`security_approval_review_packet_v1`、`security_approval_state_transition_v1`、`security_followup_runtime_gate_v1`、`source_control_primary_readiness_gate_v1`、`source_control_primary_rollback_adr_v1` 與 `source_control_workflow_secret_name_inventory_v1`,只建立 mirror-only / read-only policy 入口,不新增執行按鈕;其中 Gitea inventory 需同時顯示 S4.5 認證清冊匯出請求、S4.6 匯入驗收契約與 S4.7 owner coverage attestation,workflow / secret inventory 需同時顯示 S4.3 redacted export request,primary readiness 需同時顯示 S4.4 rollback ADR 草案。 +6. AwoooP 主線先讀 `security_mirror_readiness_v1`、`security_mirror_intake_plan_v1`、`security_mirror_event_v1`、`security_mirror_route_v1`、`security_mirror_acceptance_v1`、`security_mirror_quarantine_v1`、`security_mirror_dry_run_v1`、`security_mirror_status_rollup_v1`、`security_approval_gate_v1`、`security_approval_decision_record_v1`、`security_approval_review_packet_v1`、`security_approval_state_transition_v1`、`security_followup_runtime_gate_v1`、`source_control_primary_readiness_gate_v1`、`source_control_primary_rollback_adr_v1` 與 `source_control_workflow_secret_name_inventory_v1`,只建立 mirror-only / read-only policy 入口,不新增執行按鈕;其中 Gitea inventory 需同時顯示 S4.5 認證清冊匯出請求、S4.6 匯入驗收契約、S4.7 owner coverage attestation 與 S4.9 owner response 收件包,workflow / secret inventory 需同時顯示 S4.3 redacted export request,primary readiness 需同時顯示 S4.4 rollback ADR 草案。 7. AwoooP 主線消費 `security_rollout_policy_v1` 時,只做 read-only policy,不做 runtime blocking。 -8. AwoooP 主線再讀 `security_approval_queue_v1`、`security_approval_gate_v1`、`security_approval_decision_record_v1`、`security_approval_review_packet_v1`、`security_approval_state_transition_v1`、`security_followup_runtime_gate_v1`、`source_control_primary_readiness_gate_v1`、`source_control_primary_rollback_adr_v1`、`source_control_workflow_secret_name_inventory_v1` 與 `security_supply_chain_contract_manifest_v1`,顯示 review order、批准範圍、審查封包、決策紀錄、決策後狀態、後續 runtime gate 準備條件、Gitea inventory 覆蓋缺口、S4.5 認證匯出請求、S4.6 匯入驗收 / 隔離規則、S4.7 owner attestation items、GitHub primary readiness blockers、rollback ADR 草案、workflow / secret 名稱 inventory 缺口、redacted export request 與 blocked reason,不新增 execution router。 +8. AwoooP 主線再讀 `security_approval_queue_v1`、`security_approval_gate_v1`、`security_approval_decision_record_v1`、`security_approval_review_packet_v1`、`security_approval_state_transition_v1`、`security_followup_runtime_gate_v1`、`source_control_primary_readiness_gate_v1`、`source_control_primary_rollback_adr_v1`、`source_control_workflow_secret_name_inventory_v1` 與 `security_supply_chain_contract_manifest_v1`,顯示 review order、批准範圍、審查封包、決策紀錄、決策後狀態、後續 runtime gate 準備條件、Gitea inventory 覆蓋缺口、S4.5 認證匯出請求、S4.6 匯入驗收 / 隔離規則、S4.7 owner attestation items、S4.9 owner response templates、GitHub primary readiness blockers、rollback ADR 草案、workflow / secret 名稱 inventory 缺口、redacted export request 與 blocked reason,不新增 execution router。 diff --git a/docs/security/SOURCE-CONTROL-PRIMARY-READINESS-GATE.md b/docs/security/SOURCE-CONTROL-PRIMARY-READINESS-GATE.md index a21fb0cc8..9abe99496 100644 --- a/docs/security/SOURCE-CONTROL-PRIMARY-READINESS-GATE.md +++ b/docs/security/SOURCE-CONTROL-PRIMARY-READINESS-GATE.md @@ -33,7 +33,7 @@ | Gate | 目前狀態 | 說明 | |------|----------|------| -| Gitea authenticated inventory | blocked | private/internal 全量 repo list 尚未完成;S4.7 owner coverage attestation 仍未收到 | +| Gitea authenticated inventory | blocked | private/internal 全量 repo list 尚未完成;S4.7 owner coverage attestation 與 S4.9 owner response 仍未收到 | | refs truth / branch-tag parity | blocked | 3 個 mapped repos 仍有 refs drift | | workflow / runner / secret name parity | missing evidence | S4.1 已建立 inventory 契約;尚未有實際 redacted workflow、webhook、runner、secret 名稱 snapshot | | owner / visibility / canonical | pending review | 7 個 in-scope targets 仍需人工決策 | @@ -44,7 +44,7 @@ 1. 顯示每個 repo 的 readiness state、blockers 與 evidence refs。 2. 顯示 `primary_ready_count=0`。 3. 將 7 個 in-scope repos 維持在 approval / review lane。 -4. 顯示哪些 evidence 仍缺:Gitea authenticated inventory、S4.7 owner coverage attestation、refs truth、workflow/runner/secret name inventory、rollback ADR。 +4. 顯示哪些 evidence 仍缺:Gitea authenticated inventory、S4.7 owner coverage attestation、S4.9 owner response、refs truth、workflow/runner/secret name inventory、rollback ADR。 5. 連到 `source_control_workflow_secret_name_inventory_v1` 顯示 8 個 candidate repos 的 inventory lane 缺口與 S4.2 local evidence;只保存 secret 名稱與 owner,不保存 value。 6. 連到 `source_control_primary_rollback_adr_v1` 顯示 7 個 in-scope repos 的 rollback owner、trigger 與 validation window 草案。 7. 把狀態寫入 Audit evidence 與 Operator Console。 @@ -63,6 +63,6 @@ S4.0 只是把「切換前一定要看見什麼」先定義清楚。 -S4.4 已補上 rollback ADR 草案,但它只是 owner review 的資料包,不是切換批准。S4.7 已補上 Gitea coverage owner attestation,但它只是 scope decision request,不是 migration approval。`owner_approved_count=0`、`dry_run_completed_count=0`、`active_cutover_count=0`。 +S4.4 已補上 rollback ADR 草案,但它只是 owner review 的資料包,不是切換批准。S4.7 已補上 Gitea coverage owner attestation,S4.9 已補上 owner response 收件包;它們只是 scope decision 與 response 驗收框架,不是 migration approval。`owner_approved_count=0`、`dry_run_completed_count=0`、`active_cutover_count=0`。 這讓長期回到 GitHub 的方向可以繼續往前,但仍維持低摩擦:目前只 mirror、只顯示、只留痕,不執行。 diff --git a/docs/security/gitea-inventory-owner-attestation-response.snapshot.json b/docs/security/gitea-inventory-owner-attestation-response.snapshot.json new file mode 100644 index 000000000..e8d150542 --- /dev/null +++ b/docs/security/gitea-inventory-owner-attestation-response.snapshot.json @@ -0,0 +1,346 @@ +{ + "schema_version": "gitea_inventory_owner_attestation_response_v1", + "status": "draft_waiting_owner_response", + "date": "2026-05-17", + "mode": "owner_response_intake_only", + "runtime_execution_authorized": false, + "source_contract": "gitea_inventory_coverage_attestation_v1", + "target_contract": "gitea_repo_inventory_v1", + "source_indexes": [ + "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", + "docs/security/gitea-authenticated-inventory-export-request.snapshot.json", + "docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json", + "docs/security/source-control-primary-readiness-gate.snapshot.json", + "docs/security/security-approval-review-packet.snapshot.json", + "docs/security/security-followup-runtime-gate.snapshot.json" + ], + "summary": { + "owner_response_status": "waiting_owner_response", + "required_response_item_count": 5, + "received_response_count": 0, + "accepted_response_count": 0, + "rejected_response_count": 0, + "response_template_count": 5, + "acceptance_check_count": 8, + "rejection_rule_count": 10, + "token_value_collection_allowed": false, + "raw_secret_allowed": false, + "repo_write_allowed": false, + "refs_sync_allowed": false, + "github_primary_switch_authorized": false, + "action_buttons_allowed": false + }, + "response_templates": [ + { + "template_id": "response-public-only-vs-local-gitea-gap", + "attestation_item_id": "public_only_vs_local_gitea_gap", + "title": "public-only 與本機 Gitea remote 覆蓋缺口回覆", + "required_owner_fields": [ + "owner_role_or_team", + "decision", + "decision_reason", + "affected_repos", + "evidence_refs", + "followup_owner" + ], + "acceptable_decisions": [ + "in_scope", + "out_of_scope", + "legacy_archived", + "external_system", + "inaccessible_requires_followup", + "unknown_requires_more_evidence" + ], + "minimum_evidence_refs": [ + "docs/security/gitea-repo-inventory.snapshot.json", + "docs/security/local-git-remote-inventory.snapshot.json" + ], + "acceptance_criteria": [ + "必須逐項說明 `wooo/clawbot-v5` 與 `wooo/wooo-aiops` 是否屬本輪 inventory / migration scope", + "若標示 out_of_scope、legacy_archived 或 external_system,必須附 owner 理由", + "若標示 in_scope,必須指定後續 repo owner 與 GitHub target review owner" + ], + "rejection_conditions": [ + "只回覆整體同意但沒有逐 repo decision", + "要求直接建立 GitHub repo、sync refs 或切 GitHub primary", + "貼出 token、credential、私有 clone URL 或未脫敏截圖" + ], + "allowed_outputs": [ + "更新 attestation snapshot 的 read-only decision 欄位", + "更新 migration matrix 與 decision table 的 scope 欄位", + "維持 gitea_repo_inventory_v1.status=partial" + ], + "execution_authorized": false + }, + { + "template_id": "response-org-user-endpoint-identity", + "attestation_item_id": "org_user_endpoint_identity", + "title": "Gitea `wooo` org/user endpoint 身分回覆", + "required_owner_fields": [ + "owner_role_or_team", + "decision", + "decision_reason", + "canonical_namespace", + "evidence_refs", + "followup_owner" + ], + "acceptable_decisions": [ + "in_scope", + "out_of_scope", + "inaccessible_requires_followup", + "unknown_requires_more_evidence" + ], + "minimum_evidence_refs": [ + "docs/security/gitea-org-repo-inventory-blocked.snapshot.json", + "docs/security/gitea-authenticated-inventory-export-request.snapshot.json" + ], + "acceptance_criteria": [ + "必須說明 `wooo` 在 Gitea 中應以 user、org 或兩者盤點", + "必須標示 canonical endpoint 或要求管理者補脫敏 evidence", + "不得把 org endpoint 404 自動解釋為不存在 private/internal repos" + ], + "rejection_conditions": [ + "只說 public API 查不到就當完成", + "要求使用 write/admin token", + "提供未脫敏 API response 或 token value" + ], + "allowed_outputs": [ + "更新 Gitea inventory query mode 的待判定說明", + "更新 AwoooP review lane 的 endpoint scope 顯示", + "維持 read-only / approval-only 狀態" + ], + "execution_authorized": false + }, + { + "template_id": "response-internal-110-adjacent-scope", + "attestation_item_id": "internal_110_adjacent_scope", + "title": "110 內部相鄰來源 scope 回覆", + "required_owner_fields": [ + "owner_role_or_team", + "decision", + "decision_reason", + "affected_sources", + "evidence_refs", + "followup_owner" + ], + "acceptable_decisions": [ + "in_scope", + "out_of_scope", + "legacy_archived", + "external_system", + "inaccessible_requires_followup", + "unknown_requires_more_evidence" + ], + "minimum_evidence_refs": [ + "docs/security/git-remote-refs-bitan-tsenyang.snapshot.json", + "docs/security/git-remote-refs-wooo-infra-config.snapshot.json", + "docs/security/local-git-remote-inventory.snapshot.json" + ], + "acceptance_criteria": [ + "必須逐項說明 `bitan-pharmacy`、`root/momo-pro-system`、`tsenyang-website`、`wooo/wooo-infra-config` 是否納入本輪 scope", + "若屬外部或 legacy,必須指定後續 owner 或排除理由", + "若屬 in_scope,必須標示是否需要後續 refs truth / workflow-secret parity" + ], + "rejection_conditions": [ + "用單一句話排除所有 110 adjacent sources", + "把內部相鄰來源直接推到 GitHub primary readiness", + "要求 fetch/push/delete refs" + ], + "allowed_outputs": [ + "更新 source-control migration matrix 的 scope 欄位", + "更新 primary readiness blocker 說明", + "建立 request_more_evidence lane" + ], + "execution_authorized": false + }, + { + "template_id": "response-repo-owner-canonical-scope", + "attestation_item_id": "repo_owner_canonical_scope", + "title": "repo owner / canonical / GitHub target scope 回覆", + "required_owner_fields": [ + "owner_role_or_team", + "decision", + "decision_reason", + "repo_owner", + "canonical_source", + "github_target_candidate", + "visibility_review_owner", + "evidence_refs" + ], + "acceptable_decisions": [ + "in_scope", + "out_of_scope", + "external_system", + "unknown_requires_more_evidence" + ], + "minimum_evidence_refs": [ + "docs/security/github-target-decision.snapshot.json", + "docs/security/source-control-approval-board.snapshot.json", + "docs/security/local-repo-canonical-ewoooc-momo.snapshot.json" + ], + "acceptance_criteria": [ + "每個 in-scope repo 必須有 owner、canonical source、GitHub target candidate 與 visibility review owner", + "若 GitHub target 目前 not_found_or_private,必須維持 pending approval,不得自動建立", + "若 canonical 關係未定,必須標示 unknown_requires_more_evidence" + ], + "rejection_conditions": [ + "把 not_found_or_private 當成可建立 repo 的批准", + "沒有 visibility / owner 責任人", + "要求修改 repo visibility 或建立 GitHub repo" + ], + "allowed_outputs": [ + "更新 canonical decision table", + "更新 GitHub target review package", + "更新 primary readiness gate 的 owner/canonical blocker" + ], + "execution_authorized": false + }, + { + "template_id": "response-legacy-or-inaccessible-disposition", + "attestation_item_id": "legacy_or_inaccessible_repo_disposition", + "title": "legacy / inaccessible repo disposition 回覆", + "required_owner_fields": [ + "owner_role_or_team", + "decision", + "decision_reason", + "affected_repos_or_sources", + "disposition", + "evidence_refs", + "followup_owner" + ], + "acceptable_decisions": [ + "out_of_scope", + "legacy_archived", + "external_system", + "inaccessible_requires_followup", + "unknown_requires_more_evidence" + ], + "minimum_evidence_refs": [ + "docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json", + "docs/security/source-control-primary-readiness-gate.snapshot.json" + ], + "acceptance_criteria": [ + "每個 legacy / inaccessible / external repo 必須有 disposition 與 owner 理由", + "inaccessible_requires_followup 必須指定下一個 evidence owner", + "unknown_requires_more_evidence 必須維持 blocker,不得進 primary readiness" + ], + "rejection_conditions": [ + "沒有列出受影響 repo 或 source", + "把未出現在 payload 的 repo 自動視為已完成 inventory", + "要求 archive/delete/disable Gitea repo" + ], + "allowed_outputs": [ + "更新 legacy / inaccessible review lane", + "更新 status rollup 的 blocked reason", + "維持 source-control primary readiness blocker" + ], + "execution_authorized": false + } + ], + "acceptance_checks": [ + { + "check_id": "maps_to_known_s4_7_item", + "title": "回覆對應既有 S4.7 item", + "required": true, + "pass_condition": "`attestation_item_id` 必須對應 S4.7 的 5 個 item 之一", + "failure_lane": "reject_unknown_attestation_item", + "execution_authorized": false + }, + { + "check_id": "decision_value_allowed", + "title": "決策值在允許範圍內", + "required": true, + "pass_condition": "`decision` 必須是該 item 的 acceptable_decisions 之一", + "failure_lane": "request_owner_correction", + "execution_authorized": false + }, + { + "check_id": "owner_reason_present", + "title": "owner 理由存在", + "required": true, + "pass_condition": "每筆回覆都必須有 `decision_reason`,且能說明 scope 或 disposition", + "failure_lane": "request_more_evidence", + "execution_authorized": false + }, + { + "check_id": "evidence_refs_redacted", + "title": "evidence refs 已脫敏", + "required": true, + "pass_condition": "`evidence_refs` 只能指向 repo 內文件、snapshot 或 owner 提供的脫敏 metadata,不得含 secret value", + "failure_lane": "quarantine_sensitive_payload", + "execution_authorized": false + }, + { + "check_id": "affected_scope_explicit", + "title": "受影響 repo / namespace / source 明確", + "required": true, + "pass_condition": "回覆必須列出受影響 repo、namespace 或 110 adjacent source,不接受只寫整體同意", + "failure_lane": "request_more_evidence", + "execution_authorized": false + }, + { + "check_id": "no_runtime_or_source_control_action", + "title": "不含 runtime 或 source-control 執行要求", + "required": true, + "pass_condition": "回覆只允許更新文件、snapshot、matrix、decision table 與 readiness gate", + "failure_lane": "reject_runtime_or_source_control_action", + "execution_authorized": false + }, + { + "check_id": "all_required_items_before_acceptance", + "title": "接受前需覆蓋 5 個 items", + "required": true, + "pass_condition": "要把 S4.7 標示為 accepted 前,5 個 required response items 都必須有可驗收 owner response", + "failure_lane": "keep_waiting_owner_response", + "execution_authorized": false + }, + { + "check_id": "primary_readiness_still_blocked", + "title": "GitHub primary readiness 仍維持 blocked", + "required": true, + "pass_condition": "即使 owner response 通過,也只能更新 readiness blocker 說明,不得將 primary_ready_count 改為大於 0", + "failure_lane": "reject_primary_cutover_approval", + "execution_authorized": false + } + ], + "rejection_rules": [ + "回覆含 token value、PAT、cookie、session、CSRF token 或 partial token 時必須拒收。", + "回覆含 webhook secret、repository secret value、runner registration token 或 deploy key private key 時必須拒收。", + "回覆含 private key、DB dump、git object pack、裸 repo tarball 或可還原 credential 的 artifact 時必須拒收。", + "回覆要求使用 write-capable token、admin token 或 secret scope token 時必須拒收。", + "回覆要求建立、刪除、封存或修改 Gitea repo 時必須拒收。", + "回覆要求建立 GitHub repo、修改 visibility、sync refs、delete refs 或 force push 時必須拒收。", + "回覆未逐項對應 S4.7 attestation item 時不得標記 attestation accepted。", + "回覆只提供口頭同意、截圖或不完整 repo metadata 時必須要求補 evidence。", + "回覆把 owner attestation 當成 repo migration approval 或 GitHub primary approval 時必須拒收。", + "任何不確定是否含敏感值的回覆必須先進 mirror quarantine,不得人工手改後直接入庫。" + ], + "allowed_outputs": [ + "更新 `gitea-inventory-coverage-attestation.snapshot.json` 的 read-only owner response 欄位", + "更新 `GITEA-INVENTORY-COVERAGE-ATTESTATION.md` 的已收 / 未收 decision table", + "更新 source-control migration matrix、canonical decision table、primary readiness gate 與 status rollup 的 read-only 欄位", + "把缺口顯示到 AwoooP approval / review lane", + "維持 `gitea_repo_inventory_v1.status=partial`,直到 S4.6 payload 通過且 S4.7 owner response 全部接受" + ], + "forbidden_actions": [ + "store_token_value", + "store_raw_secret", + "store_cookie_or_session", + "import_gitea_db_dump", + "import_git_object_pack", + "use_write_capable_token", + "write_to_gitea", + "create_gitea_repo", + "delete_or_archive_gitea_repo", + "create_github_repo", + "change_repo_visibility", + "sync_git_refs", + "delete_git_refs", + "force_push", + "switch_github_primary", + "disable_gitea", + "add_action_button", + "execute_scan_or_runtime_change" + ] +} diff --git a/docs/security/gitea-readonly-inventory-approval.snapshot.json b/docs/security/gitea-readonly-inventory-approval.snapshot.json index 0910c7de5..04ea9f761 100644 --- a/docs/security/gitea-readonly-inventory-approval.snapshot.json +++ b/docs/security/gitea-readonly-inventory-approval.snapshot.json @@ -15,7 +15,9 @@ "docs/security/GITEA-REPO-INVENTORY-SNAPSHOT.md", "docs/security/GITEA-ORG-REPO-INVENTORY-BLOCKED-SNAPSHOT.md", "docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md", - "docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md" + "docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md", + "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", + "docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md" ], "expires_at": "2026-05-19T23:59:59+08:00" } diff --git a/docs/security/security-approval-gate.snapshot.json b/docs/security/security-approval-gate.snapshot.json index 9725b01e9..8e561d770 100644 --- a/docs/security/security-approval-gate.snapshot.json +++ b/docs/security/security-approval-gate.snapshot.json @@ -12,7 +12,8 @@ "docs/security/kali-scan-scope-approval.snapshot.json", "docs/security/source-control-approval-board.snapshot.json", "docs/security/source-control-ref-truth-classification.snapshot.json", - "docs/security/gitea-inventory-coverage-attestation.snapshot.json" + "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json" ], "summary": { "total_gate_items": 8, @@ -96,7 +97,7 @@ ], "decision_options": ["approve_scope", "reject", "defer", "request_more_evidence"], "allowed_after_approval": [ - "先完成 S4.7 owner coverage attestation 並保留 scope decision evidence", + "先依 S4.9 收到並驗收 S4.7 owner coverage attestation response,保留 scope decision evidence", "使用 read-only token 或 redacted admin export 補齊 repo list", "只保存 token_present=true/false", "更新 migration matrix 與 repo decision table" @@ -106,6 +107,7 @@ "使用 write-capable token", "未完成 S4.7 owner attestation 就標記 inventory complete", "把 owner attestation 當成 repo migration 或 primary cutover approval", + "把 S4.9 owner response packet 當成 inventory 執行授權", "建立 GitHub repo", "sync refs", "切 GitHub primary" @@ -117,6 +119,8 @@ "docs/security/GITEA-ORG-REPO-INVENTORY-BLOCKED-SNAPSHOT.md", "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json", "docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md" ] }, diff --git a/docs/security/security-approval-queue.snapshot.json b/docs/security/security-approval-queue.snapshot.json index f7af28491..300a06782 100644 --- a/docs/security/security-approval-queue.snapshot.json +++ b/docs/security/security-approval-queue.snapshot.json @@ -82,7 +82,7 @@ "risk": "MEDIUM", "state": "pending_approval", "recommended_awooop_mode": "approve_required", - "requested_decision": "是否先要求 owner 完成 S4.7 coverage attestation,並在 scope decision 被接受後,批准使用 read-only token 或 redacted admin export 補齊 Gitea private/internal 全量 repo list。", + "requested_decision": "是否先要求 owner 依 S4.9 response 收件包完成 S4.7 coverage attestation,並在 scope decision 被接受後,批准使用 read-only token 或 redacted admin export 補齊 Gitea private/internal 全量 repo list。", "blocked_until_approved": true, "required_reviewers": [ "migration-engineer", @@ -95,11 +95,13 @@ "docs/security/GITEA-ORG-REPO-INVENTORY-BLOCKED-SNAPSHOT.md", "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json", "docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md", "docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md" ], "allowed_after_approval": [ - "先完成 S4.7 owner coverage attestation,更新 migration matrix 與 decision table", + "先依 S4.9 收到並驗收 S4.7 owner coverage attestation response,更新 migration matrix 與 decision table", "使用 read-only token 或 redacted admin export 執行一次 inventory", "只保存 token_present=true/false", "更新 migration matrix 與 repo decision table" @@ -109,6 +111,7 @@ "使用 write-capable token", "未完成 S4.7 owner attestation 就標記 inventory complete", "把 S4.7 owner attestation 當成 repo migration approval", + "把 S4.9 owner response packet 當成 inventory 執行授權", "建立 GitHub repo", "sync refs", "切 GitHub primary" diff --git a/docs/security/security-approval-review-packet.snapshot.json b/docs/security/security-approval-review-packet.snapshot.json index fda58b0ed..7a923edbe 100644 --- a/docs/security/security-approval-review-packet.snapshot.json +++ b/docs/security/security-approval-review-packet.snapshot.json @@ -12,7 +12,8 @@ "docs/security/security-followup-runtime-gate.snapshot.json", "docs/security/security-mirror-status-rollup.snapshot.json", "docs/security/security-rollout-policy.snapshot.json", - "docs/security/gitea-inventory-coverage-attestation.snapshot.json" + "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json" ], "summary": { "total_review_packets": 8, @@ -104,7 +105,7 @@ "risk": "MEDIUM", "review_state": "ready_for_human_review", "review_lane": "read_only_inventory_review", - "requested_decision": "是否先要求 owner 完成 S4.7 coverage attestation,並在 scope decision 被接受後,才允許 read-only token 或 redacted admin export 補齊 Gitea private/internal 全量 repo list。", + "requested_decision": "是否先要求 owner 依 S4.9 response 收件包完成 S4.7 coverage attestation,並在 scope decision 被接受後,才允許 read-only token 或 redacted admin export 補齊 Gitea private/internal 全量 repo list。", "required_reviewers": [ "migration-engineer", "security-commander", @@ -117,17 +118,20 @@ "docs/security/GITEA-ORG-REPO-INVENTORY-BLOCKED-SNAPSHOT.md", "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json", "docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md", "docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md" ], "allowed_pre_decision_actions": [ "顯示 public-only 與 blocked endpoint evidence", "顯示 S4.7 的 5 個 owner attestation items 與 received_attestation_count=0", + "顯示 S4.9 的 5 個 owner response templates、received_response_count=0 與 rejection rules", "要求 owner 確認 read-only token 或 redacted export 來源", "不保存 token value" ], "allowed_after_decision_actions": [ - "若 approve_scope,先更新 S4.7 owner attestation evidence 與 scope decision", + "若 approve_scope,先依 S4.9 收到並驗收 S4.7 owner response,再更新 attestation evidence 與 scope decision", "若 approve_scope,只能做一次 read-only inventory 或匯入 redacted export", "更新 migration matrix 與 repo decision table" ], @@ -136,6 +140,7 @@ "使用 write-capable token", "未完成 owner attestation 就標記 inventory complete", "把 owner attestation 當成 repo migration 或 primary approval", + "把 S4.9 owner response packet 當成 inventory 執行授權", "建立 GitHub repo", "sync refs", "切 GitHub primary" diff --git a/docs/security/security-followup-runtime-gate.snapshot.json b/docs/security/security-followup-runtime-gate.snapshot.json index 5309eb889..afd02c31d 100644 --- a/docs/security/security-followup-runtime-gate.snapshot.json +++ b/docs/security/security-followup-runtime-gate.snapshot.json @@ -11,7 +11,8 @@ "docs/security/security-approval-decision-record.snapshot.json", "docs/security/security-mirror-status-rollup.snapshot.json", "docs/security/security-rollout-policy.snapshot.json", - "docs/security/gitea-inventory-coverage-attestation.snapshot.json" + "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json" ], "summary": { "total_gate_templates": 8, @@ -109,7 +110,7 @@ "gate_state": "waiting_approved_scope", "applies_after_decision": "approve_scope", "minimum_required_evidence": [ - "S4.7 owner coverage attestation 已完成且 5 個 items 都有 scope decision", + "S4.9 owner response 已完成驗收,且 S4.7 owner coverage attestation 的 5 個 items 都有 scope decision", "read-only token scope 或 redacted admin export 來源", "token_present=true/false,不保存 token value", "allowed export fields checklist", @@ -121,14 +122,14 @@ "human-owner" ], "preflight_checks": [ - "確認 public-only / local remote gap、org/user endpoint、110 adjacent source、canonical owner 與 legacy/inaccessible disposition 已由 owner 判定", + "確認 public-only / local remote gap、org/user endpoint、110 adjacent source、canonical owner 與 legacy/inaccessible disposition 已依 S4.9 response template 由 owner 判定", "確認 token 不具 write 權限", "確認不保存 token value", "確認 export 不含 webhook secret / deploy key private key / repository secret value", "確認只更新 inventory snapshot" ], "allowed_pre_runtime_artifacts": [ - "owner coverage attestation update", + "owner coverage attestation response update", "redacted admin export sample", "read-only inventory command plan", "updated migration matrix draft", @@ -137,6 +138,7 @@ "rollback_or_disable_requirement": "read-only token 必須可撤銷;admin export 必須可刪除本地暫存原檔,只保留 redacted snapshot。", "still_forbidden": [ "未完成 S4.7 owner attestation 就執行 inventory", + "未完成 S4.9 owner response 驗收就執行 inventory", "使用 write-capable token", "建立 GitHub repo", "sync refs", diff --git a/docs/security/security-mirror-readiness.snapshot.json b/docs/security/security-mirror-readiness.snapshot.json index e385500f7..ec46e4f33 100644 --- a/docs/security/security-mirror-readiness.snapshot.json +++ b/docs/security/security-mirror-readiness.snapshot.json @@ -235,15 +235,17 @@ "docs/security/gitea-org-repo-inventory-blocked.snapshot.json", "docs/security/gitea-authenticated-inventory-export-request.snapshot.json", "docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json", - "docs/security/gitea-inventory-coverage-attestation.snapshot.json" + "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json" ], "human_docs": [ "docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md", "docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md", "docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md", - "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md" + "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", + "docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md" ], - "notes": "目前仍是 public-only / blocked endpoint evidence;S4.5 已補 authenticated/admin export request,S4.6 已補 redacted import acceptance,S4.7 已補 owner coverage attestation request;private/internal 全量需 approval、脫敏 payload 驗收與 owner scope decision。" + "notes": "目前仍是 public-only / blocked endpoint evidence;S4.5 已補 authenticated/admin export request,S4.6 已補 redacted import acceptance,S4.7 已補 owner coverage attestation request,S4.9 已補 owner response intake packet;private/internal 全量需 approval、脫敏 payload 驗收與 owner scope decision。" }, { "contract": "local_git_remote_inventory_v1", diff --git a/docs/security/security-mirror-status-rollup.snapshot.json b/docs/security/security-mirror-status-rollup.snapshot.json index fdb72b735..a993f40ea 100644 --- a/docs/security/security-mirror-status-rollup.snapshot.json +++ b/docs/security/security-mirror-status-rollup.snapshot.json @@ -22,6 +22,7 @@ "docs/security/gitea-authenticated-inventory-export-request.snapshot.json", "docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json", "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json", "docs/security/source-control-primary-readiness-gate.snapshot.json", "docs/security/source-control-primary-rollback-adr.snapshot.json", "docs/security/source-control-workflow-secret-name-inventory.snapshot.json", @@ -103,8 +104,8 @@ { "phase_id": "S4_migration_execution", "state": "not_started", - "current_result": "GitHub primary 是長期方向;source_control_primary_readiness_gate_v1 已定義 8 個 candidate repos、7 個 in-scope blocked repos、0 個 primary ready;S4.1 已定義 workflow / secret 名稱 inventory 契約;S4.2 已補 local evidence;S4.3 已補 redacted export request;S4.4 已補 rollback ADR 草案;S4.5 已補 Gitea authenticated inventory export request;S4.6 已補 redacted import acceptance;S4.7 已補 owner coverage attestation request,但 inventory status 仍 partial。", - "next_gate": "Gitea coverage attestation 被 owner 接受、authenticated inventory payload 通過 S4.6 驗收、refs truth、webhook / runner / deploy key / branch protection / repository secret parity redacted evidence、rollback ADR owner approval 與逐 repo 人工批准。" + "current_result": "GitHub primary 是長期方向;source_control_primary_readiness_gate_v1 已定義 8 個 candidate repos、7 個 in-scope blocked repos、0 個 primary ready;S4.1 已定義 workflow / secret 名稱 inventory 契約;S4.2 已補 local evidence;S4.3 已補 redacted export request;S4.4 已補 rollback ADR 草案;S4.5 已補 Gitea authenticated inventory export request;S4.6 已補 redacted import acceptance;S4.7 已補 owner coverage attestation request;S4.9 已補 owner response intake packet,但 inventory status 仍 partial。", + "next_gate": "依 S4.9 收到並驗收 S4.7 owner response、authenticated inventory payload 通過 S4.6 驗收、refs truth、webhook / runner / deploy key / branch protection / repository secret parity redacted evidence、rollback ADR owner approval 與逐 repo 人工批准。" } ], "next_safe_actions": [ @@ -197,6 +198,7 @@ "allowed_processing": [ "顯示 S4.5 authenticated/admin export request、S4.6 redacted import acceptance、S4.7 owner coverage attestation request 與 coverage gap", "顯示 5 個 owner attestation items、received_attestation_count=0 與 accepted_attestation_count=0", + "顯示 S4.9 owner response templates、received_response_count=0 與 rejection rules", "在 security_approval_queue_v1、security_approval_gate_v1、security_approval_review_packet_v1 與 security_followup_runtime_gate_v1 中顯示 S4.7 owner attestation 先行條件", "使用 read-only token 或 redacted admin export 補齊 repo list", "收到 payload 後只做 schema / redaction / coverage gap 驗收與隔離", @@ -207,6 +209,7 @@ "保存 token value", "使用 write-capable token", "未完成 S4.7 owner attestation 就標記 inventory complete", + "把 S4.9 owner response packet 當成 read-only inventory 已執行或 primary approval", "把 S4.7 owner attestation request 當成 repo migration approval", "把 S4.6 payload 驗收當成 primary approval", "建立 GitHub repo 或 sync refs" @@ -313,7 +316,8 @@ "S4.5 只新增 Gitea authenticated inventory export request;public_only_repo_count=2、local_gitea_unique_repo_count=4、export_source_option_count=2、token_value_collection_allowed=false,不使用 token、不寫入 Gitea、不 sync refs。", "S4.6 只新增 Gitea redacted import acceptance;received_payload_count=0、accepted_payload_count=0,不匯入 DB dump/git object、不寫 Gitea、不切 primary。", "S4.7 只新增 Gitea owner coverage attestation request;required_attestation_item_count=5、received_attestation_count=0,不把 attestation 當 migration approval。", - "S4.8 只把既有 Gitea approval queue/gate/review packet/follow-up gate 對齊 S4.7 先行條件;approval_queue_total 仍為 8、active_runtime_gates 仍為 0,不新增執行入口。" + "S4.8 只把既有 Gitea approval queue/gate/review packet/follow-up gate 對齊 S4.7 先行條件;approval_queue_total 仍為 8、active_runtime_gates 仍為 0,不新增執行入口。", + "S4.9 只新增 Gitea owner attestation response 收件包;required_response_item_count=5、received_response_count=0、accepted_response_count=0,不把 response packet 當 inventory 執行或 primary approval。" ], "forbidden_actions": [ "start_kali_scan", diff --git a/docs/security/security-supply-chain-contract-manifest.snapshot.json b/docs/security/security-supply-chain-contract-manifest.snapshot.json index 21f0e5cf7..54ec268a0 100644 --- a/docs/security/security-supply-chain-contract-manifest.snapshot.json +++ b/docs/security/security-supply-chain-contract-manifest.snapshot.json @@ -380,14 +380,16 @@ "docs/security/gitea-org-repo-inventory-blocked.snapshot.json", "docs/security/gitea-authenticated-inventory-export-request.snapshot.json", "docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json", - "docs/security/gitea-inventory-coverage-attestation.snapshot.json" + "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json" ], "human_docs": [ "docs/security/GITEA-SERVER-SIDE-INVENTORY-RUNBOOK.md", "docs/security/GITEA-READONLY-INVENTORY-APPROVAL-PACKAGE.md", "docs/security/GITEA-AUTHENTICATED-INVENTORY-EXPORT-REQUEST.md", "docs/security/GITEA-AUTHENTICATED-INVENTORY-IMPORT-ACCEPTANCE.md", - "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md" + "docs/security/GITEA-INVENTORY-COVERAGE-ATTESTATION.md", + "docs/security/GITEA-INVENTORY-OWNER-ATTESTATION-RESPONSE.md" ], "consumer": "AwoooP migration matrix evidence", "consumption_mode": "mirror_only", @@ -396,10 +398,11 @@ "create_readonly_inventory_approval_candidate", "display_authenticated_inventory_export_request", "display_redacted_inventory_import_acceptance", - "display_coverage_attestation_request" + "display_coverage_attestation_request", + "display_owner_attestation_response_packet" ], "forbidden_actions": ["store_token_value", "write_to_gitea", "delete_or_archive_repo"], - "notes": "目前是 partial/public_only;S4.5 已補 authenticated/admin export request,S4.6 已補 redacted import acceptance,S4.7 已補 owner coverage attestation request;private/internal 全量仍需批准後補齊。" + "notes": "目前是 partial/public_only;S4.5 已補 authenticated/admin export request,S4.6 已補 redacted import acceptance,S4.7 已補 owner coverage attestation request,S4.9 已補 owner response intake packet;private/internal 全量仍需批准後補齊。" }, { "contract": "local_git_remote_inventory_v1", diff --git a/docs/security/source-control-primary-readiness-gate.snapshot.json b/docs/security/source-control-primary-readiness-gate.snapshot.json index 124ec032b..1e3e71c1d 100644 --- a/docs/security/source-control-primary-readiness-gate.snapshot.json +++ b/docs/security/source-control-primary-readiness-gate.snapshot.json @@ -16,6 +16,7 @@ "docs/security/gitea-authenticated-inventory-export-request.snapshot.json", "docs/security/gitea-authenticated-inventory-import-acceptance.snapshot.json", "docs/security/gitea-inventory-coverage-attestation.snapshot.json", + "docs/security/gitea-inventory-owner-attestation-response.snapshot.json", "docs/security/gitea-org-repo-inventory-blocked.snapshot.json", "docs/security/security-followup-runtime-gate.snapshot.json" ], @@ -46,6 +47,7 @@ "S4.5 已建立 authenticated/admin export request,但尚未取得 `gitea_repo_inventory_v1.status=ok` evidence", "S4.6 已建立 redacted import acceptance,但目前 received_payload_count=0、accepted_payload_count=0", "S4.7 已建立 owner coverage attestation request,但目前 received_attestation_count=0、accepted_attestation_count=0", + "S4.9 已建立 owner response 收件包,但目前 received_response_count=0、accepted_response_count=0", "public-only API 只看到 2 個 repos,本機 remote inventory 看到 4 個 unique Gitea repos,gap 仍待 owner 解釋", "GITEA_READONLY_TOKEN 未提供", "不得使用 write-capable credential 當 read-only token" @@ -55,6 +57,7 @@ "mirror S4.5 authenticated inventory export request", "mirror S4.6 redacted inventory import acceptance", "mirror S4.7 owner coverage attestation request", + "mirror S4.9 owner attestation response templates", "等待 read-only token 或 redacted admin export", "更新 approval board 與 decision table" ],