本卡屬 FR-186(Agent 本體資安掃描第二輪),第 2 批 F1:瀏覽器直傳 8444、儲存設定與檔案保護(Agent repo,11 檔/約 996 行)。只掃不修。工作坊用
.claude/workshop-prompts/dispatch-<本卡號>.md當開場 prompt 直接啟動掃描。
用 Claude Code 官方 claude-security plugin 掃 Guidant AI Agent(repo evidence-agent)的「瀏覽器直傳 8444、儲存設定與檔案保護」,找出資安問題,寫成 PM 與新手工程師都看得懂的報告。只找問題、不修問題。
FR-177 掃過(舊卡 CM-3515),之後有改動;這次重掃要回答兩件事:上次修的有沒有守住、新改的程式有沒有新洞。 範圍按業務模組垂直切(入口→流程→資料),權限漏洞常在層與層的接縫上。
guidant_agent/files/api/browser_plane.py
guidant_agent/files/app/storage_settings.py
guidant_agent/files/app/storage_stats.py
guidant_agent/files/app/storage_trust.py
guidant_agent/files/app/file_protect.py
guidant_agent/files/app/setup_cert.py
guidant_agent/files/app/ports.py
guidant_agent/files/__init__.py
guidant_agent/files/adapters/customer_files_repo.py
guidant_agent/files/migrations.py
guidant_agent/files/ports/evidence_store.py
檔數 11、約 996 行。驗檔數:git ls-files -- guidant_agent/files/api/browser_plane.py guidant_agent/files/app/storage_settings.py guidant_agent/files/app/storage_stats.py guidant_agent/files/app/storage_trust.py guidant_agent/files/app/file_protect.py guidant_agent/files/app/setup_cert.py guidant_agent/files/app/ports.py guidant_agent/files/__init__.py guidant_agent/files/adapters/customer_files_repo.py guidant_agent/files/migrations.py guidant_agent/files/ports/evidence_store.py | grep -v /tests/ | wc -l 應為 11。scope 外的檔不要當發現報;為核對呼叫端翻範圍外的檔可以,報告標「只為查證」。
首腦標的思考起點,不是檢查清單。掃完後 runner 逐條對一遍:工具沒報的,開檔看一眼寫「人工查過:成立/不成立/為什麼」。FR-177 的人工補查抓到的問題不比工具少。(以下沿用 FR-177 舊卡的重點,行號是舊版、以檔名與函式名為準。)
browser_plane.py:106-120 _verify_ticket:票券綁 agent_uid+scan_uid,重放靠 TicketReplayGuard(:134)——guard 是記憶體的嗎(重啟就忘、多 worker 不共享);票券 exp 多長;:145 CORS origin 從票券 claims 來,沒有時退回 request.headers.get("Origin")——這條退路等於任何 origin。browser_plane.py:69-72 secure_filename 處理檔名與副檔名後,實際落地路徑怎麼拼;:83-103 串流算 sha256 與 max_bytes 上限——超過時已寫入的部分有沒有清掉;content-type 有沒有白名單(HTML/SVG 上傳後被主控台當頁面開就是 XSS)。blob_route.py:96/:143/:149 三處 send_file:uid 怎麼對到路徑(有沒有 ..);:143 把檔案轉 PDF 預覽——轉檔器是什麼、吃的是任意上傳內容嗎;下載端點要什麼身分(主系統 JWT/主控台 session/都不要)。storage_settings.py:S3/MinIO 的 access key 存哪、回傳設定給主控台時遮不遮;endpoint 能不能設成 http 或內網任意位址(SSRF+金鑰外送);storage_trust.py 的 CA 設定能不能關掉驗證。file_protect.py:66 下載加密密碼只驗非空與 ≤128——用的加密是 zip 傳統加密(ZipCrypto,可破)還是 AES;密碼從哪來(使用者輸入?隨機產生?);:47/:59 稽核事件記了 file_name——有沒有連密碼一起記進 log。files/__init__.py 與 app/ports.py:8444 掛了哪些 blueprint——除了直傳與主控台,有沒有 blob 下載也掛在 8444 上但只靠 CIDR 白名單不驗身分。customer_files_repo.py、migrations.py:SQL 有沒有拼字串;檔案列表查詢有沒有依 scan/tenant 過濾。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 項(全部已修)。已修而且修法成立的不重報;修法不完整、或同一族換個欄位又出現,才報並註明對應項次。