本卡屬 FR-186(Agent 本體資安掃描第二輪),第 1 批 S3:長輪詢指令通道(FR-181 新程式)(Agent repo,11 檔/約 1065 行)。只掃不修。工作坊用
.claude/workshop-prompts/dispatch-<本卡號>.md當開場 prompt 直接啟動掃描。
用 Claude Code 官方 claude-security plugin 掃 Guidant AI Agent(repo evidence-agent)的「長輪詢指令通道(FR-181 新程式)」,找出資安問題,寫成 PM 與新手工程師都看得懂的報告。只找問題、不修問題。
這塊在 FR-177(掃 63334f4)之後才寫,從沒掃過。 範圍按業務模組垂直切(入口→流程→資料),權限漏洞常在層與層的接縫上。
guidant_agent/sync/app/command_pull.py
guidant_agent/sync/app/reply_sender.py
guidant_agent/sync/app/task_intake.py
guidant_agent/sync/ports/command_handler.py
guidant_agent/files/api/commands.py
guidant_agent/scan/api/commands.py
guidant_agent/sync/app/log_query.py
guidant_agent/platform/query_args.py
guidant_agent/sync/api/cmd_logs.py
guidant_agent/sync/app/task_queue.py
guidant_agent/sync/__init__.py
檔數 11、約 1065 行。驗檔數:git ls-files -- guidant_agent/sync/app/command_pull.py guidant_agent/sync/app/reply_sender.py guidant_agent/sync/app/task_intake.py guidant_agent/sync/ports/command_handler.py guidant_agent/files/api/commands.py guidant_agent/scan/api/commands.py guidant_agent/sync/app/log_query.py guidant_agent/platform/query_args.py guidant_agent/sync/api/cmd_logs.py guidant_agent/sync/app/task_queue.py guidant_agent/sync/__init__.py | grep -v /tests/ | wc -l 應為 11。scope 外的檔不要當發現報;為核對呼叫端翻範圍外的檔可以,報告標「只為查證」。
首腦標的思考起點,不是檢查清單。掃完後 runner 逐條對一遍:工具沒報的,開檔看一眼寫「人工查過:成立/不成立/為什麼」。FR-177 的人工補查抓到的問題不比工具少。
command_pull.py 分派:未知 kind、形狀不合只跳過——_handlers.get(kind) or _not_wired,主系統送來的 payload 是外部輸入,每個 handler 有沒有驗型別files/api/commands.py 取檔/送檔/刪檔:uid 只收 UUID 形狀——刪檔有沒有檢查歸屬、send_file 的暫存路徑清理、Answer.cleanup 出錯會不會殘留證據檔scan/api/commands.py credentials_set/probe:payload 帶明文帳密,CommandFailed reason 會不會帶出值;probe 能不能被主系統拿來連任意位址(主系統被打穿時的放大效果)log_query.py/query_args.py:日誌查詢參數的上限(size、時間範圍)——一次撈全部會不會吃光記憶體;回傳 message 是寫表時遮過的,確認沒有未遮的欄位json.dumps(payload)、_remember 的容量上限——長輪詢回大量指令時記憶體有沒有上限;reply_sender 補送 outbox 的排序FR-177 25 棒報告在 Agent repo docs/security-scan/FR-177/scan-*.md,已登記的 22 條在主系統 repo docs/features/security-scan-consolidated/README.md §3.1 第 219~240 項(全部已修)。已修而且修法成立的不重報;修法不完整、或同一族換個欄位又出現,才報並註明對應項次。
掃描由工作坊開場 prompt 自動啟動,你開始時掃描已在跑。
/workflows 記下 run ID。不掛監看、不輪詢;掃描 30~120 分鐘,工具跑完自己會回。