
GitHub 在 2026 年 6 月 9 日宣布,Security validation for third-party coding agents 正式 generally available。這項更新把原本用於 GitHub Copilot cloud agent 的自動安全檢查,擴展到可在 repository 內工作的第三方 coding agents,包括 Claude 和 OpenAI Codex。
這個更新的背景很清楚:AI coding agent 不再只是本地工具或 IDE sidebar。越來越多 agent 可以直接在 repo 裏實作功能、修 bug、補測試,甚至建立 pull request。當 agent 真的會改 code,安全檢查就不能只靠最後人工 review 才開始。
GitHub 說,當第三方 coding agent 在 repository 內產生程式碼時,系統會自動用 CodeQL 分析潛在安全漏洞,檢查新引入的 dependencies 是否命中 GitHub Advisory Database,並用 GitHub secret scanning 偵測 API keys、tokens 等敏感資訊。如果分析發現問題,agent 會嘗試在 finalizing pull request 前修復。
這裏的意義不是「agent 寫 code 就一定安全」,而是把安全 validation 放進 agent workflow 本身。過去 AI 生成的程式碼很容易跳過一些平時 CI 才會發現的問題,例如不安全 pattern、脆弱 dependency、誤放 secret。現在 GitHub 把這些檢查提前到 agent 產生 PR 的路徑中。
GitHub 亦提到,自 2025 年 10 月推出 Copilot cloud agent automatic code validation 以來,已主動阻止數百個潛在 security leaks 和 vulnerabilities。今次擴展至第三方 agents,代表 GitHub 不希望安全邊界只適用於自家 agent,而是希望同一 repo 內所有 agent-generated code 都受同一套檢查。
另一個實際重點,是 security validations 預設開啟,並跟隨 repository 的 Copilot settings 決定使用哪些 validation tools。已啟用 Copilot cloud agent security validation 的 repo,第三方 agents 會自動得到同樣保護;GitHub 亦說這不需要 GitHub Advanced Security license。
對開發團隊來說,這是 agent adoption 的必要基礎設施。AI agent 可以提升速度,但速度愈快,越需要在 PR 前自動攔截已知漏洞、脆弱套件和硬編碼憑證。否則 agent 只會把安全債務用更快速度帶入 codebase。
這次 GitHub 更新的核心訊號,是 AI coding agent 正由「生產工具」變成「受治理的工程參與者」。企業未來選 agent,不只看模型能力和 IDE 體驗,還要看它進入 repo 後能否配合既有安全掃描、PR policy、review 流程和審計紀錄。



