本卡屬 FR-186(Agent 本體資安掃描第二輪),第 1 批 S4:8443 資料面與證據檔取送(Agent repo,13 檔/約 869 行)。只掃不修。工作坊用
.claude/workshop-prompts/dispatch-<本卡號>.md當開場 prompt 直接啟動掃描。
用 Claude Code 官方 claude-security plugin 掃 Guidant AI Agent(repo evidence-agent)的「8443 資料面與證據檔取送」,找出資安問題,寫成 PM 與新手工程師都看得懂的報告。只找問題、不修問題。
FR-177 掃過(舊卡 CM-3509, CM-3515),之後有改動;這次重掃要回答兩件事:上次修的有沒有守住、新改的程式有沒有新洞。 範圍按業務模組垂直切(入口→流程→資料),權限漏洞常在層與層的接縫上。
guidant_agent/sync/api/data_plane_server.py
guidant_agent/sync/api/data_plane_auth.py
guidant_agent/sync/api/cmd_config.py
guidant_agent/sync/api/cmd_credentials.py
guidant_agent/sync/api/cmd_restart.py
guidant_agent/sync/api/cmd_tasks.py
guidant_agent/sync/api/cmd_update.py
guidant_agent/shared/tls_server.py
guidant_agent/files/api/blob.py
guidant_agent/files/api/blob_route.py
guidant_agent/files/app/blob_ops.py
guidant_agent/files/app/evidence_files.py
guidant_agent/files/app/evidence_sha256.py
檔數 13、約 869 行。驗檔數:git ls-files -- guidant_agent/sync/api/data_plane_server.py guidant_agent/sync/api/data_plane_auth.py guidant_agent/sync/api/cmd_config.py guidant_agent/sync/api/cmd_credentials.py guidant_agent/sync/api/cmd_restart.py guidant_agent/sync/api/cmd_tasks.py guidant_agent/sync/api/cmd_update.py guidant_agent/shared/tls_server.py guidant_agent/files/api/blob.py guidant_agent/files/api/blob_route.py guidant_agent/files/app/blob_ops.py guidant_agent/files/app/evidence_files.py guidant_agent/files/app/evidence_sha256.py | grep -v /tests/ | wc -l 應為 13。scope 外的檔不要當發現報;為核對呼叫端翻範圍外的檔可以,報告標「只為查證」。
首腦標的思考起點,不是檢查清單。掃完後 runner 逐條對一遍:工具沒報的,開檔看一眼寫「人工查過:成立/不成立/為什麼」。FR-177 的人工補查抓到的問題不比工具少。(以下沿用 FR-177 舊卡的重點,行號是舊版、以檔名與函式名為準。)
data_plane_auth.py:46-47 _skips_jwt:公開路徑清單 _is_public 有哪些;LOCAL_OPS_PREFIX 加 loopback 判定用的是 request.remote_addr——跑在容器裡、前面有反向代理時 remote_addr 是不是永遠 127.0.0.1,等於整組維運端點對內網開放。data_plane_auth.py:79-92 守門是 before_request 掛上去的——哪些 blueprint 掛在同一個 app、有沒有後來才掛的 blueprint 漏在外面;mode 不是 full 時會變成什麼。agent_auth.py:221-238 verify_data_plane_jwt:audience/issuer/bound_fp 全部有驗嗎;token 沒有 exp 會不會過;重放(同一個 token 打兩次)擋不擋。cmd_*.py:各自收什麼參數、直接進哪支 app service。重點 cmd_credentials.py(改工具帳密,改完存哪)、cmd_config.py(能改哪些 key,能不能改到 allow_cidr 或 cloud_base_url 之類會改變信任邊界的設定)、cmd_restart.py(會不會被當 DoS)。cloud_trust.py:Agent 怎麼決定信任哪個主系統(CA pin、指紋);信任錨能不能被 8443 指令自己改掉(自己換自己的老闆)。task_queue.py:任務內容(含目標主機、帳密)進隊列前有沒有驗 schema;隊列落地檔的權限。data_plane_server.py:TLS 設定——最低版本、是否要求 client cert(mTLS)、ssl_context 哪裡建。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/都不要)。