@@ -755,21 +755,82 @@ graph TD
755755| ------| ------| ------|
756756| Phase 0 | Monorepo + Crypto + API 骨架 | DONE |
757757| Phase 1 | Vault CRUD + Generator + Search + Audit | DONE |
758- | Phase 2 | Agent CRUD + OAuth + Import | DONE |
759- | Phase 3 | MCP Gateway + Extension | DONE |
760- | Phase 4 | 2FA + Sessions + Rate Limiting | DONE |
761- | UX Round 1 | 12/12 UI/UX fixes | DONE |
762- | UX Round 2 | 7/7 Journey simulation PASS | DONE |
763- | Phase 5 | BIP-39 Seed Phrase + HD Key Derivation + Deterministic Passwords | PLANNED |
758+ | Phase 2 | Agent CRUD + OAuth + Import (13 格式) | DONE |
759+ | Phase 3 | MCP Gateway + Extension (Chrome MV3) | DONE |
760+ | Phase 4 | 2FA (TOTP) + Sessions + Rate Limiting | DONE |
761+ | UX Round 1-2 | 12/12 fixes + 7/7 Journey PASS | DONE |
762+ | Round 3 | 20/20 real API endpoints tested (no mock) | DONE |
763+ | Round 4-7 | 50 security/performance optimizations | DONE |
764+ | Phase 5 | BIP-39 Seed + HD Key Derivation (packages/crypto/seed.ts) | DONE |
765+ | Phase 7 | Arweave Permanent Storage (arweave-vault.ts) | DONE (client lib) |
766+ | Round 8 | Fixed-window rate limiter + Arweave E2E tests | DONE |
767+ | Round 9 | Go middleware test suite (19 tests) | DONE |
768+ | Round 10 | Full-stack SRP E2E rewrite (53 tests, real crypto) | DONE |
769+ | Phase 10 | AI 基建凭据目录 (70+ providers / 15 categories) | DONE |
770+ | Phase 11 | .env 导入 + API Keys 页面 + 健康检查 (20 providers) | DONE |
771+ | Round 11 | UX Map 全量模拟测试 (8/8 journeys, 52/52 验证点) | DONE |
772+ | Round 12 | 蜂群安全审计 (9/9 findings FIXED) | DONE |
773+ | Round 13 | 蜂群性能审计 (8/8 quick wins FIXED) | DONE |
764774| Phase 6 | Ed25519 Auth + Passkeys (WebAuthn) | PLANNED |
765- | Phase 7 | Arweave Permanent Storage + IPFS Backup | PLANNED |
766775| Phase 8 | Bitcoin Hash Anchoring + Fact Chain | PLANNED |
767- | Phase 9 | Five Primitives Policy Engine | PLANNED |
768-
769- ## 13. 系统边界
770-
771- - ** In-scope** : 密码管理、种子词主权、确定性密码、OAuth 连接管理、AI Agent 凭据网关(五原语)、永久去中心化存储、审计日志(哈希链 + Bitcoin 锚定)
772- - ** Out-of-scope** : 企业级 IAM、通用 API 网关、联邦身份、加密货币钱包功能
776+ | Phase 9 | Five Primitives Policy Engine (full) | PLANNED |
777+
778+ ### 测试覆盖
779+
780+ | 层 | 数量 | 覆盖内容 |
781+ | ----| ------| ----------|
782+ | Go unit | 25 | SRP (6) + rate limiter (8) + security middleware (11) |
783+ | TS crypto | 53 | AES-GCM (22) + BIP-39/HD (21) + Arweave vault (10) |
784+ | E2E API | 53 | Real SRP login + vault/agent/audit/session CRUD + security headers |
785+ | ** Total** | ** 131** | ** ALL PASS** |
786+
787+ ### 安全加固 (2026-03-21 蜂群审计)
788+
789+ | 修复 | 级别 |
790+ | ------| ------|
791+ | TOTP 绕过 SRP 门卫 (srpVerified flag) | HIGH |
792+ | TOTP 时序攻击 (subtle.ConstantTimeCompare) | MEDIUM |
793+ | Session TTL 外化 (AUTH_BOX_SESSION_TTL_HOURS) | MEDIUM |
794+ | Logout 跨会话防护 (DeleteByTokenHashAndUser) | MEDIUM |
795+ | Production CORS 误配检测 | MEDIUM |
796+ | AES-GCM nonce/tag 长度校验 | LOW |
797+ | Per-email rate limit (3/5min) | MEDIUM |
798+ | Session activity tracking (TouchSession) | MEDIUM |
799+ | Audit chain 分页 (LIMIT 10K) | LOW |
800+
801+ ### 性能优化 (2026-03-21)
802+
803+ | 优化 | 效果 |
804+ | ------| ------|
805+ | 5 composite indexes (user_id, created_at DESC) | 20x query speedup |
806+ | ListAgents/Connections LIMIT 200 | 防无界查询 OOM |
807+ | Extension vault cache 10K cap | 防内存溢出 |
808+ | Extension parallel fetch (Promise.all) | Unlock ~ 40% faster |
809+ | .dockerignore | ~ 35% smaller image |
810+
811+ ## 13. AI 基建凭据目录
812+
813+ Auth Box 不仅管理密码,还是 ** AI Agent 基建凭据中枢** :
814+
815+ | 分类 | Providers | 代表 |
816+ | ------| -----------| ------|
817+ | LLM | 15 | OpenAI, Anthropic, Google AI, xAI, DeepSeek, Qwen, Mistral... |
818+ | Image/Video | 10 | Stability, Replicate, RunwayML, HeyGen, ElevenLabs, Kling... |
819+ | Embedding/Vector | 7 | Pinecone, Weaviate, Qdrant, Voyage, Jina... |
820+ | Search/Web | 7 | Brave, SerpAPI, Tavily, Exa, Perplexity... |
821+ | Cloud | 9 | AWS, GCP, Azure, Cloudflare, Vercel, Railway... |
822+ | Code/Dev | 7 | GitHub, GitLab, Supabase, Neon, Turso, Upstash... |
823+ | Communication | 7 | Telegram, Discord, Slack, SendGrid, Twilio... |
824+ | Observability | 8 | Sentry, Datadog, Helicone, LangSmith, Langfuse... |
825+ | Other | 18 | Payment, Auth, Storage, Analytics, Workflow, Container... |
826+
827+ ** 导入方式** : 拖拽 .env 文件 → 100+ env var 模式自动分类 → 勾选 → 批量加密入库
828+ ** 健康检查** : 20 个 provider 一键验证 Key 有效性 (valid/invalid/expired/quota_exceeded)
829+
830+ ## 14. 系统边界
831+
832+ - ** In-scope** : 密码管理、种子词主权、AI 基建凭据中枢(70+ providers)、OAuth 连接管理、AI Agent 凭据网关(MCP + 五原语)、永久去中心化存储(Arweave)、审计日志(哈希链)、.env 自动导入
833+ - ** Out-of-scope** : 企业级 IAM、通用 API 网关、联邦身份、加密货币钱包功能、Bitcoin 锚定(Phase 8)
773834
774835---
775836
0 commit comments