本卡屬 FR-187(母卡 CM-3711),第 1 批 A1:長輪詢通道(主系統端)(主系統 repo compliance-manager-be,8 檔/約 1000 行)。只掃不修。工作坊會用 .claude/workshop-prompts/dispatch-<本卡號>.md 當開場 prompt 直接啟動掃描,小弟不必自己打指令。

這一棒在做什麼(白話)

用 Claude Code 官方 claude-security plugin 掃「長輪詢通道(主系統端)」這一塊,找出資安問題,寫成 PM 與新手工程師都看得懂的報告。只找問題、不修問題,修是另外開卡的事。

FR-181 把「主系統連進 Agent」改成「Agent 吊一條連線等主系統派事」。這一棒看主系統這一頭:主系統怎麼把要 Agent 做的事寫進 agent_requests、怎麼敲鈴叫醒吊著的那條連線、Agent 回答(含回傳檔案)怎麼收下來。

為什麼切這一塊

這是全新的通道,所有主系統對 Agent 的指令(派工、查日誌、取證據檔、換證)都會走這裡。回答收錯台,就是 A 客戶的 Agent 能改 B 客戶的結果;暫存檔沒上限,一台被控的 Agent 就能塞爆主系統磁碟。套件那一頭(端點本身、持有證明)在 J1,兩棒的接縫首腦驗收時會串起來看。

背景:這一輪掃的是 2026-11-01(FR-172 開案)到 11-09 之間主專案與 jedi-remote-agent 新寫或大改的程式(FR-171/172/178/179/180/181/182),這些程式都沒掃過。

掃描範圍(scope,與開場 prompt 的 --scope 一致)

core/plugins/_agent_channel.py
core/plugins/_agent_commands.py
app/remote_agent/service/agent_request_service.py
infra/remote_agent/redis_command_waiter.py
infra/remote_agent/file_spool.py
domain/remote_agent/service/agent_request_domain_service.py
infra/remote_agent/repository/agent_request_repo_impl.py
infra/remote_agent/model/agent_request.py

檔數 8、約 1000 行。驗檔數:git -C <工作目錄> ls-files -- core/plugins/_agent_channel.py core/plugins/_agent_commands.py app/remote_agent/service/agent_request_service.py infra/remote_agent/redis_command_waiter.py infra/remote_agent/file_spool.py domain/remote_agent/service/agent_request_domain_service.py infra/remote_agent/repository/agent_request_repo_impl.py infra/remote_agent/model/agent_request.py | wc -l 應為 8。scope 外的檔不要讀,除非下面「重點看什麼」明寫「只追這幾行」;越界的發現首腦驗收時會挑掉。

重點看什麼

首腦讀過程式碼後認為最容易出事的地方,是思考起點不是檢查清單,行號以 2026-11-09 的主線為準,對不上就以內容為準。工具不會照這份走,掃完後你要自己逐條對一遍:工具沒報的,開檔看一眼,寫「人工查過:成立/不成立/為什麼」。

已知背景