繁體中文

分診積壓

對已有安全發現做只讀靜態分析,判斷哪些需要行動或進一步審查。

使用 $codex-security:triage-finding 可以針對當前儲存庫審查已有安全發現。這個工作流程執行只讀靜態分析:Codex 會把每個發現當作尚未證明的聲稱(claim),在不執行程式碼的情況下檢查儲存庫證據。

請在作用域指向目標儲存庫的 Codex project 中執行這個工作流程。Codex 必須能夠讀取儲存庫原始碼。Jira 與 Linear 連接器可以提供安全發現數據;GitHub 安全發現則需要經過認證的 GitHub REST 存取。這些方式都不能替代原始碼存取。

在底層,Codex 會從引用的程式碼或版本資訊開始,追蹤聲稱的攻擊者可控來源、相關安全控制、危險匯點(sink)和可達路徑。它還會檢查產品功能面和信任邊界,尋找相互矛盾的證據,並記錄證據缺口。隨後,Codex 會為每個發現返回一個結論(verdict),並對需要行動或進一步審查的發現排序。

這不同於 $codex-security:validation。後者可以建置或執行程式碼、建立聚焦測試或 proof of concept,或操作真實介面來復現或反駁發現。使用分診對已有待處理列表做分類和優先順序排序;當執行時證據可以解決靜態證據留下的不確定性時,再使用 validation。

選擇要分診的發現

你可以提供單個發現,也可以從以下來源提供一組發現:

來源 需要提供什麼 要求
貼上或本機發現 SARIF 結果、CVE 或 GHSA、advisory、scanner ticket、bug bounty 報告、Codex Security 發現產物,或純文本漏洞聲稱。 不需要連接器。
Jira 或 Linear 精確的安全或漏洞 issue URL / identifier、Jira JQL,或 Linear team、project、搜尋短語。Codex 會在 triage 前拉取選中的 issue 內容。 需要有讀權限的 Jira through Atlassian RovoLinear
GitHub 一個 repository 和一種發現來源:code scanning、Dependabot vulnerabilities and malware、security advisories and private vulnerability reports,或 all sources。如果沒有指定 repository,Codex 會在可用時使用當前 Codex project 關聯的 GitHub repository。GitHub Issues 不包含在預設 GitHub sources 中;如果要分診 GitHub Issues,請提供具體 issue,或明確要求 GitHub Issues。 經過認證的 GitHub REST 存取,例如 gh auth tokenGH_TOKENGITHUB_TOKEN;憑據必須有權讀取所選 repository 和 finding type。

Codex 會為每個輸入發現保留一條結果,並保持輸入順序,因此每個源發現都可追溯。它不會合並或丟棄看起來重複的發現。

執行只讀分診

對於貼上的發現或本機產物,可以傳送類似提示詞:

Use $codex-security:triage-finding to triage these existing security findings against this repository:

[Paste the findings or provide the artifact path.]

對於 Jira 或 Linear issues,請明確 issue 集合,並保持來源系統只讀:

Use $codex-security:triage-finding to import and triage the security findings from [Jira or Linear issue URLs, identifiers, or query] against this repository.
Do not change the source issues.

對於 GitHub 發現,請指定 repository 和來源:

Use $codex-security:triage-finding to import and triage [code scanning, Dependabot vulnerabilities and malware, security advisories and private vulnerability reports, or all] from [owner/repository] against this repository.

如果要使用當前 Codex project 關聯的 GitHub repository,只指定發現來源:

Use $codex-security:triage-finding to import and triage [code scanning, Dependabot vulnerabilities and malware, security advisories and private vulnerability reports, or all] from GitHub against this repository. Use the GitHub repository attached to the current Codex project.

工作流程會按這個順序進行:

  1. 收集並組織發現

    Codex 會拉取任何請求的 issue 或 GitHub 內容,保留來源識別符號和引用,併為每個輸入建立一個分診專案。它會先建置完整專案列表,再分配結論。

  2. 確認儲存庫上下文

    Codex 會在可用時解析當前 repository 和 revision。如果存在 SECURITY.md,它會讀取其中內容,讓支援版本、可信輸入、產品邊界和範圍外的功能面參與評估。

  3. 檢查靜態證據

    對於每個發現,Codex 會追蹤聲稱的攻擊者可控來源、相關安全控制、易受攻擊的匯點(sink)、可達路徑和支援的安全邊界。它會記錄支援性證據、反對該聲稱的證據,以及證據缺口。

  4. 分配結論和排序

    Codex 會為每個發現分配結論和置信度。它會分別在 confirmedneeds_review 佇列中,按可利用性對發現排序。

審查結果

結論 含義
confirmed 儲存庫證據表明易受攻擊路徑在所述前提下可達,並跨越了受支援的安全邊界。
not_actionable 儲存庫證據排除了該聲稱,例如顯示版本不受影響、路徑不可達、已有有效防護,或屬於未釋出表面。
needs_review 儲存庫證據不足以判斷,因為所需資訊缺失、含糊、依賴執行時、依賴環境或依賴策略。

對每個發現,審查:

  • 結論和排序的理由
  • 支援性證據與反對該聲稱的證據
  • 未解問題和剩餘證據缺口
  • 受影響位置和元件
  • 產品功能面和來源可信級別
  • 建議下一步
  • 當發現為 confirmed 時,交接給 $codex-security:fix-finding 的內容

當每個輸入發現都有一個結果、Codex 保留了它的來源識別符號,並且任何不確定性都被明確記錄時,分診才算完成。Jira、Linear 和其他待處理記錄會保持不變,除非你在審查分診結果後要求 Codex 寫回。

後續步驟

  • confirmed:當人工接受該發現並準備修復後,使用 $codex-security:fix-finding 修復並驗證。分診會準備可直接放進提示詞的交接內容,但不會自動呼叫該技能。

  • needs_review:如果執行程式碼可以解決證據缺口,使用 $codex-security:validation 執行有邊界的動態驗證。請從分診結果中傳入發現聲稱、受影響位置、前提條件、靜態證據和證據缺口:

    Use $codex-security:validation to dynamically validate finding [triage item ID or source ID] from the backlog triage result. Use the strongest realistic, bounded method, record exactly what was tested, and preserve any remaining proof gaps.

    與分診不同,validation 可能會建置或執行程式碼、建立聚焦測試或 proof of concept,或操作真實介面。核准前請審查擬執行命令,並保持 Codex 審批與安全策略 生效。

  • needs_review:如果發現依賴產品策略或部署上下文,請先回答列出的 open questions,再修改程式碼。

  • not_actionable:把證據保留在分診記錄中。Codex 不會自動關閉或更新來源 ticket。

  • 如果要查詢已提供待處理列表之外的漏洞,請執行安全掃描


來源:</zh-TW/docs/security/plugin/triage-backlog> 更新時間:2026-06-19(UTC)