Files
awoooi/docs/security/AGENT-BOUNTY-IWOOOS-ONBOARDING-HANDOFF.md
Your Name 8e7136dddb
All checks were successful
CD Pipeline / tests (push) Successful in 2m9s
Code Review / ai-code-review (push) Successful in 15s
CD Pipeline / build-and-deploy (push) Successful in 6m56s
CD Pipeline / post-deploy-checks (push) Successful in 3m6s
feat(security): 納入 Agent Bounty 只讀資安範圍
2026-06-11 09:41:09 +08:00

149 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# agent-bounty-protocol 納入 IwoooS 只讀 Handoff
| 項目 | 內容 |
|------|------|
| 日期 | 2026-06-11 |
| 狀態 | 草案,等待 owner review |
| 產品 | `agent-bounty-protocol` |
| Schema | `docs/schemas/agent_bounty_iwooos_onboarding_handoff_v1.schema.json` |
| Snapshot | `docs/security/agent-bounty-iwooos-onboarding-handoff.snapshot.json` |
| 上游證據 | `docs/security/iwooos-posture-projection.snapshot.json``apps/web/src/app/[locale]/iwooos/page.tsx``/Users/ogt/Documents/agent-bounty-protocol/README.md``package.json``apps/web/package.json``packages/mcp-server/package.json``docker-compose.yml` |
| 模式 | `product_scope_handoff_only` |
| 執行面授權 | `false` |
## 0. 核心結論
`agent-bounty-protocol` 已被納入 IwoooS 的只讀資安驗證與控管範圍。這只代表 IwoooS 可以呈現產品範圍、surface、owner response 欄位、證據缺口與禁止動作;它不是產品合併、不是 production deploy 批准、不是外部 agent 自主行為批准、不是金流 / payout 批准也不是掃描、修復、claim、submit、cron、daemon 或 runtime execution 授權。
本階段依照 IwoooS 初期原則只建立低摩擦框架與只讀證據。owner response、資料分級、版本來源真相、部署邊界、外部 agent 邊界與財務 / settlement 邊界都仍未驗收。
## 1. 已讀到的只讀 evidence
| 類別 | evidence | 判讀 |
|------|----------|------|
| 產品定位 | `/Users/ogt/Documents/agent-bounty-protocol/README.md` | M2M 交易閘道器,含 Next.js dashboard 與 MCP Server |
| 公開網域 | `README.md` | 對外服務候選為 `https://agent.wooo.work`,本段未做 production smoke |
| 技術棧 | `package.json``apps/web/package.json``packages/mcp-server/package.json``packages/contracts/package.json` | Next.js 16、React 19、TypeScript、Prisma、PostgreSQL、Redis、MCP SDK、外部 agent / webhook / Stripe / Telegram / Discord / GitHub 類整合候選 |
| Compose | `docker-compose.yml` | 本機 evidence 顯示 Postgres、Redis、web、agent 服務;`.env` 類檔案存在但本段未讀取 |
| 路由面 | `apps/web/src/app/**` 檔名清冊 | 含 public task、admin、traffic、treasury、MCP、A2A、cron、webhook、health、scout 等 surface |
| Repo refs | `git status` / `git rev-parse` 只讀查詢 | `HEAD / origin/main / main` 皆為 `a1856d08bc2778f9b41076cd6175ff2389b2e5ca`,但工作樹有 51 個修改或未追蹤項目,不能當成已驗收 canonical release |
| IwoooS 前端 | `apps/web/src/app/[locale]/iwooos/page.tsx` | 已新增只讀收件卡與矩陣投影runtime gate 仍為 `0` |
## 2. Scope 摘要
| 指標 | 值 |
|------|----|
| onboarding handoff package | `ready` |
| package completion | `100%` |
| product boundary merged into AWOOOI | `false` |
| owner response received / accepted | `false / false` |
| repo refs truth accepted | `false` |
| data classification accepted | `false` |
| deployment boundary accepted | `false` |
| external agent boundary accepted | `false` |
| runtime gate open | `false` |
| production deploy authorized | `false` |
| auto claim / submit authorized | `false / false` |
| bounty payout / withdrawal authorized | `false / false` |
| repo creation / refs sync / workflow modification authorized | `false / false / false` |
## 3. Repo / Refs Handoff
| 類型 | 路徑 / remote | 只讀判讀 | 不可誤讀 |
|------|---------------|----------|----------|
| active workspace | `/Users/ogt/Documents/agent-bounty-protocol` | branch `main`,但有 51 個 modified / untracked items且存在 `.env` 類檔案未讀取 | 不可自動 commit、rebase、push、刪檔、同步 refs、讀 env 或跑部署腳本 |
| reference refs | `HEAD = origin/main = main = a1856d08bc2778f9b41076cd6175ff2389b2e5ca` | refs 目前同 SHA但 dirty workspace 仍需 owner 判定 WIP vs release candidate | 不可把 local dirty workspace 當成 production truth |
| Gitea remote | `http://192.168.0.110:3001/wooo/agent-bounty-protocol.git` | 內部 Gitea remote 候選 | 不收 token、不改 remote、不 push、不切 GitHub primary |
後續 owner response 必須回答:
1. canonical repo path / remote 以哪個為準。
2. 51 個 dirty / untracked items 中哪些是 WIP哪些是 release candidate。
3. GitHub target metadata 是否需要納入;若需要,也只收 target metadata不建立 repo。
4. workflow、runner、webhook、deploy key、branch protection、CODEOWNERS 與 secret name parity 的 owner。
5. production host、compose directory、domain、TLS 與 smoke owner。
6. MCP / A2A / external agent 自主行為邊界 owner。
7. treasury / staking / settlement / Stripe / payout / withdrawal owner。
## 4. Product / Surface Handoff
| Surface | 路由 | 邊界 |
|---------|------|------|
| public task / marketplace | `/``/tasks/[id]``/tasks/create``/showcase``/leaderboard``/explorer``/traffic``/ico` | 只列公開與 marketplace surface不代表 bounty payout 或外部 claim / submit 可執行 |
| well-known metadata | `/.well-known/agent-card.json``/.well-known/ai-plugin.json``/.well-known/mcp.json``/.well-known/openapi.yaml` | metadata 可作 route evidence不授權 agent execution 或 credential 曝露 |
| MCP / open task API | `/api/mcp/[tool]``/api/mcp/create_human_task``/api/mcp/submit_bid``/api/open-tasks` | MCP tool gateway 需 owner response、auth boundary 與 abuse control本段只讀 |
| A2A protocol | `/api/a2a/*` | negotiation、settlement、staking、dispute 等路徑全部鎖到 owner review 與後續 runtime gate 之後 |
| cron / automation | `/api/cron/*` | 不啟用 schedule、不跑 daemon、不 claim、不 submit、不 self-replicate、不外送訊息 |
| admin / treasury | `/admin``/admin/traffic``/admin/treasury``/api/admin/*``/login` | 需 RBAC / auth / financial owner responseIwoooS 只列 scope |
| webhook / scout / traffic | `/api/traffic``/api/webhooks/github``/api/webhooks/stripe``/api/scout/*``/api/intents/stream``/api/v1/health` | 只收 redacted metadata不收 webhook secret、auth header 或 raw payload body |
## 5. Owner Response Handoff
此 handoff 只讓 AwoooP 或 reviewer 請 owner 補 `agent-bounty-protocol` metadata。它不是 request sent、不是 approval queue也不是可執行動作。
### 5.1 必填欄位
| 欄位 | 說明 |
|------|------|
| `product_owner_role_or_team` | agent-bounty-protocol 產品 owner 或 team |
| `security_owner_role_or_team` | 資安 / abuse / 資料保護 owner |
| `source_control_owner_role_or_team` | repo / refs / workflow / secret name owner |
| `deployment_owner_role_or_team` | Docker Compose / domain / TLS / smoke owner |
| `data_classification_owner_role_or_team` | task、agent、webhook、traffic、treasury、admin 資料分級 owner |
| `external_agent_boundary_owner_role_or_team` | MCP / A2A / Nostr / Waku / XMTP / cron / daemon owner |
| `settlement_or_treasury_owner_role_or_team` | staking、withdrawal、payout、Stripe / wallet 類風險 owner |
| `notification_owner_role_or_team` | Telegram、Discord、GitHub webhook / issue comment owner |
| `surface_scope` | 本次納入 IwoooS 的 route、API、admin、cron、worker、webhook 範圍 |
| `decision` | 允許值:`confirm_observe_only``defer``reject``request_more_evidence` |
| `decision_reason` | 決策理由摘要,不得貼 raw secret、token、cookie、session、wallet key 或未脫敏 payload |
| `redacted_evidence_refs` | 只填文件、snapshot、ticket、commit、hash 或脫敏 metadata pointer |
| `followup_owner` | 補件、拒收或下一階段 owner |
### 5.2 禁止輸入
| 類型 | 規則 |
|------|------|
| credential | 不貼 `.env`、DB URL、API key、MCP key、E2B key、Telegram token、Discord webhook、GitHub token、Stripe secret、wallet private key、seed phrase、cookie、session、auth header |
| raw payload | 不貼 webhook body、traffic body、agent prompt、agent transcript、task raw solution、unpublished code、admin account data |
| source-control action | 不要求建立 repo、同步 refs、rebase、push、改 workflow、改 runner、改 secret |
| production action | 不要求 deploy、restart、compose up/down、DB migration、cron enable、daemon start、traffic send |
| external agent action | 不要求 `AUTO_CLAIM``AUTO_SUBMIT``RUN_DAEMON`、MCP claim / submit、A2A dispatcher、自我複製、外部送訊 |
| settlement action | 不要求 payout、withdrawal、staking、Stripe webhook secret 變更或 wallet 操作 |
## 6. 獨立產品邊界
`agent-bounty-protocol` 可以納入 IwoooS 的全產品資安視野,但第一階段仍必須維持獨立產品邊界:
1. 不共用 AWOOOI 或其他產品資料庫。
2. 不共用 AWOOOI 會員 Session。
3. 不把 agent-bounty-protocol RBAC 綁到 AWOOOI 權限模型。
4. 不讓 agent-bounty-protocol 核心流程依賴 AWOOOI runtime 可用性。
5. 不把 AwoooP approval 當 agent-bounty-protocol 資安批准、部署批准、agent 行為批准或 payout 批准。
6. 不把 AwoooP work item 直接轉成 external agent claim / submit。
7. 後續整合只能走版本化 API、Webhook、outbox、匯入匯出配接器、SSO / OAuth 或 Anti-Corruption Layer。
## 7. 資料分級收件
| 資料類型 | 初期分級狀態 | 收件規則 |
|----------|--------------|----------|
| task / bounty / solution metadata | waiting owner classification | 只收欄位類型、狀態與脫敏摘要,不收 private task、raw solution 或 unpublished code |
| agent identity / reputation / negotiation state | waiting owner classification | 只收 agent 類型、狀態轉移與 owner 判讀,不收 prompt、transcript、private key 或 token |
| MCP tool calls / A2A protocol events | waiting owner classification | 只收 route、tool name、decision metadata不收 request body、credential、payload 或 generated secret |
| webhook / traffic / scout evidence | waiting owner classification | 只收 source type、timestamp、redacted status不收 webhook secret、auth header 或 raw payload body |
| settlement / staking / treasury / Stripe | waiting owner classification | 只收 capability 與 owner metadata不收 wallet private key、seed phrase、Stripe secret 或 payout instruction |
| admin / login / traffic dashboard | waiting owner classification | 只收角色邊界與 audit event type不收 password、session、cookie 或 private user data |
| cron / daemon / ecosystem hunter | waiting owner classification | 只收 schedule name、disabled/enabled intent 與 redacted endpoint refs不啟動 daemon、claim、submit 或 external send |
## 8. 驗收規則
1. 本 handoff 完成不代表 `agent-bounty-protocol` owner response 已收到或 accepted。
2. 納入 IwoooS 只代表全產品資安視野可見不代表掃描、部署、修復、claim、submit、payout、withdraw、cron 或 runtime execution。
3. canonical repo、refs truth、workflow / secret name、GitHub target、compose host 與 production URL 仍需 owner response。
4. 正式 URL、Docker Compose、health endpoint、MCP metadata 或 A2A routes 可見,不等於本段已做 production verification。
5. 任何 `.env`、secret、DB URL、token、private key、seed phrase、cookie、session、auth header、webhook secret 都必須拒收或隔離。
6. 未來若要改 production、deploy、compose、DB migration、cron、daemon、domain、TLS、MCP tool behavior 或 A2A automation必須另開 owner approval 與 rollback / post-check。
## 9. 階段定位
本段只把 `agent-bounty-protocol` 從「新專案尚未在 IwoooS 可見」推到「owner / reviewer 可照表審 repo、product、surface、owner、data classification、deployment boundary、external agent boundary、treasury boundary 與 evidence refs」。它不改 `agent-bounty-protocol` repo、不部署、不掃描、不讀 `.env`、不開 runtime gate也不提高 IwoooS headline 64%。