Codex Security is a security agent that looks for candidate code vulnerabilities, checks the evidence, and helps lead to fixes. First, distinguish between the plugin you use with Codex locally and Codex Security Cloud, which runs in the cloud connected to GitHub. Even though they share a name, their setup, where they run, and where you check pricing all differ. There is also a standalone command-line version for building into CI and similar pipelines (@openai/codex-security, "standalone CLI" below).
Codex Security
Runs in the desktop app or in a Codex CLI chat. Choose the scope to scan: the whole repository, a specific folder, or the changed diff.
Codex Security Cloud
A separate plugin. It scans your connected GitHub repository in the cloud, running one-time scans or monitoring new commits.
This article covers which to choose, pricing and free credits, the first scan, the load of Deep scans, how to read results, and how to check after fixes.
Source: OpenAI Codex Security overview and Getting started with the local plugin.
Choosing between local, Cloud, and regular review
For a small change, you can simply give the diff and review criteria to regular Codex. This does not mean that the output of a dedicated scanner or a record of the scan scope is attached automatically. Asking for a code review and running a Codex Security scan should be treated as separate things. For how to choose between Codex products themselves, see the Claude Code vs. Codex comparison article.
@openai/codex-security) and an SDK are published. They are separate from the plugin inside Codex CLI, so check the authentication method, execution permissions, and budget separately.Cloud is in research preview, and using it requires access to the target workspace. For the standalone CLI too, the package being published and your account having scan permission are separate matters. Depending on your account and repositories, a full scan may also require "Trusted Access for Cyber." You cannot conclude that every route is available just from a plan name such as Pro. If something doesn't appear on screen, check whether the plugin is enabled, your usage permissions, and your organization's admin settings.
Source: OpenAI Overview and access requirements and Security review of code changes.
Pricing and free credits: Pro still needs a separate check
Cloud scans are not included in the regular plan allowance
OpenAI's Cloud FAQ explains that repository scans and continuous scans configured on or after October 1, 2026, at 12:53 (U.S. Pacific Time), are billed in credits or US dollars based on the plan's token rates. They are not included in the regular plan usage allowance. For eligible accounts, free scan credits are used before paid usage.
Eligible existing monitoring is free until October 21
Scans added later are not covered. After the free period ends, monitoring continues if you enable paid usage, and is paused if you do not.
US$500 equivalent in free credit for eligible accounts
For eligible accounts. The same balance is used for one-time and continuous scans, and it is shared across the workspace. According to the FAQ, this free scan credit has no expiration date.
US$500 is scan credit for eligible accounts. After it is used up, the billing structure for that account or workspace applies. Before you start, check on screen whether you qualify, how much free credit remains, and the conditions for paid usage.
The "cost" on screen isn't always what you're charged
In Cloud, you can open the target scan from "Scans" and check the token count and cost. Hovering over the token count shows a breakdown of input, cached input, and output. The displayed cost is the amount before free credits or billing exemptions are applied, so read the free credit applied separately from the actual charge. Scans that show "Exempt from billing. No charges apply." are not charged.
Source for pricing, free credits, and display: OpenAI Codex Security Cloud FAQ "Billing". The time basis is U.S. Pacific Time, as stated officially.
Don't apply the Cloud free credit to the local plugin
The local plugin runs as a Codex task. Under Codex's general terms of use, your plan, model, amount of processing, and authentication method affect consumption, and additional local work using an API key is billed at API rates. On the other hand, in the local getting-started steps, the standard and Deep scan documentation, and the CLI FAQ I checked, there is no fixed price per scan and no pricing table specific to the plugin. Don't assume that "local means zero consumption" or that "the Cloud US$500 credit can be used."
The standalone CLI may use an API key even when you're logged in. If OPENAI_API_KEY or CODEX_API_KEY is set in your environment, that key is selected by default for non-interactive scans and for JSON/JSONL output. If you have both an environment API key and a saved ChatGPT login, interactive and text-output modes ask you which to use. The official documentation provides explicit options, --auth chatgpt and --auth api-key, so decide who will be billed before you start.
You can check your Codex usage on the usage screen, and with /status inside the Codex CLI. Cloud scan costs also need to be checked on the Cloud side. For a comparison of plans, see the Pro pricing and usage allowance article.
Source: OpenAI Codex and Work pricing and usage and CLI authentication selection.
Steps and prompt for your first scan
The following is an overview of the official steps. Limit scan targets to code you own or have permission to test. For your first scan, confirm the target branch, revision, output destination, and the authentication to use. Starting with Standard is the easiest sequence.
Local plugin in the desktop app
- Find "Codex Security" in the plugin list, then install and enable it. Cloud is a separate plugin.
- Open "Security" → "Scans" → "+ Scan" in the sidebar.
- Select the repository. For a full scan, choose "Codebase"; for the first run, turn off "Deep scan."
- Check the folder to examine, the current branch and revision, and the model and reasoning effort.
- Only if needed, add public entry points, authorization conditions, and important operations under "Additional context."
- Start with "Start scan," check progress for each stage, and read the scan scope and evidence after completion.
When using it inside Codex CLI, install with /plugins, then create a new chat for the target repository with /new. Rather than just saying "check the security," state that you want a dedicated scan and name the target, so the record shows what you requested.
Run a standard Codex Security scan focusing on services/billing.
Prioritize user input, ownership checks for billing information, and admin-only operations.
This time, scan and report only. Do not modify source, commit, push, publish, or change billing settings.
Report the target revision, the scope scanned, the scope excluded or incomplete, and the evidence for each reproduction.
If a configuration change is needed, stop and show the change and the reason.
Prohibitions written into the prompt do not enforce permissions the way a sandbox does. Check execution permissions separately.
Cloud version using GitHub
- Install "Codex Security Cloud" and confirm the GitHub connection to the target repository.
- Under "Scan," select the repository and environment. "Auto" creates an environment at the start, so if you want to use a prepared environment, check it under "Customize."
- For a one-time check, choose "One-Time Scan." To monitor future commits, choose "Continuous Scanning."
- Check pricing, free balance, and targets, then start with "Create."
Continuous scans target the repository's default branch. The longer the history period you scan, the longer the initial scan takes. To stop monitoring, pause it under "Repositories" → target → "Monitoring settings" and save. Be careful not to confuse closing the screen with stopping monitoring.
Source: OpenAI Plugin getting-started steps and Cloud setup and monitoring.
Standard and Deep: adjusting scope and load
Standard
A regular repository or folder scan. Determine what gets examined and what kind of evidence comes out first, and use that as the baseline to compare the next scans against.
Deep
A method that explores more broadly, so it places a large load on time and resources. It uses independent scan workers and the sub-agents under them, and aggregates results according to conditions.
In the official Deep settings, the default number of workers running concurrently is 4, the number of sub-agents per worker is 3, and the maximum runtime is 96 hours. 96 hours is the configured upper limit, not the typical run time. Setting a time limit requires plugin version 0.1.19 or later. When the time limit is reached, unfinished workers are stopped and completed results are aggregated. Any portion that was not examined remains as such.
Start by narrowing the target to meaningful service units, read the Standard results, and then decide whether Deep is necessary. You can also deeply examine only critical areas such as payments and authentication. Reducing worker count and time limits lowers the load, but more problems may go undetected, so it is important to record the scope covered by a cheaper, faster scan.
To examine differences, use "Changes." You can choose uncommitted changes, a single commit, or a base and target revision, but Deep is not available with Changes. It examines code directly related to the diff and does not automatically expand into a full audit.
The standalone CLI's cost limit is an estimate. The official --max-cost decides when to stop based on an estimated cost in US dollars. A request already in progress may complete beyond the limit, so it is not a strict payment cap. Combine it with time limits, parallelism, and scope, and don't treat a scan that stopped midway as a complete result.
Source: OpenAI Standard and Deep, default values, Changes scope, and estimated cost limits.
Reading scope and evidence, not the number of findings
The number of problems found alone cannot tell you whether a scan was good. A scan that targeted the wrong code, stopped partway through, or didn't account for authorization rules may show zero findings and still not be safe. The official standard scan steps also guide you to read the revision, the areas examined, the areas deferred, and each piece of evidence first.
- Is the target correct? Confirm the repository, revision, and scope. Don't use results from old code as a guarantee for the current version.
- What wasn't examined? Check excluded, held, and interrupted areas. Don't assume you've looked at everything just because it shows as complete.
- Does the evidence hold up? Check the path from input to dangerous processing, existing defenses, and the reproduction method and result.
- Does it need fixing? Consider the real conditions for reaching the issue and its impact, then fix each accepted finding one at a time.
The easiest entry point is report.md. The structured coverage.json lets you check examined areas and deferred items, and findings.json is for checking each finding's location, severity, evidence, and fix direction. The findings/ folder may contain detailed reports and reproduction files. When sharing, keep the related files together, not just the report.
A statement saying only "there is no authorization" gives too little to judge. Check the target endpoint, login conditions, what happens when you change the billing information ID, where the ownership check is, and any checks run at another layer.
Example that holds up: Data for another user's ID was returned, and this was reproduced in an authorized test environment.
Example requiring further investigation: An ownership check may still exist before the processing step, and the actual call path and configuration have not been confirmed.
In the standalone CLI, use coverage.json to confirm which areas were not examined (excluded paths and deferred locations). Even when areas were not examined, the exit code does not change, so exit code 0 does not mean every file was examined. If a finding disappears in a later scan, you cannot call it "fixed" unless you examined the original path. Cloud's automatic validation is also a feature that attempts to reproduce issues. A result of "not validated" does not mean "proven safe."
Source: OpenAI Standard scan evaluation steps, CLI scan scope and comparison, and Cloud automatic validation.
Fixing, re-verifying, and handling sensitive information
Telling the scan who can do what makes reports easier to judge
Include "who should be able to do what" in the scan context. For example, "billing information is accessible only to the account holder and administrators," or "only the owner can publish files." For local plugins, you can use SECURITY.md as a continuing security policy and AGENTS.md for instructions such as build and verification steps. In Cloud, review the generated threat model and fill in gaps in public entry points, critical operations, and trust boundaries.
A threat model is a short description of the app's structure and the conditions it must protect. Because edits in Cloud apply to future scans, correcting an assumption does not change what was checked in older reports.
Fix one finding at a time, and confirm both reproduction and normal behavior
- Accept a finding: Check the evidence and real impact, and choose one issue to fix.
- Create a small fix proposal: In the local UI, choose "Patch" → "Generate patch." Generating a proposal is a separate step from applying it to the target checkout.
- Read the diff: Check for unrelated cleanup or changes that weaken another defense, then apply it with "Apply patch."
- Re-verify: Use "Verify fix" to check the original reproduction steps and normal behavior. Where possible, also keep a regression test that fails before the fix and passes after.
- Close the finding: Verification alone does not close it automatically. Read the remaining gaps in evidence, then either close it with a stated reason or keep investigating.
When Cloud provides a fix proposal, review its content before creating a draft PR. Record separately whether a fix proposal exists, whether it was applied, whether it was re-verified, and whether it was released to production. Also use the pre-release checks for apps built with AI, so you don't leave every decision to one scanner.
"Local" does not mean nothing is sent externally
Even on a route that runs locally, handle separately the inference requests sent to the model and the information used for verification. The official standalone CLI steps warn that scans use local OS permissions, do not stop for per-action approval, and may inherit environment variables. Do not assume they have the same permissions as a regular Codex chat; prepare a scan environment that holds no unnecessary credentials.
Saved logs are not always automatically stripped of secret values, and they may contain source code or credentials. Deliverables also include reproduction steps and vulnerability details, so check the contents and sharing scope before publishing a public link or sharing with third parties. For settings related to model improvement, see ChatGPT and Codex training use and privacy, which is explained separately.
Source: OpenAI SECURITY.md and AGENTS.md, Cloud threat model, Fixing and verification, and standalone CLI permissions, deliverables, and logs.
Checklist before you start
- Path: Decide among the local plugin, Cloud, and the standalone CLI.
- Permissions: Confirm that you have permission to scan the code and scan permission on your account.
- Pricing: Don't confuse your regular usage allowance, Cloud free credit, and API billing.
- Target: Fix the revision and scope, and consider starting with Standard.
- Judgment: Read the scan scope, reproduction evidence, and remaining uncertainty, not just the count.
- Fixing: Check each diff and re-verification one at a time before accepting a fix.
If this is your first time, start with a Standard scan of the needed scope to see whether you can judge the results yourself. If you need ongoing monitoring, consider Cloud; if you want to build scanning into automated processes, consider the standalone CLI. Use it as a tool that supplements the discovery and verification of problems, not as a safety proof that replaces existing static analysis (SAST) or human review.
Premises for this article: written on October 7, 2026, based on OpenAI's official documentation. The free period and CLI exit codes were re-checked against the official FAQ on October 19. We did not run the product's scans, so please check detection accuracy, run time, and consumption yourself by trying it on part of your own repository.
Frequently asked questions
Q. If I have ChatGPT Pro, is Codex Security Cloud included at no extra cost?
It is not described as included in the regular plan usage allowance. Cloud scans are billed at token rates, and separately there are eligible free scan credits and free periods for existing continuous monitoring. Don't rely on the plan name alone; check your own balance and the conditions for paid usage.
Q. Isn't it enough to just ask regular Codex to review the code?
It depends on your goal. Regular review can check implementation and tests. Consider Codex Security when you want a dedicated scan scope, findings, reproduction evidence, and continuous monitoring.
Q. If a scan finds zero issues, can I consider the code safe?
No. First check the revision, the target scope, whether the scan ended early, and which areas were excluded. If the scan scope was incomplete or you couldn't account for the business authorization rules, you may miss problems. Use it together with existing static analysis and human review.
Q. If I choose a Deep scan, can I scan reliably with a small usage allowance?
There is no such guarantee. Deep explores more broadly, so it uses more time and resources than Standard. Adjust the target, parallelism, and time limits, and if a scan stops, read the scope it covered. The estimated cost limit in the standalone CLI is also not a strict payment cap.