Codex Security CLI quickstart
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending
.mdto the page URL.
Codex Security helps security and engineering teams find, confirm, and fix vulnerabilities. Use its command-line interface (CLI) to scan repositories you own or have permission to assess, review findings over time, and check changes before they land.
The @openai/codex-security package is public. Running scans requires Codex Security access. For an interactive scan in Codex, start with the Codex Security plugin quickstart. For connected GitHub repositories, see Codex Security cloud setup.
Check the prerequisites
The CLI requires Node.js 22 (22.13.0 or later), 24, or 26. Scans, bulk scans, exports, scan history, and saved findings also require Python 3.10 or later. For more detail, see Authentication and prerequisites.
Set up and verify the CLI
Run the CLI with npx and check its version:
npx @openai/codex-security --versionTo see both the package version and the version of its bundled plugin, run:
npx @openai/codex-security info --jsonSee the CLI and SDK releases for package changes.
List the available commands:
npx @openai/codex-security --helpSee also CLI reference.
Sign in
For local use, sign in with your ChatGPT account:
npx @openai/codex-security loginOn a remote or headless machine, use device authentication:
npx @openai/codex-security login --device-authFor CI and other automated workflows, set an OpenAI API key: