Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

5.4 KB
Raw Blame
name: OpenAI Codex Security
description: Scan code with Codex Security, enforce findings policy, and produce JSON and SARIF reports.
branding:
  icon: shield
  color: black
inputs:
  repository:
    description: Checkout root. Use paths to select folders within the checkout.
    default: ${{ github.workspace }}
  scope:
    description: 'repository or diff. Select diff for PR changes only; repository scans the full checkout.'
    default: repository
  paths:
    description: Newline-delimited literal repository-relative files or folders. Only for repository scope; no glob expansion.
  diff-base:
    description: Diff base revision. Defaults to the PR merge base; required outside PRs when scope is diff.
  mode:
    description: 'standard or deep. Deep supports repository scans, including selected paths; not diff scans.'
    default: standard
  provider:
    description: "Providers supported by the Action: openai, openrouter, fireworks, or amazon-bedrock. Pass the selected provider's credentials to the scan step."
    default: openai
  model:
    description: Model to scan with, passed to scan --model. Defaults to gpt-5.6-sol for OpenAI; other providers require an explicit model ID. Cost limits require CLI pricing support for the model.
  cyber-access-program:
    description: 'Optional Cyber access program: standard, daybreak_blue, or daybreak_red. Unset preserves CLI defaults. Daybreak selections require approved organization and enabled API project access; model access is checked separately.'
  effort:
    description: 'Reasoning effort passed to Codex; supported values depend on the model and provider.'
    default: xhigh
  max-cost:
    description: Positive estimated USD stop threshold per invocation. In-flight requests can exceed it; unset means no cost limit.
  max-time-hours:
    description: Positive Deep discovery duration in hours, up to 96. Unset uses the CLI default. Finalization and job timeout are separate.
  fail-on-severity:
    description: 'none, low, medium, high, or critical. Fails on reported findings at or above the selected severity. Scanner and required reporting errors also fail.'
    default: none
  verbose:
    description: Stream CLI diagnostics to the job log. Set false for lifecycle and elapsed-time messages only.
    default: 'true'
  dry-run:
    description: 'Validate local configuration without a scan or API key. Does not verify authentication or model access. Requires fail-on-severity: none; use a separate non-required job.'
    default: 'false'
  summary:
    description: Write a human-readable job summary.
    default: 'true'
  annotations:
    description: Emit up to 50 source finding annotations; complete findings remain in reports.
    default: 'true'
  upload-artifacts:
    description: Upload an allowlist of validated reports and link the artifact in the job summary. Reports may contain source and vulnerability details.
    default: 'false'
  artifact-name:
    description: Report artifact name; choose distinct names for matrix jobs and multiple invocations.
    default: codex-security
  retention-days:
    description: Artifact retention, 1–90 days (subject to repository limits).
    default: '7'
outputs:
  sarif-path:
    description: Absolute validated SARIF file path, or empty when unavailable or withheld.
  json-path:
    description: Absolute canonical findings JSON path, or empty when unavailable or withheld.
  manifest-path:
    description: Absolute scan manifest path, including scan status and scope, or empty when unavailable or withheld.
  coverage-path:
    description: Legacy coverage JSON path. Empty for current CLI results.
  results-directory:
    description: Runner-local reports directory; do not upload it recursively.
  scan-status:
    description: 'completed, failed, or skipped. Completed means analysis produced a valid result. Skipped is reserved for empty diffs or dry-run.'
  skip-reason:
    description: empty-diff or dry-run when no scan ran; otherwise empty.
  policy-status:
    description: 'passed, failed, or not-evaluated. Failed or skipped scans are not-evaluated.'
  report-status:
    description: 'ready, partial, or failed. Missing optional SARIF yields partial without failing the scan; required reporting failures yield failed.'
  exit-code:
    description: CLI exit code, or empty if the CLI was not started. 0 means success, 1 means findings policy failed, and 2 means execution failed.
  scanned-sha:
    description: Verified checkout commit SHA.
  analysis-ref:
    description: GitHub ref matching the scanned revision.
  sarif-upload-ready:
    description: 'true only for validated SARIF from a completed scan with a publishable immutable revision. Remains true after severity-policy failure.'
  critical-count:
    description: Available critical findings, or empty before results are available.
  high-count:
    description: Available high findings, or empty before results are available.
  medium-count:
    description: Available medium findings, or empty before results are available.
  low-count:
    description: Available low findings, or empty before results are available.
  informational-count:
    description: Available informational findings, or empty before results are available.
  estimated-cost:
    description: Estimated USD cost reported by the CLI. Empty means unavailable, not zero.
runs:
  using: node24
  main: github-action/dist/index.cjs
  post: github-action/dist/post.cjs
  post-if: always()