SpyBara
Go Premium

Documentation 2026-08-05 19:00 UTC to 2026-08-06 23:58 UTC

12 files changed +597 −195. View all changes and history on the product overview
2026
Wed 12 19:59 Tue 11 22:59 Mon 10 22:00 Sat 8 03:02 Fri 7 18:59 Thu 6 23:58 Wed 5 19:00 Tue 4 22:00 Mon 3 23:00 Sun 2 21:00
Details

199 bedrock: "available",199 bedrock: "available",

200 },200 },

201 },201 },

202 {

203 name: "Codex Security CLI",

204 href: "/codex/security/cli",

205 availability: {

206 bedrock: "available",

207 },

208 },

202 {209 {

203 name: "IDE extension",210 name: "IDE extension",

204 href: "/codex/ide",211 href: "/codex/ide",


260 {267 {

261 title: "Local features",268 title: "Local features",

262 features: [269 features: [

270 {

271 name: "Codex Security plugin and local scans",

272 shortName: "Codex Security plugin",

273 href: "/codex/security/plugin",

274 availability: {

275 bedrock: "available",

276 },

277 },

263 {278 {

264 name: "Local code review with `/review`",279 name: "Local code review with `/review`",

265 shortName: "Local code review",280 shortName: "Local code review",


577 },592 },

578 },593 },

579 {594 {

580 name: "Codex Security for connected GitHub repositories",595 name: "Codex Security cloud for connected GitHub repositories",

581 shortName: "Codex Security",596 shortName: "Codex Security cloud",

582 href: "/codex/security",597 href: "/codex/security/setup",

583 availability: {598 availability: {

584 bedrock: "unavailable",599 bedrock: "unavailable",

585 },600 },


602 id="codex-plan-plugin-limits"617 id="codex-plan-plugin-limits"

603 className="not-prose mt-1 text-sm text-secondary"618 className="not-prose mt-1 text-sm text-secondary"

604 >619 >

605 <sup>†</sup> Local plugin bundles are supported when their capabilities do620 <sup>†</sup> Local plugin bundles and OpenAI-curated plugins that don't

606 not require ChatGPT authentication. OpenAI-curated plugin discovery and621 require ChatGPT authentication, including Codex Security, are available.

607 features that depend on connectors or cloud-hosted sharing aren't622 Plugins that require ChatGPT authentication, connectors, or cloud-hosted

608 available.623 sharing aren't available.

609 624

610 625 

611</ToggleSection>626</ToggleSection>

app/features.md +7 −0

Details

26 href: "/codex/projects",26 href: "/codex/projects",

27 icon: "folder",27 icon: "folder",

28 },28 },

29 {

30 title: "Codex Remote",

31 description:

32 "Start tasks, approve actions, and review work from your phone.",

33 href: "/codex/remote",

34 icon: "connect",

35 },

29 {36 {

30 title: "Sites",37 title: "Sites",

31 description:38 description:

codex-manual.md +312 −152

Details

44 44 

45- [Projects and chats](https://learn.chatgpt.com/docs/projects): Keep related chats, context, and work together.45- [Projects and chats](https://learn.chatgpt.com/docs/projects): Keep related chats, context, and work together.

46 46 

47- [Codex Remote](https://learn.chatgpt.com/docs/remote): Start tasks, approve actions, and review work from your phone.

48 

47- [Sites](https://learn.chatgpt.com/docs/sites): Create, save, and publish interactive websites and apps in ChatGPT.49- [Sites](https://learn.chatgpt.com/docs/sites): Create, save, and publish interactive websites and apps in ChatGPT.

48 50 

49- [Visualizations](https://learn.chatgpt.com/docs/visualizations): Turn ideas and information into interactive visual explanations.51- [Visualizations](https://learn.chatgpt.com/docs/visualizations): Turn ideas and information into interactive visual explanations.


3813npm install @openai/codex-security3815npm install @openai/codex-security

3814```3816```

3815 3817 

3816Check the installed version:

3817 

3818```bash

3819npx @openai/codex-security --version

3820```

3821 

3822List the available commands:3818List the available commands:

3823 3819 

3824```bash3820```bash

3825npx @openai/codex-security --help3821npx @openai/codex-security --help

3826```3822```

3827 3823 

3828Use `npx @openai/codex-security scan --help` or3824See also [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference).

3829`npx @openai/codex-security export --help` for complete command help. The

3830[CLI reference](https://learn.chatgpt.com/docs/security/cli/reference) covers each argument, output

3831format, and exit code.

3832 3825 

3833#### Sign in3826#### Sign in

3834 3827 


3850export OPENAI_API_KEY="<your-api-key>"3843export OPENAI_API_KEY="<your-api-key>"

3851```3844```

3852 3845 

3853Keep API keys in your shell or secret manager. Codex Security can also reuse an3846For AWS credentials, see [Amazon Bedrock

3854existing file-backed Codex sign-in. When both a stored ChatGPT sign-in and an3847setup](https://learn.chatgpt.com/docs/security/cli/reference#use-amazon-bedrock).

3855environment API key are available, interactive scans with text output ask

3856which to use. CI, JSON and JSONL scans, and other unattended scans use the

3857API key by default.

3858 3848 

3859To use your ChatGPT sign-in when an API key is also set, select it explicitly:3849To use your ChatGPT sign-in when an API key is also set, select it explicitly:

3860 3850 


3868npx @openai/codex-security scan . --auth api-key3858npx @openai/codex-security scan . --auth api-key

3869```3859```

3870 3860 

3871To make your stored sign-in the automatic default, unset both environment API

3872keys:

3873 

3874```bash

3875unset OPENAI_API_KEY CODEX_API_KEY

3876```

3877 

3878Depending on your account and repository, full-repository scans may also3861Depending on your account and repository, full-repository scans may also

3879require [Trusted Access for Cyber](https://chatgpt.com/cyber). Signing in or3862require [Trusted Access for Cyber](https://chatgpt.com/cyber).

3880setting an API key doesn't grant that access.

3881 3863 

3882#### Prepare a scan3864#### Prepare a scan

3883 3865 


4274 4256 

4275```text4257```text

4276usage: codex-security scan [-h] [--auth {auto,chatgpt,api-key}]4258usage: codex-security scan [-h] [--auth {auto,chatgpt,api-key}]

4259 [--provider {openai,openrouter,fireworks,amazon-bedrock}]

4277 [--path PATH | --diff BASE | --working-tree]4260 [--path PATH | --diff BASE | --working-tree]

4278 [--head HEAD] [--base BASE]4261 [--head HEAD] [--base BASE]

4279 [--knowledge-base PATH]4262 [--knowledge-base PATH]


4283 [--archive-existing]4266 [--archive-existing]

4284 [--plugin-path PATH] [--python PATH]4267 [--plugin-path PATH] [--python PATH]

4285 [--codex KEY=VALUE] [--fail-on-severity LEVEL]4268 [--codex KEY=VALUE] [--fail-on-severity LEVEL]

4286 [--max-cost USD] [--dry-run]4269 [--max-cost USD] [--dry-run] [--verbose]

4287 [--json] [--format {toon,json,yaml,jsonl}]4270 [--json] [--format {toon,json,yaml,jsonl}]

4288 [--full-output] [repository]4271 [--full-output] [repository]

4289```4272```


4313To make stored credentials the automatic default, run4296To make stored credentials the automatic default, run

4314`unset OPENAI_API_KEY CODEX_API_KEY`.4297`unset OPENAI_API_KEY CODEX_API_KEY`.

4315 4298 

4299#### Use Amazon Bedrock

4300 

4301Select Amazon Bedrock with `--provider amazon-bedrock` and specify an explicit

4302Bedrock model with `--model`:

4303 

4304```bash

4305npx @openai/codex-security scan . \

4306 --provider amazon-bedrock \

4307 --model openai.gpt-5.6-sol

4308```

4309 

4310Set `AWS_REGION` and authenticate with `AWS_BEARER_TOKEN_BEDROCK`, standard AWS

4311access keys, an AWS profile, web identity, container credentials, or the

4312default AWS credential chain. Bedrock scans use AWS credentials instead of

4313`--auth`, ChatGPT sign-in, or an OpenAI API key. Both `scan` and `bulk-scan`

4314support `--provider`.

4315 

4316#### Select the scan target4316#### Select the scan target

4317 4317 

4318Choose one target type for each scan.4318Choose one target type for each scan.


4391| `--fail-on-severity LEVEL` | Return exit `1` when a completed scan reports a finding at or above `critical`, `high`, `medium`, or `low`. |4391| `--fail-on-severity LEVEL` | Return exit `1` when a completed scan reports a finding at or above `critical`, `high`, `medium`, or `low`. |

4392| `--max-cost USD` | Stop a scan when its estimated model cost exceeds the specified USD amount. |4392| `--max-cost USD` | Stop a scan when its estimated model cost exceeds the specified USD amount. |

4393| `--dry-run` | Check the repository, target, output directory, and Codex configuration without starting a scan. |4393| `--dry-run` | Check the repository, target, output directory, and Codex configuration without starting a scan. |

4394| `--verbose` | Print redacted lifecycle, authentication, progress, and cost diagnostics to stderr. |

4394| `--json` | Print manifest, findings, coverage, paths, and turn metadata as one JSON document. |4395| `--json` | Print manifest, findings, coverage, paths, and turn metadata as one JSON document. |

4395| `--format FORMAT` | Print the complete scan result as `toon`, `json`, `yaml`, or `jsonl`. |4396| `--format FORMAT` | Print the complete scan result as `toon`, `json`, `yaml`, or `jsonl`. |

4396| `--full-output` | Print the complete result using the default structured output format. |4397| `--full-output` | Print the complete result using the default structured output format. |


4448Codex configuration value.4449Codex configuration value.

4449 4450 

4450| Argument | Description |4451| Argument | Description |

4451| ------------------------------------------ | -------------------------------------------------------------------------------------------------------- |4452| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |

4452| `--auth {auto,chatgpt,api-key}` | Select the scan credentials. The default is `auto`. |4453| `--auth {auto,chatgpt,api-key}` | Select the scan credentials. The default is `auto`. |

4453| `--model MODEL` | Select the OpenAI model. The default is `gpt-5.6-sol`. |4454| `--provider {openai,openrouter,fireworks,amazon-bedrock}` | Select the inference provider. The default is `openai`. |

4455| `--model MODEL` | Select the model. The default is `gpt-5.6-sol`. Required with `--provider amazon-bedrock`. |

4454| `--effort {minimal,low,medium,high,xhigh}` | Select the model's reasoning effort. The default is `xhigh`. |4456| `--effort {minimal,low,medium,high,xhigh}` | Select the model's reasoning effort. The default is `xhigh`. |

4455| `--plugin-path PATH` | Use a Codex Security plugin directory or ZIP to override the bundled plugin. |4457| `--plugin-path PATH` | Use a Codex Security plugin directory or ZIP to override the bundled plugin. |

4456| `--python PATH` | Select the Python interpreter for the plugin runtime. |4458| `--python PATH` | Select the Python interpreter for the plugin runtime. |


4498```text4500```text

4499usage: codex-security bulk-scan [input] [--output-dir DIR]4501usage: codex-security bulk-scan [input] [--output-dir DIR]

4500 [--workers N] [--mode {standard,deep}]4502 [--workers N] [--mode {standard,deep}]

4503 [--provider {openai,openrouter,fireworks,amazon-bedrock}]

4501 [--model MODEL]4504 [--model MODEL]

4502 [--effort {minimal,low,medium,high,xhigh}]4505 [--effort {minimal,low,medium,high,xhigh}]

4503 [--max-attempts N] [--plugin-path PATH]4506 [--max-attempts N] [--plugin-path PATH]


4779without writing the complete scan result to stdout. Request `--json`,4782without writing the complete scan result to stdout. Request `--json`,

4780`--format`, or `--full-output` to send structured scan results to stdout.4783`--format`, or `--full-output` to send structured scan results to stdout.

4781 4784 

4785#### Verbose diagnostics

4786 

4787Add `--verbose` to print redacted lifecycle, authentication, progress, and cost

4788diagnostics to stderr:

4789 

4790```bash

4791npx @openai/codex-security scan . --verbose

4792```

4793 

4794Set `CODEX_SECURITY_LOG_LEVEL=debug` to enable the same diagnostics without the

4795flag. `LOG_LEVEL=debug` also enables diagnostics when

4796`CODEX_SECURITY_LOG_LEVEL` is unset.

4797 

4798These logging controls apply only to the CLI. Credentials and provider

4799identifiers remain redacted, and structured scan results remain on stdout.

4800 

4782#### Completion summary4801#### Completion summary

4783 4802 

4784A completed scan writes its finding count, severity breakdown, coverage,4803A completed scan writes its finding count, severity breakdown, coverage,


4882 4901 

4883Set `OPENAI_API_KEY` or `CODEX_API_KEY`, sign in with4902Set `OPENAI_API_KEY` or `CODEX_API_KEY`, sign in with

4884`npx @openai/codex-security login`, or use an existing file-backed Codex4903`npx @openai/codex-security login`, or use an existing file-backed Codex

4885sign-in.4904sign-in. For Amazon Bedrock, use a Bedrock API key or the standard AWS

4905credential chain instead.

4886 4906 

4887For credential selection, see [Select scan4907For credential selection, see [Select scan

4888authentication](#select-scan-authentication).4908authentication](#select-scan-authentication).


5583npm install @openai/codex-security5603npm install @openai/codex-security

5584```5604```

5585 5605 

5586Before starting a scan, set `OPENAI_API_KEY` or `CODEX_API_KEY`, or use an5606Before starting a scan, set `OPENAI_API_KEY` or `CODEX_API_KEY`, use an

5587existing file-backed Codex sign-in.5607existing file-backed Codex sign-in, or [configure Amazon

5608Bedrock](#configure-the-runtime-and-credentials) with AWS credentials and

5609explicit `model_provider` and `model` overrides.

5588 5610 

5589For best results, use an account verified for [Trusted Access for5611For best results, use an account verified for [Trusted Access for

5590Cyber](https://chatgpt.com/cyber). Signing in or providing an API key does not5612Cyber](https://chatgpt.com/cyber). Signing in or providing an API key does not


5910plugin interpreter. `codexOverrides` merges supported values into the isolated5932plugin interpreter. `codexOverrides` merges supported values into the isolated

5911Codex configuration. Scans use `gpt-5.6-sol` with extra-high reasoning effort5933Codex configuration. Scans use `gpt-5.6-sol` with extra-high reasoning effort

5912by default. Set `model` and `model_reasoning_effort` in `codexOverrides` to use5934by default. Set `model` and `model_reasoning_effort` in `codexOverrides` to use

5913a different model or reasoning effort.5935a different model or reasoning effort. To use [Amazon

5936Bedrock](https://learn.chatgpt.com/docs/security/cli/reference#use-amazon-bedrock), set

5937`model_provider` and `model` in `codexOverrides`.

5914 5938 

5915The client also exposes supported authentication methods:5939The client also exposes supported authentication methods:

5916 5940 


7410reference](https://learn.chatgpt.com/docs/security/cli/reference). For an interactive plugin-based CI7434reference](https://learn.chatgpt.com/docs/security/cli/reference). For an interactive plugin-based CI

7411review, see [Review code changes for security](https://learn.chatgpt.com/docs/security/plugin/code-changes#automate-reviews-in-cicd).7435review, see [Review code changes for security](https://learn.chatgpt.com/docs/security/plugin/code-changes#automate-reviews-in-cicd).

7412 7436 

7437### Security Review

7438 

7439Source: [Security Review](https://learn.chatgpt.com/docs/security/security-review.md)

7440 

7441Security Review is available in research preview.

7442It is available to ChatGPT Enterprise, Business, Edu, and Pro customers; it is

7443not available on Plus. During the introductory period, Security Review does not

7444consume ChatGPT credits. Usage limits may apply.

7445 

7446Security Review is an additional review for customers that want to

7447pay particular attention to security issues in pull requests.

7448 

7449Security Review goes deeper than [Code

7450Review](https://learn.chatgpt.com/docs/third-party/github) on security-specific risks by analyzing the

7451pull request diff, supporting repository context, and configured threat models

7452or security guidance. Code Review can also identify security-related issues as

7453part of its general review, so you may see occasional overlap between findings.

7454 

7455#### Before you start

7456 

7457To configure automatic Security Review, you need:

7458 

7459- Security Review research preview access for your workspace

7460- [Codex cloud](https://learn.chatgpt.com/docs/cloud) set up with a connected GitHub repository

7461- GitHub push or admin permission for the repository settings

7462 

7463An existing Codex Security scan is optional.

7464 

7465#### Configure Security Review

7466 

74671. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

74682. Under **Repository preferences**, choose which pull requests get Security

7469 Review:

7470 - **Follow personal** lets each contributor opt in with their personal

7471 Security Review settings.

7472 - **Review all PRs** applies to every pull request in the repository.

7473 - **Review team PRs**, when available, applies to pull requests opened by

7474 members of your ChatGPT workspace, not members of a GitHub team.

74753. Choose when Security Review runs:

7476 - **On PR open** runs independently when a pull request is opened.

7477 - **Every push** runs independently after new commits are pushed.

7478 - **Whenever code review runs** requires Code Review and runs Security Review

7479 alongside it.

7480 

7481#### Add threat-model context

7482 

7483You can configure a threat model to give Codex context about your application's

7484assets, trust boundaries, security assumptions, and repository-specific risks.

7485If the repository has an existing Codex Security scan configuration, you can use

7486its threat model. Otherwise, provide the path to a threat model file checked

7487into the repository. If you do not specify a source, Codex regenerates the

7488threat model for every review.

7489 

7490#### Set reporting thresholds

7491 

7492By default, automatic Security Reviews report **High** and **Critical**

7493findings, while manually requested reviews report **Medium**, **High**, and

7494**Critical** findings. You can change the minimum severity independently for

7495automatic and manual reviews, and add path-based overrides.

7496 

7497Findings posted to a pull request inherit that pull request's GitHub

7498visibility. Anyone who can view the pull request can view those findings,

7499including on public repositories or pull requests from contributors outside

7500your workspace. Choose reporting thresholds carefully for repositories where

7501pull request comments may be broadly visible. The reporting threshold controls

7502what Codex posts to GitHub; the full Security Review report remains in Codex.

7503 

7504#### Request a Security Review

7505 

7506To request a Security Review manually, add this comment to a pull request:

7507 

7508`@codex security review`

7509 

7510Codex reacts while the review is running, then posts findings that meet your

7511manual reporting threshold directly on the pull request. Open the associated

7512Codex task and select the **Security Report** tab to view the full report,

7513including severity, attack path, supporting evidence, validation, and

7514remediation guidance. If no issues meet the reporting threshold, Codex does not

7515post findings to the pull request.

7516 

7517#### Related docs

7518 

7519- [Review GitHub pull requests with Codex](https://learn.chatgpt.com/docs/third-party/github) explains Code Review and the GitHub integration.

7520- [Codex Security](https://learn.chatgpt.com/docs/security) gives the product overview.

7521- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup) explains repository scans and findings review.

7522- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to tune repository context.

7523 

7413### Triage a backlog7524### Triage a backlog

7414 7525 

7415Source: [Triage a backlog](https://learn.chatgpt.com/docs/security/plugin/triage-backlog.md)7526Source: [Triage a backlog](https://learn.chatgpt.com/docs/security/plugin/triage-backlog.md)


9388- [Codex Security CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq) answers common questions about scans, findings, coverage, and costs.9499- [Codex Security CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq) answers common questions about scans, findings, coverage, and costs.

9389- [Codex Security TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) explains how to run scans from an application or developer tool.9500- [Codex Security TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) explains how to run scans from an application or developer tool.

9390- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup) details setup, scanning, and findings review.9501- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup) details setup, scanning, and findings review.

9502- [Security Review](https://learn.chatgpt.com/docs/security/security-review) explains how to run in-depth security reviews on GitHub pull requests.

9391- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to tune scope, entry points, and criticality assumptions.9503- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to tune scope, entry points, and criticality assumptions.

9392- [Codex Security cloud FAQ](https://learn.chatgpt.com/docs/security/faq) covers common cloud product questions.9504- [Codex Security cloud FAQ](https://learn.chatgpt.com/docs/security/faq) covers common cloud product questions.

9393 9505 


9429 9541 

9430- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup): Connect repositories and configure cloud security scans.9542- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup): Connect repositories and configure cloud security scans.

9431 9543 

9544- [Security Review](https://learn.chatgpt.com/docs/security/security-review): Run in-depth security reviews on GitHub pull requests.

9545 

9432- [Threat model](https://learn.chatgpt.com/docs/security/threat-model): Review and improve the threat model for your codebase.9546- [Threat model](https://learn.chatgpt.com/docs/security/threat-model): Review and improve the threat model for your codebase.

9433 9547 

9434- [Codex Security cloud FAQ](https://learn.chatgpt.com/docs/security/faq): Get answers about cloud scans, findings, privacy, and access.9548- [Codex Security cloud FAQ](https://learn.chatgpt.com/docs/security/faq): Get answers about cloud scans, findings, privacy, and access.


15353 15467 

153541. Start Remote setup.154681. Start Remote setup.

15355 15469 

15356 Open the app on the host and select **Set up Remote** in the sidebar.15470 Open the ChatGPT desktop app on the host. Go to **Settings** >

15471 **Connections** > **Control this Mac or PC**, then select **Set up** or

15472 **Add**. Approve remote access and complete any requested verification.

15357 15473 

153582. Scan the QR code.154742. Scan the QR code.

15359 15475 


15369 15485 

153704. Review host settings.154864. Review host settings.

15371 15487 

15372 In the app on the host, use **Settings > Connections** to manage connected15488 In the app on the host, use **Settings** > **Connections** to manage connected

15373 devices. You can also choose whether to keep the computer awake, enable15489 devices. You can also choose whether to keep the computer awake, enable

15374 Computer Use, or install the Chrome extension.15490 Computer Use, or install the Chrome extension.

15375 15491 


16741 Computer Use.16857 Computer Use.

167423. Restart the app and try again.168583. Restart the app and try again.

16743 16859 

16860### Codex Remote

16861 

16862Source: [Codex Remote](https://learn.chatgpt.com/docs/remote.md)

16863 

16864Start, guide, approve, and review Codex tasks on a connected computer from your phone.

16865 

16744### Image generation16866### Image generation

16745 16867 

16746Source: [Image generation](https://learn.chatgpt.com/docs/image-generation.md)16868Source: [Image generation](https://learn.chatgpt.com/docs/image-generation.md)


19988consolidation_model = "gpt-5.6-luna"20110consolidation_model = "gpt-5.6-luna"

19989```20111```

19990 20112 

19991### Codex code review in GitHub

19992 

19993Source: [Codex code review in GitHub](https://learn.chatgpt.com/docs/third-party/github.md)

19994 

19995Use Codex code review to get another high-signal review pass on GitHub pull

19996requests. Codex reviews the pull request diff, follows your repository guidance,

19997and posts a standard GitHub code review focused on serious issues.

19998 

19999#### Before you start

20000 

20001Make sure you have:

20002 

20003- [Codex cloud](https://learn.chatgpt.com/docs/cloud) set up for the repository you want to review.

20004- Access to [Codex code review settings](https://chatgpt.com/codex/settings/code-review).

20005- An `AGENTS.md` file if you want Codex to follow repository-specific review guidance.

20006 

20007#### Set up Codex code review

20008 

200091. Set up [Codex cloud](https://learn.chatgpt.com/docs/cloud).

200102. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

200113. Turn on **Code review** for your repository.

20012 

20013#### Request a Codex review

20014 

200151. In a pull request comment, mention `@codex review`.

200162. Wait for Codex to react (👀) and post a review.

20017 

20018Codex posts a review on the pull request, just like a teammate would. In

20019GitHub, Codex flags only P0 and P1 issues so review comments stay focused on

20020high-priority risks.

20021 

20022#### Enable automatic reviews

20023 

20024If you want Codex to review every pull request automatically, turn on

20025**Automatic reviews** in [Codex settings](https://chatgpt.com/codex/settings/code-review).

20026Codex will post a review whenever someone opens a new PR for review, without

20027needing an `@codex review` comment.

20028 

20029#### Customize what Codex reviews

20030 

20031Codex searches your repository for `AGENTS.md` files and follows the applicable

20032code review rules. Add a `## Code Review Rules` section to the file closest to

20033the code the rules govern. Use `###` headings to group related checks when

20034helpful.

20035 

20036For example, an experiment-reporting service can keep post-exposure behavior

20037from changing a comparison cohort:

20038 

20039```md

20040## Code Review Rules

20041 

20042### Experiment cohorts

20043 

20044- Do not filter treatment comparisons on post-exposure behavior, including conversion or retention.

20045 Safe path: build cohorts from assignment or exposure; report conversion as an outcome.

20046```

20047 

20048Put repository-wide rules in the root `AGENTS.md` and service-specific rules

20049in a nested file, such as `services/experiment_reporting/AGENTS.md`. Codex

20050applies the root and more-specific guidance that covers each changed file, so

20051unrelated changes don't have to carry service-specific context.

20052 

20053Start with two or three concise rules that encode checks reviewers often explain. Useful rules:

20054 

20055- **Focus on consequential, repository-specific behavior.** Describe the

20056 compatibility constraint, data boundary, or unsafe side effect to flag and

20057 why it matters.

20058- **State the safe path or exception.** Give Codex enough context to distinguish

20059 a real issue from expected behavior.

20060- **Keep rules scoped and durable.** Prefer outcomes over function names that

20061 can change, and place guidance near the code it governs.

20062- **Leave mechanical checks in CI.** Keep formatting, lint, and other

20063 deterministic checks out of review rules.

20064 

20065Open a representative pull request and request a review with `@codex review`.

20066Refine the rules based on the findings and feedback you see, and narrow or

20067remove guidance that produces noise.

20068 

20069Code review rules guide Codex; they don't replace tests, branch protections, or

20070required approvals.

20071 

20072For a one-off focus, add it to your pull request comment:

20073 

20074`@codex review for security regressions`

20075 

20076#### Act on review findings

20077 

20078After Codex posts a review, you can ask it to fix issues in the same pull

20079request by leaving another comment:

20080 

20081```md

20082@codex fix the P1 issue

20083```

20084 

20085Codex starts a cloud chat with the pull request as context and can push a fix

20086back to the branch when it has permission to do so.

20087 

20088#### Give Codex other tasks

20089 

20090If you mention `@codex` in a comment with anything other than `review`, Codex starts a [cloud chat](https://learn.chatgpt.com/docs/cloud) using your pull request as context.

20091 

20092```md

20093@codex fix the CI failures

20094```

20095 

20096#### Troubleshoot code review

20097 

20098If Codex doesn't react or post a review:

20099 

20100- Confirm you turned on **Code review** for the repository in [Codex settings](https://chatgpt.com/codex/settings/code-review).

20101- Confirm the pull request belongs to a repository with [Codex cloud](https://learn.chatgpt.com/docs/cloud) set up.

20102- Use the exact trigger `@codex review` in a pull request comment.

20103- For automatic reviews, check that you turned on **Automatic reviews** and that

20104 the pull request event matches your review trigger settings.

20105 

20106### Connect and test your plugin20113### Connect and test your plugin

20107 20114 

20108Source: [Connect and test your plugin](https://developers.openai.com/plugins/deploy/connect-chatgpt.md)20115Source: [Connect and test your plugin](https://developers.openai.com/plugins/deploy/connect-chatgpt.md)


25832);25839);

25833```25840```

25834 25841 

25842### Review GitHub pull requests with Codex

25843 

25844Source: [Review GitHub pull requests with Codex](https://learn.chatgpt.com/docs/third-party/github.md)

25845 

25846Use Codex code review to get another high-signal review pass on GitHub pull

25847requests. Codex reviews the pull request diff, follows your repository guidance,

25848and posts a standard GitHub code review focused on serious issues. Security

25849Review, available in research preview, provides a more in-depth review of

25850potential security issues in a pull request.

25851 

25852#### Before you start

25853 

25854Make sure you have:

25855 

25856- [Codex cloud](https://learn.chatgpt.com/docs/cloud) set up for the repository you want to review.

25857- Access to [Codex code review settings](https://chatgpt.com/codex/settings/code-review).

25858- An `AGENTS.md` file if you want Codex to follow repository-specific review guidance.

25859 

25860#### Set up Codex code review

25861 

25862To configure automatic reviews, you need a connected GitHub repository and

25863GitHub push or admin permission for its settings.

25864 

258651. Set up [Codex cloud](https://learn.chatgpt.com/docs/cloud).

258662. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

258673. Turn on **Code review** for your repository.

25868 

25869#### Request a Codex review

25870 

258711. In a pull request comment, mention `@codex review`.

258722. Wait for Codex to react (👀) and post a review.

25873 

25874Codex posts a review on the pull request, just like a teammate would. In

25875GitHub, Codex flags only P0 and P1 issues so review comments stay focused on

25876high-priority risks.

25877 

25878#### Enable automatic reviews

25879 

25880If you want Codex to review every pull request automatically, turn on

25881**Automatic reviews** in [Codex settings](https://chatgpt.com/codex/settings/code-review).

25882Codex will post a review whenever someone opens a new PR for review, without

25883needing an `@codex review` comment.

25884 

25885#### Customize what Codex reviews

25886 

25887Codex searches your repository for `AGENTS.md` files and follows the applicable

25888code review rules. Add a `## Code Review Rules` section to the file closest to

25889the code the rules govern. Use `###` headings to group related checks when

25890helpful.

25891 

25892For example, an experiment-reporting service can keep post-exposure behavior

25893from changing a comparison cohort:

25894 

25895```md

25896## Code Review Rules

25897 

25898### Experiment cohorts

25899 

25900- Do not filter treatment comparisons on post-exposure behavior, including conversion or retention.

25901 Safe path: build cohorts from assignment or exposure; report conversion as an outcome.

25902```

25903 

25904Put repository-wide rules in the root `AGENTS.md` and service-specific rules

25905in a nested file, such as `services/experiment_reporting/AGENTS.md`. Codex

25906applies the root and more-specific guidance that covers each changed file, so

25907unrelated changes don't have to carry service-specific context.

25908 

25909Start with two or three concise rules that encode checks reviewers often explain. Useful rules:

25910 

25911- **Focus on consequential, repository-specific behavior.** Describe the

25912 compatibility constraint, data boundary, or unsafe side effect to flag and

25913 why it matters.

25914- **State the safe path or exception.** Give Codex enough context to distinguish

25915 a real issue from expected behavior.

25916- **Keep rules scoped and durable.** Prefer outcomes over function names that

25917 can change, and place guidance near the code it governs.

25918- **Leave mechanical checks in CI.** Keep formatting, lint, and other

25919 deterministic checks out of review rules.

25920 

25921Open a representative pull request and request a review with `@codex review`.

25922Refine the rules based on the findings and feedback you see, and narrow or

25923remove guidance that produces noise.

25924 

25925Code review rules guide Codex; they don't replace tests, branch protections, or

25926required approvals.

25927 

25928For a one-off focus, add it to your pull request comment:

25929 

25930`@codex review for issues in the database migration`

25931 

25932#### Security Review

25933 

25934Security Review is an additional review for customers that want to

25935pay particular attention to security issues in pull requests. It goes deeper

25936than Code Review on security-specific risks by analyzing the pull request diff,

25937supporting repository context, and configured threat models or security

25938guidance.

25939 

25940Code Review can also identify security-related issues as part of its general

25941review, so you may see occasional overlap between Code Review and Security

25942Review findings.

25943 

25944#### Set up Security Review

25945 

25946For more detailed setup instructions and configuration options, see [Security

25947Review](https://learn.chatgpt.com/docs/security/security-review).

25948 

259491. Set up [Codex cloud](https://learn.chatgpt.com/docs/cloud).

259502. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

259513. Under **Repository preferences**, choose which pull requests get Security

25952 Review and when it runs. Select **Whenever code review runs** to run it

25953 alongside Code Review.

25954 

25955#### Request a Security Review

25956 

25957To request a Security Review manually, add this comment to a pull request:

25958 

25959`@codex security review`

25960 

25961Codex reacts while the review is running, then posts security findings directly

25962on the pull request. Open the associated Codex task and select the **Security

25963Report** tab to view the full report.

25964 

25965#### Act on review findings

25966 

25967After Codex posts a review, you can ask it to fix issues in the same pull

25968request by leaving another comment:

25969 

25970```md

25971@codex fix the P1 issue

25972```

25973 

25974Codex starts a cloud chat with the pull request as context and can push a fix

25975back to the branch when it has permission to do so.

25976 

25977#### Give Codex other tasks

25978 

25979If you mention `@codex` in a comment with anything other than `review`, Codex starts a [cloud chat](https://learn.chatgpt.com/docs/cloud) using your pull request as context.

25980 

25981```md

25982@codex fix the CI failures

25983```

25984 

25985#### Troubleshoot code review

25986 

25987If Codex doesn't react or post a review:

25988 

25989- Confirm you turned on **Code review** for the repository in [Codex settings](https://chatgpt.com/codex/settings/code-review).

25990- Confirm the pull request belongs to a repository with [Codex cloud](https://learn.chatgpt.com/docs/cloud) set up.

25991- Use the exact trigger `@codex review` in a pull request comment.

25992- For automatic reviews, check that you turned on **Automatic reviews** and that

25993 the pull request event matches your review trigger settings.

25994 

25835### Rules25995### Rules

25836 25996 

25837Source: [Rules](https://learn.chatgpt.com/docs/agent-configuration/rules.md)25997Source: [Rules](https://learn.chatgpt.com/docs/agent-configuration/rules.md)


33462- Feature is currently limited to only specific regions. Check33622- Feature is currently limited to only specific regions. Check

33463 the individual feature documentation to learn more about geo restrictions.33623 the individual feature documentation to learn more about geo restrictions.

33464 33624 

33465 † Local plugin bundles are supported when their capabilities do33625 † Local plugin bundles and OpenAI-curated plugins that don't

33466 not require ChatGPT authentication. OpenAI-curated plugin discovery and33626 require ChatGPT authentication, including Codex Security, are available.

33467 features that depend on connectors or cloud-hosted sharing aren't33627 Plugins that require ChatGPT authentication, connectors, or cloud-hosted

33468 available.33628 sharing aren't available.

33469 33629 

33470#### Troubleshooting33630#### Troubleshooting

33471 33631 

Details

1# Codex code review in GitHub1# Review GitHub pull requests with Codex

2 2 

3> For the complete documentation index, see [llms.txt](https://learn.chatgpt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.3> For the complete documentation index, see [llms.txt](https://learn.chatgpt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

4 4 

5Use Codex code review to get another high-signal review pass on GitHub pull5Use Codex code review to get another high-signal review pass on GitHub pull

6requests. Codex reviews the pull request diff, follows your repository guidance,6requests. Codex reviews the pull request diff, follows your repository guidance,

7and posts a standard GitHub code review focused on serious issues.7and posts a standard GitHub code review focused on serious issues. Security

8Review, available in research preview, provides a more in-depth review of

9potential security issues in a pull request.

8 10 

9<YouTubeEmbed11<YouTubeEmbed

10 title="Codex code review walkthrough"12 title="Codex code review walkthrough"


24 26 

25## Set up Codex code review27## Set up Codex code review

26 28 

29To configure automatic reviews, you need a connected GitHub repository and

30GitHub push or admin permission for its settings.

31 

271. Set up [Codex cloud](https://learn.chatgpt.com/docs/cloud).321. Set up [Codex cloud](https://learn.chatgpt.com/docs/cloud).

282. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).332. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

293. Turn on **Code review** for your repository.343. Turn on **Code review** for your repository.


122 127 

123For a one-off focus, add it to your pull request comment:128For a one-off focus, add it to your pull request comment:

124 129 

125`@codex review for security regressions`130`@codex review for issues in the database migration`

131 

132## Security Review

133 

134Security Review is an additional review for customers that want to

135pay particular attention to security issues in pull requests. It goes deeper

136than Code Review on security-specific risks by analyzing the pull request diff,

137supporting repository context, and configured threat models or security

138guidance.

139 

140Code Review can also identify security-related issues as part of its general

141review, so you may see occasional overlap between Code Review and Security

142Review findings.

143 

144### Set up Security Review

145 

146For more detailed setup instructions and configuration options, see [Security

147Review](https://learn.chatgpt.com/docs/security/security-review).

148 

1491. Set up [Codex cloud](https://learn.chatgpt.com/docs/cloud).

1502. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

1513. Under **Repository preferences**, choose which pull requests get Security

152 Review and when it runs. Select **Whenever code review runs** to run it

153 alongside Code Review.

154 

155### Request a Security Review

156 

157To request a Security Review manually, add this comment to a pull request:

158 

159`@codex security review`

160 

161Codex reacts while the review is running, then posts security findings directly

162on the pull request. Open the associated Codex task and select the **Security

163Report** tab to view the full report.

126 164 

127## Act on review findings165## Act on review findings

128 166 

remote.md +65 −0 created

Details

1# Codex Remote

2 

3> For the complete documentation index, see [llms.txt](https://learn.chatgpt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

4 

5## Start, guide, and review coding tasks from your phone

6 

7Follow progress, approve actions, and send instructions from your phone. Codex runs each task on your connected computer.

8 

9Use the ChatGPT mobile app with a connected Mac or Windows PC. Availability depends on rollout and your workspace settings.

10 

11> Illustration: Interactive Codex Remote mobile app showing connected computers, tasks, conversations, approvals, and changed files

12 

13### Start here

14 

15- [Set up Remote](#set-up-remote)

16- [Remote connections guide](https://learn.chatgpt.com/docs/remote-connections)

17 

18## Codex Remote advantages

19 

20- **Start tasks from your phone:** Choose a connected computer and project, describe the task, and let Codex get to work.

21- **Guide work as it happens:** Open a task, follow its progress, and send new instructions without returning to your desk.

22- **Approve requested actions:** Review requested commands and actions before Codex continues on your connected computer.

23- **Review the result:** Inspect responses, changed files, diffs, and test results, then decide what happens next.

24 

25## Get started with Remote

26 

27Connect your computer, approve access, and start your first task.

28 

291. **Start setup on your computer.** Open the ChatGPT desktop app on your Mac or Windows PC. Go to **Settings** > **Connections** > **Control this Mac or PC** and select **Set up** or **Add**. Approve remote access and complete any requested verification.

302. **Scan the QR code.** Scan the code with your phone, sign in to the same ChatGPT account and workspace, and approve the connection. Only connect devices you own and trust.

313. **Start working from your phone.** Open **Remote** in the ChatGPT mobile app, choose your connected computer, and start a new task or continue an existing one. Keep your computer awake and online.

32 

33## Keep work moving from anywhere

34 

35Start, approve, and review tasks from your phone. Your connected computer runs the work under your organization’s security policies.

36 

37### 1. See tasks running on your computer

38 

39Follow active tasks across connected computers, pick up existing conversations, and see when your input is needed.

40 

41> Illustration: Codex Remote task list showing active tasks on a connected computer

42 

43### 2. Approve requests

44 

45Review commands and requested actions before Codex continues working on your connected computer.

46 

47> Illustration: Codex Remote approval request for a terminal command

48 

49### 3. Review changed code

50 

51Inspect changed files and diffs from your phone before deciding what happens next.

52 

53> Illustration: Codex Remote changed-files review with code differences

54 

55### 4. Start new tasks

56 

57Choose a connected computer and project, describe the task, and let Codex get to work.

58 

59> Illustration: Codex Remote new-task composer for a connected computer

60 

61## Explore setup and security

62 

63Learn about computer requirements, device management, permissions, and troubleshooting.

64 

65[Read the Remote connections guide](https://learn.chatgpt.com/docs/remote-connections)

Details

78 78 

791. Start Remote setup.791. Start Remote setup.

80 80 

81 Open the app on the host and select **Set up Remote** in the sidebar.81 Open the ChatGPT desktop app on the host. Go to **Settings** >

82 **Connections** > **Control this Mac or PC**, then select **Set up** or

83 **Add**. Approve remote access and complete any requested verification.

82 84 

832. Scan the QR code.852. Scan the QR code.

84 86 


94 96 

954. Review host settings.974. Review host settings.

96 98 

97 In the app on the host, use **Settings > Connections** to manage connected99 In the app on the host, use **Settings** > **Connections** to manage connected

98 devices. You can also choose whether to keep the computer awake, enable100 devices. You can also choose whether to keep the computer awake, enable

99 Computer Use, or install the Chrome extension.101 Computer Use, or install the Chrome extension.

100 102 

security.md +1 −0

Details

117- [Codex Security CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq) answers common questions about scans, findings, coverage, and costs.117- [Codex Security CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq) answers common questions about scans, findings, coverage, and costs.

118- [Codex Security TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) explains how to run scans from an application or developer tool.118- [Codex Security TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) explains how to run scans from an application or developer tool.

119- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup) details setup, scanning, and findings review.119- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup) details setup, scanning, and findings review.

120- [Security Review](https://learn.chatgpt.com/docs/security/security-review) explains how to run in-depth security reviews on GitHub pull requests.

120- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to tune scope, entry points, and criticality assumptions.121- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to tune scope, entry points, and criticality assumptions.

121- [Codex Security cloud FAQ](https://learn.chatgpt.com/docs/security/faq) covers common cloud product questions.122- [Codex Security cloud FAQ](https://learn.chatgpt.com/docs/security/faq) covers common cloud product questions.

Details

95 href: "/codex/security/setup",95 href: "/codex/security/setup",

96 icon: "storage",96 icon: "storage",

97 },97 },

98 {

99 title: "Security Review",

100 description: "Run in-depth security reviews on GitHub pull requests.",

101 href: "/codex/security/security-review",

102 icon: "shieldCheck",

103 },

98 {104 {

99 title: "Threat model",105 title: "Threat model",

100 description: "Review and improve the threat model for your codebase.",106 description: "Review and improve the threat model for your codebase.",

security/cli.md +4 −24

Details

26npm install @openai/codex-security26npm install @openai/codex-security

27```27```

28 28 

29Check the installed version:

30 

31```bash

32npx @openai/codex-security --version

33```

34 

35List the available commands:29List the available commands:

36 30 

37```bash31```bash

38npx @openai/codex-security --help32npx @openai/codex-security --help

39```33```

40 34 

41Use `npx @openai/codex-security scan --help` or35See also [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference).

42`npx @openai/codex-security export --help` for complete command help. The

43[CLI reference](https://learn.chatgpt.com/docs/security/cli/reference) covers each argument, output

44format, and exit code.

45 36 

46## Sign in37## Sign in

47 38 


63export OPENAI_API_KEY="<your-api-key>"54export OPENAI_API_KEY="<your-api-key>"

64```55```

65 56 

66Keep API keys in your shell or secret manager. Codex Security can also reuse an57For AWS credentials, see [Amazon Bedrock

67existing file-backed Codex sign-in. When both a stored ChatGPT sign-in and an58setup](https://learn.chatgpt.com/docs/security/cli/reference#use-amazon-bedrock).

68environment API key are available, interactive scans with text output ask

69which to use. CI, JSON and JSONL scans, and other unattended scans use the

70API key by default.

71 59 

72To use your ChatGPT sign-in when an API key is also set, select it explicitly:60To use your ChatGPT sign-in when an API key is also set, select it explicitly:

73 61 


81npx @openai/codex-security scan . --auth api-key69npx @openai/codex-security scan . --auth api-key

82```70```

83 71 

84To make your stored sign-in the automatic default, unset both environment API

85keys:

86 

87```bash

88unset OPENAI_API_KEY CODEX_API_KEY

89```

90 

91Depending on your account and repository, full-repository scans may also72Depending on your account and repository, full-repository scans may also

92require [Trusted Access for Cyber](https://chatgpt.com/cyber). Signing in or73require [Trusted Access for Cyber](https://chatgpt.com/cyber).

93setting an API key doesn't grant that access.

94 74 

95## Prepare a scan75## Prepare a scan

96 76 

Details

113 113 

114```text114```text

115usage: codex-security scan [-h] [--auth {auto,chatgpt,api-key}]115usage: codex-security scan [-h] [--auth {auto,chatgpt,api-key}]

116 [--provider {openai,openrouter,fireworks,amazon-bedrock}]

116 [--path PATH | --diff BASE | --working-tree]117 [--path PATH | --diff BASE | --working-tree]

117 [--head HEAD] [--base BASE]118 [--head HEAD] [--base BASE]

118 [--knowledge-base PATH]119 [--knowledge-base PATH]


122 [--archive-existing]123 [--archive-existing]

123 [--plugin-path PATH] [--python PATH]124 [--plugin-path PATH] [--python PATH]

124 [--codex KEY=VALUE] [--fail-on-severity LEVEL]125 [--codex KEY=VALUE] [--fail-on-severity LEVEL]

125 [--max-cost USD] [--dry-run]126 [--max-cost USD] [--dry-run] [--verbose]

126 [--json] [--format {toon,json,yaml,jsonl}]127 [--json] [--format {toon,json,yaml,jsonl}]

127 [--full-output] [repository]128 [--full-output] [repository]

128```129```


152To make stored credentials the automatic default, run153To make stored credentials the automatic default, run

153`unset OPENAI_API_KEY CODEX_API_KEY`.154`unset OPENAI_API_KEY CODEX_API_KEY`.

154 155 

156### Use Amazon Bedrock

157 

158Select Amazon Bedrock with `--provider amazon-bedrock` and specify an explicit

159Bedrock model with `--model`:

160 

161```bash

162npx @openai/codex-security scan . \

163 --provider amazon-bedrock \

164 --model openai.gpt-5.6-sol

165```

166 

167Set `AWS_REGION` and authenticate with `AWS_BEARER_TOKEN_BEDROCK`, standard AWS

168access keys, an AWS profile, web identity, container credentials, or the

169default AWS credential chain. Bedrock scans use AWS credentials instead of

170`--auth`, ChatGPT sign-in, or an OpenAI API key. Both `scan` and `bulk-scan`

171support `--provider`.

172 

155### Select the scan target173### Select the scan target

156 174 

157Choose one target type for each scan.175Choose one target type for each scan.


230| `--fail-on-severity LEVEL` | Return exit `1` when a completed scan reports a finding at or above `critical`, `high`, `medium`, or `low`. |248| `--fail-on-severity LEVEL` | Return exit `1` when a completed scan reports a finding at or above `critical`, `high`, `medium`, or `low`. |

231| `--max-cost USD` | Stop a scan when its estimated model cost exceeds the specified USD amount. |249| `--max-cost USD` | Stop a scan when its estimated model cost exceeds the specified USD amount. |

232| `--dry-run` | Check the repository, target, output directory, and Codex configuration without starting a scan. |250| `--dry-run` | Check the repository, target, output directory, and Codex configuration without starting a scan. |

251| `--verbose` | Print redacted lifecycle, authentication, progress, and cost diagnostics to stderr. |

233| `--json` | Print manifest, findings, coverage, paths, and turn metadata as one JSON document. |252| `--json` | Print manifest, findings, coverage, paths, and turn metadata as one JSON document. |

234| `--format FORMAT` | Print the complete scan result as `toon`, `json`, `yaml`, or `jsonl`. |253| `--format FORMAT` | Print the complete scan result as `toon`, `json`, `yaml`, or `jsonl`. |

235| `--full-output` | Print the complete result using the default structured output format. |254| `--full-output` | Print the complete result using the default structured output format. |


287Codex configuration value.306Codex configuration value.

288 307 

289| Argument | Description |308| Argument | Description |

290| ------------------------------------------ | -------------------------------------------------------------------------------------------------------- |309| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |

291| `--auth {auto,chatgpt,api-key}` | Select the scan credentials. The default is `auto`. |310| `--auth {auto,chatgpt,api-key}` | Select the scan credentials. The default is `auto`. |

292| `--model MODEL` | Select the OpenAI model. The default is `gpt-5.6-sol`. |311| `--provider {openai,openrouter,fireworks,amazon-bedrock}` | Select the inference provider. The default is `openai`. |

312| `--model MODEL` | Select the model. The default is `gpt-5.6-sol`. Required with `--provider amazon-bedrock`. |

293| `--effort {minimal,low,medium,high,xhigh}` | Select the model's reasoning effort. The default is `xhigh`. |313| `--effort {minimal,low,medium,high,xhigh}` | Select the model's reasoning effort. The default is `xhigh`. |

294| `--plugin-path PATH` | Use a Codex Security plugin directory or ZIP to override the bundled plugin. |314| `--plugin-path PATH` | Use a Codex Security plugin directory or ZIP to override the bundled plugin. |

295| `--python PATH` | Select the Python interpreter for the plugin runtime. |315| `--python PATH` | Select the Python interpreter for the plugin runtime. |


337```text357```text

338usage: codex-security bulk-scan [input] [--output-dir DIR]358usage: codex-security bulk-scan [input] [--output-dir DIR]

339 [--workers N] [--mode {standard,deep}]359 [--workers N] [--mode {standard,deep}]

360 [--provider {openai,openrouter,fireworks,amazon-bedrock}]

340 [--model MODEL]361 [--model MODEL]

341 [--effort {minimal,low,medium,high,xhigh}]362 [--effort {minimal,low,medium,high,xhigh}]

342 [--max-attempts N] [--plugin-path PATH]363 [--max-attempts N] [--plugin-path PATH]


618without writing the complete scan result to stdout. Request `--json`,639without writing the complete scan result to stdout. Request `--json`,

619`--format`, or `--full-output` to send structured scan results to stdout.640`--format`, or `--full-output` to send structured scan results to stdout.

620 641 

642### Verbose diagnostics

643 

644Add `--verbose` to print redacted lifecycle, authentication, progress, and cost

645diagnostics to stderr:

646 

647```bash

648npx @openai/codex-security scan . --verbose

649```

650 

651Set `CODEX_SECURITY_LOG_LEVEL=debug` to enable the same diagnostics without the

652flag. `LOG_LEVEL=debug` also enables diagnostics when

653`CODEX_SECURITY_LOG_LEVEL` is unset.

654 

655These logging controls apply only to the CLI. Credentials and provider

656identifiers remain redacted, and structured scan results remain on stdout.

657 

621### Completion summary658### Completion summary

622 659 

623A completed scan writes its finding count, severity breakdown, coverage,660A completed scan writes its finding count, severity breakdown, coverage,


721 758 

722Set `OPENAI_API_KEY` or `CODEX_API_KEY`, sign in with759Set `OPENAI_API_KEY` or `CODEX_API_KEY`, sign in with

723`npx @openai/codex-security login`, or use an existing file-backed Codex760`npx @openai/codex-security login`, or use an existing file-backed Codex

724sign-in.761sign-in. For Amazon Bedrock, use a Bedrock API key or the standard AWS

762credential chain instead.

725 763 

726For credential selection, see [Select scan764For credential selection, see [Select scan

727authentication](#select-scan-authentication).765authentication](#select-scan-authentication).

security/sdk.md +7 −3

Details

24npm install @openai/codex-security24npm install @openai/codex-security

25```25```

26 26 

27Before starting a scan, set `OPENAI_API_KEY` or `CODEX_API_KEY`, or use an27Before starting a scan, set `OPENAI_API_KEY` or `CODEX_API_KEY`, use an

28existing file-backed Codex sign-in.28existing file-backed Codex sign-in, or [configure Amazon

29Bedrock](#configure-the-runtime-and-credentials) with AWS credentials and

30explicit `model_provider` and `model` overrides.

29 31 

30For best results, use an account verified for [Trusted Access for32For best results, use an account verified for [Trusted Access for

31Cyber](https://chatgpt.com/cyber). Signing in or providing an API key does not33Cyber](https://chatgpt.com/cyber). Signing in or providing an API key does not


351plugin interpreter. `codexOverrides` merges supported values into the isolated353plugin interpreter. `codexOverrides` merges supported values into the isolated

352Codex configuration. Scans use `gpt-5.6-sol` with extra-high reasoning effort354Codex configuration. Scans use `gpt-5.6-sol` with extra-high reasoning effort

353by default. Set `model` and `model_reasoning_effort` in `codexOverrides` to use355by default. Set `model` and `model_reasoning_effort` in `codexOverrides` to use

354a different model or reasoning effort.356a different model or reasoning effort. To use [Amazon

357Bedrock](https://learn.chatgpt.com/docs/security/cli/reference#use-amazon-bedrock), set

358`model_provider` and `model` in `codexOverrides`.

355 359 

356The client also exposes supported authentication methods:360The client also exposes supported authentication methods:

357 361 

security/security-review.md +86 −0 created

Details

1# Security Review

2 

3> For the complete documentation index, see [llms.txt](https://learn.chatgpt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

4 

5Security Review is available in research preview.

6It is available to ChatGPT Enterprise, Business, Edu, and Pro customers; it is

7not available on Plus. During the introductory period, Security Review does not

8consume ChatGPT credits. Usage limits may apply.

9 

10Security Review is an additional review for customers that want to

11pay particular attention to security issues in pull requests.

12 

13Security Review goes deeper than [Code

14Review](https://learn.chatgpt.com/docs/third-party/github) on security-specific risks by analyzing the

15pull request diff, supporting repository context, and configured threat models

16or security guidance. Code Review can also identify security-related issues as

17part of its general review, so you may see occasional overlap between findings.

18 

19## Before you start

20 

21To configure automatic Security Review, you need:

22 

23- Security Review research preview access for your workspace

24- [Codex cloud](https://learn.chatgpt.com/docs/cloud) set up with a connected GitHub repository

25- GitHub push or admin permission for the repository settings

26 

27An existing Codex Security scan is optional.

28 

29## Configure Security Review

30 

311. Go to [Codex settings](https://chatgpt.com/codex/settings/code-review).

322. Under **Repository preferences**, choose which pull requests get Security

33 Review:

34 - **Follow personal** lets each contributor opt in with their personal

35 Security Review settings.

36 - **Review all PRs** applies to every pull request in the repository.

37 - **Review team PRs**, when available, applies to pull requests opened by

38 members of your ChatGPT workspace, not members of a GitHub team.

393. Choose when Security Review runs:

40 - **On PR open** runs independently when a pull request is opened.

41 - **Every push** runs independently after new commits are pushed.

42 - **Whenever code review runs** requires Code Review and runs Security Review

43 alongside it.

44 

45## Add threat-model context

46 

47You can configure a threat model to give Codex context about your application's

48assets, trust boundaries, security assumptions, and repository-specific risks.

49If the repository has an existing Codex Security scan configuration, you can use

50its threat model. Otherwise, provide the path to a threat model file checked

51into the repository. If you do not specify a source, Codex regenerates the

52threat model for every review.

53 

54## Set reporting thresholds

55 

56By default, automatic Security Reviews report **High** and **Critical**

57findings, while manually requested reviews report **Medium**, **High**, and

58**Critical** findings. You can change the minimum severity independently for

59automatic and manual reviews, and add path-based overrides.

60 

61Findings posted to a pull request inherit that pull request's GitHub

62visibility. Anyone who can view the pull request can view those findings,

63including on public repositories or pull requests from contributors outside

64your workspace. Choose reporting thresholds carefully for repositories where

65pull request comments may be broadly visible. The reporting threshold controls

66what Codex posts to GitHub; the full Security Review report remains in Codex.

67 

68## Request a Security Review

69 

70To request a Security Review manually, add this comment to a pull request:

71 

72`@codex security review`

73 

74Codex reacts while the review is running, then posts findings that meet your

75manual reporting threshold directly on the pull request. Open the associated

76Codex task and select the **Security Report** tab to view the full report,

77including severity, attack path, supporting evidence, validation, and

78remediation guidance. If no issues meet the reporting threshold, Codex does not

79post findings to the pull request.

80 

81## Related docs

82 

83- [Review GitHub pull requests with Codex](https://learn.chatgpt.com/docs/third-party/github) explains Code Review and the GitHub integration.

84- [Codex Security](https://learn.chatgpt.com/docs/security) gives the product overview.

85- [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup) explains repository scans and findings review.

86- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to tune repository context.