如需完整的文件索引,請參閱 llms.txt。在文件頁面的網址末尾加上 .md ,即可取得該頁面的 Markdown 版本。
主要導覽
主題
Codex

Codex 應用案例

使用 GitHub Actions 建立自訂審查工作流程

依自訂條件觸發安全檢查,並儲存結果供後續審查。

難度 Intermediate
任務時間跨度 Long-running

將安全審查納入開發流程,讓團隊能重複執行。設定 GitHub Actions 工作流程,使用 Codex Security 檢查提議的變更,並儲存結果供團隊檢視。

最適合的對象

  • 想在 GitHub Actions 中加入安全檢查的平台與應用程式安全團隊。
  • 需要自訂審查觸發條件與掃描範圍的程式碼庫維護者。
  • 需要重複執行審查,並保留審查發現、佐證資料與掃描涵蓋範圍報告的團隊。

目錄

    ← 所有應用案例

    使用 GitHub Actions 建立自訂審查工作流程

    依自訂條件觸發安全檢查,並儲存結果供後續審查。

    將安全審查納入開發流程,讓團隊能重複執行。設定 GitHub Actions 工作流程,使用 Codex Security 檢查提議的變更,並儲存結果供團隊檢視。

    Intermediate
    Long-running
    依步驟設定

    將安全審查納入開發流程,讓團隊能重複執行。設定 GitHub Actions 工作流程,使用 Codex Security 檢查提議的變更,並儲存結果供團隊檢視。

    Intermediate
    Long-running

    最適合的對象

    • 想在 GitHub Actions 中加入安全檢查的平台與應用程式安全團隊。
    • 需要自訂審查觸發條件與掃描範圍的程式碼庫維護者。
    • 需要重複執行審查,並保留審查發現、佐證資料與掃描涵蓋範圍報告的團隊。

    除了透過 Codex 強制執行安全審查,你也可以建立自訂工作流程,在其中執行 Codex Security CLI。我們已將這個工作流程封裝成 GitHub Action,方便你直接使用。

    name: Codex Security review
    on:
      workflow_dispatch:
      schedule:
        - cron: '23 7 * * 1' # Mondays at 07:23 UTC
    
    permissions:
      contents: read
    
    jobs:
      security:
        runs-on: ubuntu-24.04
        steps:
          - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
            with:
              persist-credentials: false
          - uses: openai/codex-security@a98b35d7eef9f85c298c86229445bb64ac427aaf # action-v0.9.1
            with:
              model: gpt-5.6-sol
              effort: high
            env:
              OPENAI_API_KEY: ${{ secrets.CODEX_SECURITY_API_KEY }}

    這些工作流程也適用於其他原始碼管理工具,例如 GitLab、BitBucket 或 Jenkins。如需進一步瞭解,請參閱在 CI 中執行 Codex Security。

    相關應用案例