portal-auth P3 測試:21 項(HTML 零租戶字串/enforce 繞不過/越庫 404/graph 粗閘/workflows 唯讀)
- portal-data.test.ts:/portal HTML 殼機械斷言(無 'leo'/X-Arcrun-API-Key//kbdb//Mira); search 注入證明(caller 帶 library=hr&owner_id=evil 被靜默覆蓋);entries/:id 越庫/ 跨租戶/不存在同一句 404+NULL→general;graph 403 不打 plugin/放行轉發/disabled 來源排除;workflows 非 admin 403、admin 唯讀無 webhook_url、workflowsVisible 單元 - portal-auth.test.ts session 測試補 P3 能力欄位(graph_allowed/workflows_visible) - wrangler.test.toml 補 ANALYTICS_KV mock+KBDB_GRAPH_URL 假 host(絕不外連) - cypher 154/155(唯一失敗=executor 不存在零件 pre-existing,git stash 複驗); kbdb 20/20;兩包 tsc exit 0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,11 @@ id = "test-recipes"
|
||||
binding = "SESSIONS_KV"
|
||||
id = "test-sessions-kv"
|
||||
|
||||
# portal-auth P3:/portal/data/workflows 讀最近執行(stats:{name}:{ts})
|
||||
[[kv_namespaces]]
|
||||
binding = "ANALYTICS_KV"
|
||||
id = "test-analytics-kv"
|
||||
|
||||
# credential-store-migration T8/T9 測試用 D1 mock(Miniflare 本地 SQLite,非真實 leo21c D1;
|
||||
# schema 由 tests/setup.ts 在測試啟動時建表,不用 migrations_dir——0002_credentials.sql 就一張表,
|
||||
# 直接 exec 比接 migrations 機制簡單)
|
||||
@@ -43,3 +48,5 @@ ENCRYPTION_KEY = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd
|
||||
# 分流台勾掉 route 測試:KBDB 指到假 host(fetchMock 攔截,絕不外連——尤其不打官方 uncle6 fallback)
|
||||
KBDB_BASE_URL = "https://kbdb.test"
|
||||
CONSOLE_TENANT = "leo"
|
||||
# portal-auth P3:graph 粗閘放行後的轉發目標也指假 host(fetchMock 攔截,絕不外連)
|
||||
KBDB_GRAPH_URL = "https://graph.test"
|
||||
|
||||
Reference in New Issue
Block a user