SpyBara
Go Premium

Documentation 2026-10-15 23:00 UTC to 2026-10-16 23:02 UTC

36 files changed +2,416 −1,598. View all changes and history on the product overview
2026
Fri 30 23:59 Thu 29 23:59 Wed 28 23:00 Tue 27 23:58 Mon 26 23:58 Fri 23 23:59 Thu 22 23:57 Tue 20 23:02 Mon 19 23:02 Sat 17 23:00 Fri 16 23:02 Thu 15 23:00 Wed 14 23:59 Tue 13 23:01 Mon 12 23:01 Fri 9 23:02 Thu 8 23:01 Wed 7 23:57 Tue 6 23:02 Mon 5 23:57 Fri 2 23:58 Thu 1 22:59
Details

153 "Deploy apps and configure updates, runtime settings, remote connections, and model access.",153 "Deploy apps and configure updates, runtime settings, remote connections, and model access.",

154 pages: [154 pages: [

155 {155 {

156 title: "Windows app deployment",156 title: "Windows app and CLI deployment",

157 description:157 description:

158 "Choose an installation and update path for managed Windows devices.",158 "Deploy the Windows app and Codex CLI on managed Windows devices.",

159 href: "/codex/enterprise/windows-deployment",159 href: "/codex/enterprise/windows-deployment",

160 icon: "settings",160 icon: "settings",

161 },161 },


173 href: "/codex/enterprise/managed-configuration",173 href: "/codex/enterprise/managed-configuration",

174 icon: "dataControls",174 icon: "dataControls",

175 },175 },

176 {

177 title: "Codex security cookbook",

178 description:

179 "Configure and verify enterprise security controls, then combine them for common security goals.",

180 href: "/codex/enterprise/security-cookbook",

181 icon: "dataControls",

182 },

176 {183 {

177 title: "Remote connections",184 title: "Remote connections",

178 description: "Start and control work on connected computers.",185 description: "Start and control work on connected computers.",

dots/channels.md +54 −0

Details

36 36 

37 37 

38 38 

39## iOS widgets and shortcuts

40 

41Open your dot from your iPhone Home Screen, or use Apple Shortcuts to choose how to start a conversation. Use the latest ChatGPT iOS app and sign in to the account where you set up your dot. These features are rolling out with ChatGPT for iOS 1.2026.279 and require [dot access](https://learn.chatgpt.com/docs/dots#access).

42 

43### Add the Your dot widget

44 

45 

46 

47

48 

49

50 

51> Illustration: The small Your dot widget with Alfred's yellow character above his name and shortcut buttons hidden.

52 

53 

54

55 

56 

57The **Your dot** widget shows your dot's name and appearance in a small Home Screen widget.

58 

591. Touch and hold an empty area of your Home Screen, then select **Edit** > **Add Widget**.

602. Find **ChatGPT**, choose **Your dot**, and select **Add Widget**.

613. Place the widget, then select **Done**.

62 

63 

64 

65 

66Tap your dot to open its conversation with the message composer ready. For example, open it after a meeting to add a decision to work you're already doing together.

67 

68To add message and call controls, touch and hold the widget, select **Edit Widget**, and turn on **Show shortcut buttons**. This setting is off by default. The message button opens the composer. The phone button appears when calling is available and starts a call or returns to an active one.

69 

70If the widget asks you to sign in or set up your dot, open ChatGPT and complete that step. Adding a widget doesn't grant dot access to an account that doesn't have it.

71 

72### Create an Apple shortcut

73 

74ChatGPT provides one **Open your dot** action with three **Mode** choices:

75 

76| Mode | What it does |

77| ------------- | ------------------------------------------------------------------------ |

78| **Messaging** | Opens your dot's conversation for typing a message. This is the default. |

79| **Dictation** | Starts speech-to-text input for a message to your dot. |

80| **Call** | Starts a live voice conversation or returns to an active call. |

81 

821. Open Apple's **Shortcuts** app and create a new shortcut.

832. Add an action, search for **Open your dot**, and select the ChatGPT action.

843. Select your dot and choose a **Mode**.

854. Name and save the shortcut, then run it to open ChatGPT in that mode.

86 

87For example, save a shortcut named “Talk to my dot” with **Call** mode for a spoken progress check. Use **Dictation** for a quick spoken note instead. Dictation isn't available during an active call.

88 

89On an iPhone with an Action button, open **Settings** > **Action Button**, choose **Shortcut**, then **Choose a Shortcut** and select your saved shortcut. You can also run a saved shortcut from Apple's Shortcuts Home Screen widget.

90 

91The action opens ChatGPT and requires authentication. If you switch accounts and a saved shortcut says the dot is no longer available, sign in to the account that owns it.

92 

39## Texting93## Texting

40 94 

41Texting is coming soon.95Texting is coming soon.

Details

1# Manage ChatGPT Space and shared pages1# Manage ChatGPT Space, pages, and slides

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 


35 35 

36## What is ChatGPT Space?36## What is ChatGPT Space?

37 37 

38ChatGPT Space (formerly Library) brings together pages, uploaded files, and shared content so people and agents can collaborate. Teams can draft documents, [edit pages](https://learn.chatgpt.com/docs/space/pages#revise-the-content), or [ask ChatGPT for revisions](https://learn.chatgpt.com/docs/space/agents#start-with-a-bounded-request).38ChatGPT Space (formerly Library) brings together pages, slide decks, uploaded files, and shared content so people and agents can collaborate. Teams can draft documents, [edit pages](https://learn.chatgpt.com/docs/space/pages#revise-the-content), [create presentations](https://learn.chatgpt.com/docs/space/getting-started#create-and-refine-slides), or [ask ChatGPT for revisions](https://learn.chatgpt.com/docs/space/agents#start-with-a-bounded-request).

39 39 

40For product guidance, see the [ChatGPT Space guide](https://learn.chatgpt.com/docs/space) and [Help Center guidance on Library files](https://help.openai.com/en/articles/20001052-using-library-to-manage-files-in-chatgpt).40For product guidance, see the [ChatGPT Space guide](https://learn.chatgpt.com/docs/space) and [Help Center guidance on Library files](https://help.openai.com/en/articles/20001052-using-library-to-manage-files-in-chatgpt).

41 41 


67 67 

68Uploads follow the page’s permissions. Linked source files retain their own permissions. Content copied or summarized onto a page is visible to its collaborators.68Uploads follow the page’s permissions. Linked source files retain their own permissions. Content copied or summarized onto a page is visible to its collaborators.

69 69 

70## Help users create and share slides

71 

72ChatGPT Slides lets members create and edit presentations in Space with ChatGPT and their teammates. Slides uses the same access setting as Space and pages. For workspace sharing guidance, see [Space sharing, data, and controls](https://help.openai.com/en/articles/20001544-chatgpt-space-sharing-data-and-controls).

73 

74Members can share a deck with view or edit access. People with edit access can revise the same deck together and discuss changes in shared comments. See [Collaborate on slides](https://learn.chatgpt.com/docs/space/collaboration#collaborate-on-slides) for permissions and feedback.

75 

76If the Windows desktop app creates a PowerPoint file instead of a collaborative deck, direct the member to cloud mode or ChatGPT on the web. For the full workflow, see [Create and refine slides](https://learn.chatgpt.com/docs/space/getting-started#create-and-refine-slides). For platform requirements, see [Creating and collaborating on slides in ChatGPT](https://help.openai.com/articles/20001605) in the Help Center.

77 

70 78 

71 79 

72 80 

Details

22 22 

23## Connect Prisma AIRS23## Connect Prisma AIRS

24 24 

251. Open [Codex Data controls](https://chatgpt.com/codex/cloud/settings/data) as251. Open [Admin Console](https://admin.openai.com)

26 a workspace administrator.26 as a workspace administrator and select your workspace.

272. Under **External guardrails**, find **Prisma AIRS**. If this section isn't272. Under **Policy & security**, select **External guardrails** and find

28 available, ask your OpenAI account team to enable access for your workspace.28 **Prisma AIRS**. If this entry isn't available, ask your OpenAI account team

29 to enable access for your workspace.

293. Enter your **API key**, **Security profile** name or ID, and **Endpoint303. Enter your **API key**, **Security profile** name or ID, and **Endpoint

30 URL**.31 URL**.

314. Choose an **Enforcement mode** and the behavior **On AIRS failure**.324. Choose an **Enforcement mode** and the behavior **On AIRS failure**.


87 88 

88## Manage the connection89## Manage the connection

89 90 

90Return to [Codex Data controls](https://chatgpt.com/codex/cloud/settings/data)91Return to [Admin Console](https://admin.openai.com),

92select your workspace, and open **Policy & security** > **External guardrails**

91to manage the integration:93to manage the integration:

92 94 

93- Select **Test connection** to verify your saved API key, security profile,95- Select **Test connection** to verify your saved API key, security profile,


99- Select **Disconnect**, then confirm, to stop scanning and delete the saved101- Select **Disconnect**, then confirm, to stop scanning and delete the saved

100 connection and API key.102 connection and API key.

101 103 

104### Disable or disconnect without a sidebar entry

105 

106If **External guardrails** doesn't appear for a workspace with a saved

107configuration, a workspace administrator can open the limited recovery view at

108`https://admin.openai.com/workspace/<workspace-id>/external-guardrails`.

109Replace `<workspace-id>` with the workspace ID from your Admin Console URL.

110 

111This view lets you see the saved configuration, turn off **Enable Prisma AIRS**,

112or select **Disconnect** and confirm. It doesn't allow setup, configuration

113changes, connection testing, key rotation, or turning the integration back on.

114Contact your OpenAI account team to restore configuration access.

115 

102For broader workspace setup and policy management, see the116For broader workspace setup and policy management, see the

103[Admin rollout guide](https://learn.chatgpt.com/docs/enterprise/admin-setup) and117[Admin rollout guide](https://learn.chatgpt.com/docs/enterprise/admin-setup) and

104[Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration).118[Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration).

enterprise/security-cookbook.md +1275 −0 created

Details

1# Codex security cookbook

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<noscript>

6

7</noscript>

8 

9Rolling out Codex means deciding which accounts, files, and services it should be able to access and which actions it should be able to take. This cookbook helps enterprise administrators turn those decisions into configuration, test the results, and understand where additional protections are needed.

10 

11These security recommendations are intended to help you give developers useful access to Codex while reducing the risk of unintended changes, exposure of sensitive data, and changes to the safeguards themselves. Use them to choose controls that fit your workflows and risk requirements, understand their limits, and verify how they work in your environment. They complement the identity, endpoint, network, and service protections your organization already manages.

12 

13You can start with a specific task—such as restricting sign-in to your company workspace—or a broader goal, such as letting developers use Codex while protecting production.

14 

15Choose the starting point that fits your work:

16 

17- **Configuration recipes** walk through individual controls, with setup instructions, verification checks, rollback guidance, and limitations.

18 

19- **Combined recipes** show how to combine several controls with protections in your identity, source control, deployment, and other systems to meet a common security goal.

20 

21The examples give you a starting point to adapt to your organization. Use each configuration example with its accompanying guidance: where it belongs, which clients or environments it applies to, and what it does and does not control.

22 

23Before a wider rollout, try the configuration on a test endpoint. Check that an intended workflow succeeds and an intentionally restricted action is blocked. Use those results to refine the setup and explain the boundaries to the people who will use Codex.

24 

25## Choose your starting point

26 

27Use the page outline to open a section below.

28 

29| If you want to | Start with |

30| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |

31| Configure one specific control | [Configuration recipes](#configuration-recipes) |

32| Let developers use Codex while protecting production | [Let developers use Codex while protecting production](#let-developers-use-codex-while-protecting-production) |

33| Reduce the risk of publishing internal code | [Reduce the risk of publishing internal code](#reduce-the-risk-of-publishing-internal-code) |

34| Keep Codex from changing its own safeguards | [Keep Codex from changing its own safeguards](#keep-codex-from-changing-its-own-safeguards) |

35 

36The combined recipes include the relevant controls, external protections, and checks for each goal.

37 

38## Start here

39 

401. Inventory the surfaces in scope: desktop app, CLI, IDE extension, Codex Cloud, CI runners, and remote hosts.

41 

422. Pilot the configuration on a test endpoint before a broad rollout.

43 

443. Record the minimum supported Codex version. Permission-profile allowlists require Codex 0.138.0 or later.

45 

464. Keep a rollback copy of each managed configuration bundle.

47 

485. Test one allowed workflow and one intentionally blocked workflow after every change.

49 

50Managed requirements are admin-enforced constraints; managed defaults are startup values. Use requirements for supported authentication, sandbox, approval, MCP, plugin, hook, and network restrictions. Authentication requirements must be delivered locally or through macOS MDM; cloud-managed requirements do not enforce them. See [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration) and the [Configuration Reference](https://learn.chatgpt.com/docs/config-file/config-reference).

51 

52### Where configuration belongs

53 

54Adapt these example configurations to your organization before rolling them out to a pilot group. The TOML blocks are policy fragments: merge the settings you need into your existing files, without duplicating tables, and replace example names, domains, and paths. The checks describe expected outcomes to validate in your environment.

55 

56For local Codex, an administrator can deploy enforced requirements in `/etc/codex/requirements.toml` on macOS and Linux or `%ProgramData%\OpenAI\Codex\requirements.toml` on Windows. On managed macOS devices, an MDM can deliver the `com.openai.codex:requirements_toml_base64` preference. Cloud-managed policy can also be configured in the Admin Console under **Agent Security** by selecting a policy, choosing the applicable environment or OS, and configuring **Requirements**. Protect the policy file and its parent directory from modification by the Codex user. Settings in a regular `config.toml` or managed Defaults provide startup values rather than enforced requirements. See [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration) and [Agent Security](https://learn.chatgpt.com/docs/enterprise/agent-security).

57 

58## Configuration recipes

59 

60Choose the control you need. Open a recipe to see its configuration, verification checks, rollback guidance, and limitations. Check items as you verify them; progress is saved in this browser when browser storage is available.

61 

62| Control | Recipe |

63| --------------------- | --------------------------------------------------------------------------------------------- |

64| Authentication | [Restrict sign-in to the company workspace](#restrict-sign-in-to-the-company-workspace) |

65| Runtime permissions | [Restrict permission profiles and Full Access](#restrict-permission-profiles-and-full-access) |

66| MCP servers | [Allow only approved MCP servers](#allow-only-approved-mcp-servers) |

67| Monitoring and audit | [Monitor Codex activity](#monitor-codex-activity) |

68| Networking | [Restrict network destinations](#restrict-network-destinations) |

69| Files and credentials | [Protect secrets and unrelated repositories](#protect-secrets-and-unrelated-repositories) |

70| Sensitive commands | [Require approval for sensitive commands](#require-approval-for-sensitive-commands) |

71 

72 

73 

74<a id="restrict-sign-in-to-the-company-workspace"></a>

75 

76 

77 

78### Restrict sign-in to the company workspace

79 

80 

81 

82<PersistentChecklist client:load id="codex-security-cookbook-restrict-sign-in-to-the-company-workspace" itemIds={["sign-out-of-codex", "try-a-personal-chatgpt-account-expected-personal-workspace-rejected", "try-codex-apikey-login-expected-rejected", "sign-in-with-the-corporate-account-and-approved-workspace", "restart-the-desktop-app-cli-and-ide-extension-then"]} description="This browser could not save your verification progress.">

83 

84Use this recipe when employees should sign in to Codex through your company’s ChatGPT workspace, with personal ChatGPT accounts and API-key authentication prohibited on managed endpoints.

85 

86> **Intended result**

87>

88> On company-managed devices, Codex accepts only ChatGPT sign-in to the company’s ChatGPT workspace.

89 

90#### Prerequisites

91 

92- The UUID of the approved ChatGPT Enterprise workspace.

93 

94- A way to distribute Codex managed configuration to endpoints.

95 

96- A decision to prohibit API-key authentication on managed endpoints.

97 

98#### Configure

99 

1001. Record the approved workspace UUID in your internal configuration repository.

101 

1022. Add enforced authentication requirements to the local `requirements.toml`:

103 

104```toml

105 allowed_login_methods = ["chatgpt"]

106 allowed_chatgpt_workspaces = ["00000000-0000-0000-0000-000000000000"]

107```

108 

109 The first key permits only ChatGPT authentication; the second restricts sign-in to the approved workspace. Replace the illustrative UUID with your workspace UUID. See the [requirements reference](https://learn.chatgpt.com/docs/config-file/config-reference#requirementstoml).

110 

1113. Deploy through local `requirements.toml` or macOS MDM requirements using the paths in [Where configuration belongs](#where-configuration-belongs). These authentication requirements apply before credentials load and before cloud policy is retrieved; Codex ignores them in cloud-managed requirements. Protect the file and its parent directory from user modification. Legacy `managed_config.toml` defaults do not enforce this restriction.

112 

1134. During the pilot, sign users out or remove previously stored personal Codex sessions. Do not assume a new policy retroactively invalidates an existing session.

114 

1155. Pair the login restriction with workspace roles and group access. Authentication controls which identity signs in; RBAC controls which Codex features that identity may use. See [Authentication](https://learn.chatgpt.com/docs/auth).

116 

117#### Verify

118 

119- [ ] Sign out of Codex.

120 

121- [ ] Try signing in with a personal ChatGPT account. Expected: Sign-in to the personal workspace is rejected.

122 

123- [ ] Try Codex API-key login. Expected: API-key login is rejected.

124 

125- [ ] Sign in to the approved workspace with the corporate account. Expected: Sign-in succeeds.

126 

127- [ ] Restart the desktop app, CLI, and IDE extension, then repeat.

128 

129#### Roll back

130 

131Restore the previous local authentication requirements and redeploy the reviewed bundle.

132 

133#### Boundaries

134 

135This controls managed Codex clients on managed endpoints. Pair it with endpoint application controls and network policy if the requirement is “no personal Codex use from corporate assets.”

136 

137</PersistentChecklist>

138 

139 

140 

141 

142 

143 

144 

145<a id="restrict-permission-profiles-and-full-access"></a>

146 

147 

148 

149### Restrict permission profiles and Full Access

150 

151 

152 

153<PersistentChecklist client:load id="codex-security-cookbook-restrict-permission-profiles-and-full-access" itemIds={["open-the-permissions-picker-expected-full-access-unavailable-or", "launch-with-dangerouslybypassapprovalsandsandbox-expected-rejected-or-forced-to-a", "launch-with-sandbox-dangerfullaccess-askforapproval-never-expected-rejected", "run-a-normal-workspace-task-expected-workspace-work-succeeds"]} description="This browser could not save your verification progress.">

154 

155Use this recipe when developers need read-only or workspace-scoped access, and you want to prevent them from selecting Full Access or bypassing approvals and sandboxing with `--yolo`.

156 

157> **Intended result**

158>

159> Users can select only approved read-only or workspace-scoped profiles. They cannot select `danger-full-access`, `approval_policy = "never"`, or `--yolo`.

160 

161#### Configure

162 

1631. Define an approved workspace profile:

164 

165```toml

166 [permissions.corp-workspace]

167 description = "Company workspace access with no unrestricted host access."

168 extends = ":workspace"

169```

170 

1712. Enforce the allowed profiles and approval policies:

172 

173```toml

174 allowed_approval_policies = ["on-request", "untrusted"]

175 allowed_approvals_reviewers = ["user"]

176 default_permissions = "corp-workspace"

177 

178 [allowed_permission_profiles]

179 ":read-only" = true

180 "corp-workspace" = true

181 ":danger-full-access" = false

182```

183 

184 The allowlist is complete: profiles omitted from the allowlist or set to false are denied, including profiles added in future versions. See the [Configuration Reference](https://learn.chatgpt.com/docs/config-file/config-reference).

185 

1863. For legacy clients that still use `sandbox_mode`, use:

187 

188```toml

189 allowed_approval_policies = ["on-request", "untrusted"]

190 allowed_sandbox_modes = ["read-only", "workspace-write"]

191```

192 

1934. Deliver this as admin-enforced requirements, not a user-editable config file.

194 

1955. If you later permit Auto-review, add it deliberately after testing. Auto-review changes who reviews a boundary crossing; it does not restore a removed boundary. See [Auto-review](https://learn.chatgpt.com/docs/sandboxing/auto-review).

196 

197#### Verify

198 

199- [ ] Open the permissions picker. Expected: Full Access is unavailable or rejected.

200 

201- [ ] Launch with `--dangerously-bypass-approvals-and-sandbox`. Expected: Codex rejects the launch or forces a compatible profile.

202 

203- [ ] Launch with `--sandbox danger-full-access --ask-for-approval never`. Expected: The launch is rejected.

204 

205- [ ] Run a normal workspace task. Expected: The task succeeds; boundary crossings still require approval.

206 

207#### Roll back

208 

209Restore the prior requirements bundle. Keep unrestricted access blocked unless there is a separately approved exception.

210 

211#### Boundaries

212 

213This controls Codex runtime permissions. It does not make a privileged operating-system account unprivileged.

214 

215</PersistentChecklist>

216 

217 

218 

219 

220 

221 

222 

223<a id="allow-only-approved-mcp-servers"></a>

224 

225 

226 

227### Allow only approved MCP servers

228 

229 

230 

231<PersistentChecklist client:load id="codex-security-cookbook-allow-only-approved-mcp-servers" itemIds={["configure-the-approved-server-exactly-expected-starts", "change-one-url-character-expected-disabled", "change-the-stdio-argument-count-or-order-or-supply", "in-a-disposable-trusted-project-try-harmless-cwd-env", "add-an-unapproved-name-expected-disabled", "test-a-pluginbundled-server-expected-only-the-approved-identity"]} description="This browser could not save your verification progress.">

232 

233Use this recipe when your organization needs to decide which MCP servers Codex may use and enforce an approved list.

234 

235Allowing a server and configuring it are separate steps. An allowlist entry permits a matching server; it does not create the server configuration. Configure the server separately with the matching name and identity, along with the authentication it requires.

236 

237> **Intended result**

238>

239> Codex enables only MCP servers whose configured name and identity match the enterprise-approved list.

240 

241#### Configure

242 

2431. Inventory each approved server: owner, purpose, transport, exact executable or URL, authentication, data classification, and write-capable tools.

244 

2452. Start with deny-all. An empty managed table disables all MCP servers:

246 

247```toml

248 [mcp_servers]

249```

250 

2513. Add approved HTTP servers by exact URL:

252 

253```toml

254 [mcp_servers.internal_docs]

255 identity = { url = "https://mcp.example.com/docs" }

256```

257 

2584. Add approved stdio servers by executable and positional arguments:

259 

260```toml

261 [mcp_servers.internal_build.identity]

262 command = { executable = "/usr/local/bin/company-mcp", args = [

263 { match = "exact", value = "serve" },

264 { match = "prefix", value = "--workspace=" },

265 ] }

266```

267 

268 The structured matcher checks the executable, argument count, and argument order. It does not constrain `cwd`, `env`, or `env_vars`. Treat control of the full launch context as a prerequisite for approving a stdio server: protect its executable and dependencies, and prevent untrusted user or project configuration from supplying a working directory or environment that can change its behavior. If you cannot enforce that boundary independently, leave the stdio server unapproved and use a reviewed HTTP server instead.

269 

2705. Add plugin-bundled MCP identities separately under `plugins.<plugin>.mcp_servers.<server>`.

271 

2726. Store the approved list in a reviewed configuration repository and deploy it through admin-enforced requirements.

273 

274The client enables a server only when both its name and identity match an approved entry. See [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration).

275 

276#### Verify

277 

278- [ ] Configure the approved server exactly. Expected: The server starts.

279 

280- [ ] Change one URL character. Expected: The server is disabled.

281 

282- [ ] Change the stdio argument count or order, or supply an argument outside the configured argument rules. Expected: The server is disabled. Values that still satisfy an allowed prefix remain permitted.

283 

284- [ ] In a disposable trusted project, try harmless `cwd`, `env`, and `env_vars` overrides while retaining the matching executable and arguments. Identity matching alone does not reject these overrides. Verify that your independent launch-context control rejects unsafe overrides or that the stdio server remains unapproved; do not use a real injection payload.

285 

286- [ ] Add an unapproved name. Expected: The server is disabled.

287 

288- [ ] Test a plugin-bundled server. Expected: The server works only with the approved identity.

289 

290#### Roll back

291 

292Remove the newly added entry. To stop all MCP usage immediately, deploy an empty `mcp_servers` table.

293 

294#### Boundaries

295 

296Identity allowlisting does not prove that a server’s tools, upstream data, credentials, or launch environment are safe. Local stdio MCP processes run outside the local command sandbox; matching an executable and arguments does not constrain the server’s access or prevent environment-based code loading. Review the full launch context and server permissions independently. See [MCP identity requirements](https://learn.chatgpt.com/docs/enterprise/managed-configuration#enforce-command-rules-from-requirements).

297 

298</PersistentChecklist>

299 

300 

301 

302 

303 

304 

305 

306<a id="monitor-codex-activity"></a>

307 

308 

309 

310### Monitor Codex activity

311 

312 

313 

314<PersistentChecklist client:load id="codex-security-cookbook-monitor-codex-activity" itemIds={["reads-one-allowed-file", "attempts-one-blocked-file-read", "runs-one-allowed-command", "attempts-one-blocked-egress-request", "requests-and-receives-a-denied-approval", "ends-the-session", "otel-shows-runtool-events", "hooks-show-the-lifecycle", "proxy-logs-show-allowed-and-blocked-destinations", "compliance-ingestion-receives-supported-records", "the-siem-correlates-them-to-the-user-or-workload"]} description="This browser could not save your verification progress.">

315 

316Use this recipe when your security team needs to understand what Codex is doing on endpoints and in your network. It brings together run and tool events, approval decisions, workspace audit records, and network logs for investigation.

317 

318> **Intended result**

319>

320> Security teams can correlate Codex runs, tool decisions, approvals, workspace audit records, and actual network egress without relying on the model’s own narrative.

321 

322#### Use four evidence sources

323 

3241. Codex OpenTelemetry: run, API, model, sandbox, approval, and tool events.

325 

3262. Managed lifecycle hooks: endpoint-side records around tool use and permission requests.

327 

3283. Network proxy or gateway logs: actual DNS/HTTP destinations and connection outcomes.

329 

3304. Compliance API: workspace-level audit and investigation records.

331 

332No single source provides complete network monitoring.

333 

334#### Configure

335 

3361. Send Codex OpenTelemetry logs to your collector, with raw prompts redacted:

337 

338```toml

339 [otel]

340 environment = "enterprise"

341 log_user_prompt = false

342 

343 [otel.exporter.otlp-http]

344 endpoint = "https://otel.example.com/v1/logs"

345 protocol = "binary"

346 headers = { "x-otlp-api-key" = "${OTLP_TOKEN}" }

347```

348 

349 Provide `OTLP_TOKEN` to the Codex process through your approved secret manager or process environment before starting the client. Keep the token out of deployed TOML files and source control.

350 

351 Codex can emit conversation starts, API requests, streaming events, prompt metadata, tool decisions, and tool results. See [Advanced Configuration](https://learn.chatgpt.com/docs/config-file/config-advanced).

352 

3532. Deploy OTel outside project-local configuration. Project `.codex/config.toml` files cannot override telemetry routing.

354 

3553. Add managed lifecycle hooks for `SessionStart`, `PreToolUse`, `PermissionRequest`, `PostToolUse`, `Stop`, and `SessionEnd`.

356 

3574. Install hook scripts in an administrator-managed directory and set `allow_managed_hooks_only = true` if user, project, and plugin hooks should be ignored.

358 

3595. Route sandboxed command traffic through an independently logged proxy. OTel records that a tool ran; the proxy records where the subprocess attempted to connect.

360 

3616. Configure separate telemetry for web search, apps, connectors, MCP servers, browser activity, and Codex Cloud. Local command proxy rules do not automatically cover them.

362 

3637. Stream supported Compliance API records into the SIEM and apply your own retention and legal-hold controls. See [Compliance API and audit events](https://learn.chatgpt.com/docs/enterprise/compliance-api).

364 

3658. Correlate user or service account, host or runner, conversation ID, model, client version, permission profile, approval decision, destination, and tool name.

366 

367#### Verify

368 

369Run a controlled session that does the following:

370 

371- [ ] Reads one allowed file.

372 

373- [ ] Attempts one blocked file read.

374 

375- [ ] Runs one allowed command.

376 

377- [ ] Attempts one blocked egress request.

378 

379- [ ] Requests approval and receives a denial.

380 

381- [ ] Ends the session.

382 

383Expected results by evidence source:

384 

385- [ ] OTel shows run and tool events.

386 

387- [ ] Hooks show the session lifecycle.

388 

389- [ ] Proxy logs show allowed and blocked destinations.

390 

391- [ ] Compliance ingestion receives supported records.

392 

393- [ ] The SIEM correlates those records with the user or workload.

394 

395#### Roll back

396 

397Disable the exporter and hooks by restoring the previous configuration. Do not remove independent proxy logging as part of a telemetry rollback.

398 

399#### Boundaries

400 

401Do not promise that Codex telemetry captures every command argument, output byte, or network packet. Document the coverage of each layer.

402 

403</PersistentChecklist>

404 

405 

406 

407 

408 

409 

410 

411<a id="restrict-network-destinations"></a>

412 

413 

414 

415### Restrict network destinations

416 

417 

418 

419<PersistentChecklist client:load id="codex-security-cookbook-restrict-network-destinations" itemIds={["request-an-approved-domain-expected-succeeds", "request-an-unapproved-domain-expected-blocked", "request-localhosthttplocalhost-a-private-ip-and-a-cloud-metadata", "in-cloud-attempt-post-to-an-allowed-domain-expected", "confirm-proxygateway-logs-contain-both-allowed-and-denied-requests"]} description="This browser could not save your verification progress.">

420 

421Use this recipe when Codex should have no internet access or should reach only approved destinations. Choose the local or cloud procedure for the environment you are configuring, and keep their separate policy scopes in mind.

422 

423> **Intended result**

424>

425> Codex has no internet access, or reaches only approved domains, according to the configuration you choose. Codex Cloud (Legacy) environments can additionally restrict HTTP methods.

426 

427#### Configure current Codex Cloud

428 

4291. Create separate environments for different trust levels, such as no-internet-review, approved-dependencies-build, and cyber-lab.

430 

4312. In the environment configuration, leave **Allow Codex to access internet** off unless the workflow needs internet access.

432 

4333. When access is required, turn on **Allow Codex to access internet**. Under **Allow domains**, choose **Custom domains only**, then add exact required hosts under **Additional allowed domains**.

434 

4354. Save and test the services during setup. Publish or republish the environment, then test access to approved and unapproved destinations in a new task. Review setup scripts separately: pin dependencies, prefer approved mirrors, and avoid executable downloads that have not been reviewed.

436 

437See [Connect to services](https://learn.chatgpt.com/docs/environments/cloud-environments#connect-to-services). Current Codex Cloud settings do not provide the Legacy HTTP-method selector.

438 

439#### Configure Codex Cloud (Legacy)

440 

4411. Keep agent internet access **Off** when unnecessary. Legacy Cloud blocks internet during the agent phase by default; setup scripts still run with internet access for dependency installation.

442 

4432. When agent access is required, turn it **On** with a narrow allowlist. Start with **None** and add exact domains.

444 

4453. For download-only workflows, allow only `GET`, `HEAD`, and `OPTIONS`. This blocks `POST`, `PUT`, `PATCH`, `DELETE`, and other methods. Review setup scripts separately because the agent-phase restriction does not govern their internet access.

446 

447See [Legacy agent internet access](https://learn.chatgpt.com/docs/cloud/internet-access). These presets and HTTP-method controls apply only to Legacy Cloud.

448 

449#### Configure local Codex

450 

4511. In administrator-managed `requirements.toml`, define and select the approved network profile, and restrict users to that profile:

452 

453```toml

454 default_permissions = "corp-build"

455 

456 [allowed_permission_profiles]

457 "corp-build" = true

458 

459 [permissions.corp-build]

460 description = "Workspace access with approved dependency destinations."

461 extends = ":workspace"

462 

463 [permissions.corp-build.network]

464 enabled = true

465 allow_local_binding = false

466 

467 [permissions.corp-build.network.domains]

468 "registry.npmjs.org" = "allow"

469 "pypi.org" = "allow"

470 "files.pythonhosted.org" = "allow"

471```

472 

4732. Deploy the reviewed requirements bundle using [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration). A named profile alone is inactive; `default_permissions` selects it, and the allowlist prevents selection of other profiles.

474 

4753. Activate the administrator-managed proxy in the same requirements bundle so domain restrictions are enforced and users cannot expand them. Deploy the proxy and network-enabled profile together; a network-enabled profile without an active proxy grants direct network access without enforcing its domain rules:

476 

477 > **Caution:** `[experimental_network]` is experimental and may change. Validate it on each supported local client version and operating system before broader rollout. Windows support is limited; do not apply this policy to Windows users until you have tested enforcement in your environment.

478 

479```toml

480 [experimental_network]

481 enabled = true

482 managed_allowed_domains_only = true

483 

484 [experimental_network.domains]

485 "registry.npmjs.org" = "allow"

486 "pypi.org" = "allow"

487 "files.pythonhosted.org" = "allow"

488```

489 

4904. Keep local port binding off unless the workflow needs it. Configure access to private network targets separately; allowing a domain does not by itself approve its private addresses. See [Network access requirements](https://learn.chatgpt.com/docs/enterprise/managed-configuration#configure-network-access-requirements).

491 

4925. Configure web search, apps, MCP servers, browser activity, and Codex Cloud separately. Local sandbox rules do not control them.

493 

494#### Verify

495 

496- [ ] Send a request to an approved domain and confirm that it succeeds.

497 

498- [ ] Send a request to an unapproved domain and confirm that it is blocked.

499 

500- [ ] Send requests to [localhost](http://localhost), a private IP, and a cloud metadata endpoint. Confirm that each request is blocked unless explicitly approved.

501 

502- [ ] In Codex Cloud (Legacy), attempt a `POST` request to an allowed domain. Confirm that the request is blocked when only `GET`, `HEAD`, and `OPTIONS` are allowed.

503 

504- [ ] Confirm that proxy or gateway logs contain entries for both allowed and denied requests.

505 

506#### Roll back

507 

508Return the environment to Off or restore the prior domain policy. Avoid rolling back to unrestricted internet.

509 

510#### Boundaries

511 

512An approved full sandbox escalation can bypass the local command proxy. Test ordinary sandboxed commands and approved escalated commands separately before relying on the restriction.

513 

514An allowed domain can still host prompt injection, compromised packages, or unsafe documentation.

515 

516</PersistentChecklist>

517 

518 

519 

520 

521 

522 

523 

524<a id="protect-secrets-and-unrelated-repositories"></a>

525 

526 

527 

528### Protect secrets and unrelated repositories

529 

530 

531 

532<PersistentChecklist client:load id="codex-security-cookbook-protect-secrets-and-unrelated-repositories" itemIds={["read-a-normal-file", "read-each-canary", "search-recursively-for-secrets", "print-its-command-environment", "read-a-neighboring-repository"]} description="This browser could not save your verification progress.">

533 

534Use this recipe when Codex needs access to approved source directories while secrets, `.env` files, SSH keys, and unrelated repositories should remain out of reach. It covers restricting file access and reducing the number of credential-bearing environment variables passed to spawned commands.

535 

536> **Intended result**

537>

538> Codex can work in approved source directories but cannot read common secret-bearing files or inherit a broad set of credential-bearing environment variables.

539 

540#### Configure

541 

5421. Define deny-read patterns in a workspace profile:

543 

544```toml

545 [permissions.corp-workspace]

546 description = "Workspace edits with secret-bearing paths denied."

547 extends = ":workspace"

548 

549 [permissions.corp-workspace.filesystem]

550 glob_scan_max_depth = 6

551 

552 [permissions.corp-workspace.filesystem.":workspace_roots"]

553 "**/.env*" = "deny"

554 "**/*.pem" = "deny"

555 "**/*.p12" = "deny"

556 "**/id_*" = "deny"

557 "**/.aws/**" = "deny"

558 "**/.kube/**" = "deny"

559```

560 

5612. Add exact deny paths for known credential directories, signing keys, production configuration, and neighboring repositories.

562 

5633. In the system `/etc/codex/config.toml` or the user `~/.codex/config.toml`, reduce the environment variables passed to spawned commands:

564 

565```toml

566 [shell_environment_policy]

567 inherit = "core"

568 ignore_default_excludes = false

569 

570 [shell_environment_policy.filters]

571 "AWS_*" = "exclude"

572 "AZURE_*" = "exclude"

573 "GITHUB_*" = "exclude"

574 "*_TOKEN" = "exclude"

575 "*_SECRET" = "exclude"

576 "*_PASSWORD" = "exclude"

577```

578 

579 This is a user-configurable default, not an enforced requirement. It reduces inherited variables but does not prevent access to credential files, helpers, shell startup content, or other identities. See [Advanced Configuration](https://learn.chatgpt.com/docs/config-file/config-advanced).

580 

5814. In the administrator-managed `requirements.toml`, select the restricted profile and allow only that profile. Built-in profiles do not inherit its secret-file denies:

582 

583```toml

584 default_permissions = "corp-workspace"

585 

586 [allowed_permission_profiles]

587 "corp-workspace" = true

588 ":danger-full-access" = false

589```

590 

5915. Choose the credential flow for your Cloud environment:

592 - In current Codex Cloud, use **Network secrets** for credentials sent to an allowed HTTPS service. Programs receive a placeholder, and the proxy substitutes the real value for approved destinations on port 443 during setup and tasks. The raw credential is not placed in a local process or file. Direct environment variables are available to programs. See [Environment variables and network secrets](https://learn.chatgpt.com/docs/environments/cloud-environments#configure-environment-variables-and-network-secrets).

593 - In Codex Cloud (Legacy), secrets support setup-time authentication and are removed before the agent phase; environment variables remain for the full chat. See [Legacy Cloud environments](https://learn.chatgpt.com/docs/environments/cloud-environment).

594 

5956. If the agent needs authentication, use an independent broker to provide short-lived credentials scoped to the exact target and action. See [Recommended configuration](https://learn.chatgpt.com/docs/cyber-safety/recommended-configuration).

596 

597#### Verify

598 

599Create harmless canaries:

600 

601```plain text

602.env.test

603test-key.pem

604.aws/credentials

605.kube/config

606```

607 

608Then ask Codex to:

609 

610- [ ] Read a normal file.

611 

612- [ ] Read each canary.

613 

614- [ ] Search recursively for secrets.

615 

616- [ ] Print its command environment.

617 

618- [ ] Read a neighboring repository.

619 

620Expected: Reading a normal file succeeds; denied files and neighboring repositories remain inaccessible, and excluded variables are absent from the command environment.

621 

622#### Roll back

623 

624Restore the prior profile, but retain high-confidence secret-file denies while investigating workflow failures.

625 

626#### Boundaries

627 

628Filesystem denies do not remove secrets already pasted into prompts, committed to readable source, returned by connectors, or written into model-accessible logs.

629 

630</PersistentChecklist>

631 

632 

633 

634 

635 

636 

637 

638<a id="require-approval-for-sensitive-commands"></a>

639 

640 

641 

642### Require approval for sensitive commands

643 

644 

645 

646<PersistentChecklist client:load id="codex-security-cookbook-require-approval-for-sensitive-commands" itemIds={["run-git-status-expected-no-sensitiveaction-approval", "run-git-push-expected-approval-prompt", "run-terraform-apply-expected-approval-prompt", "run-kubectl-delete-pod-test-expected-approval-prompt", "run-rm-rf-testdirectory-expected-forbidden", "deny-one-approval-expected-command-does-not-run-and", "restart-the-client-and-repeat-expected-rule-remains-enforced"]} description="This browser could not save your verification progress.">

647 

648Use this recipe when actions such as `git push`, deployments, database migrations, and cloud CLI commands need approval before they run. Decide which commands should prompt for review and which must be forbidden, then configure rules for those commands.

649 

650> **Intended result**

651>

652> Sensitive commands consistently pause for approval or are forbidden, even when the model believes they are appropriate.

653 

654#### Configure

655 

6561. Decide which commands require a prompt and which are forbidden.

657 

658| Command class | Decision |

659| ---------------------------- | --------- |

660| `git push`, `git commit` | Prompt |

661| `terraform apply` | Prompt |

662| `kubectl apply/delete/patch` | Prompt |

663| database migrations | Prompt |

664| destructive host commands | Forbidden |

665 

6662. Add admin-enforced command rules:

667 

668```toml

669 [rules]

670 prefix_rules = [

671 { pattern = [{ token = "git" }, { any_of = ["push", "commit"] }], decision = "prompt", justification = "Require review before mutating shared Git state." },

672 { pattern = [{ token = "terraform" }, { token = "apply" }], decision = "prompt", justification = "Require review before infrastructure changes." },

673 { pattern = [{ token = "kubectl" }, { any_of = ["apply", "delete", "patch"] }], decision = "prompt", justification = "Require review before Kubernetes changes." },

674 { pattern = [{ token = "rm" }], decision = "forbidden", justification = "Destructive removal is not permitted in managed Codex workflows." },

675 ]

676```

677 

678 Requirements rules can require a prompt or forbid a command; they cannot allow one. See [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration).

679 

6803. For high-risk profiles, add a shell-wrapper entry to the same `prefix_rules` array when wrappers could obscure a sensitive command:

681 

682```toml

683 { pattern = [{ any_of = ["bash", "sh", "zsh"] }], decision = "prompt", justification = "Review shell wrappers that could obscure sensitive commands." },

684```

685 

686 The shell-wrapper entry is noisy; use it selectively.

687 

6884. If a person must approve commands, enforce these settings:

689 

690```toml

691 allowed_approval_policies = ["on-request", "untrusted"]

692 allowed_approvals_reviewers = ["user"]

693```

694 

695 Auto-review changes the reviewer; it is not a deterministic security guarantee. See [Auto-review](https://learn.chatgpt.com/docs/sandboxing/auto-review).

696 

6975. Send PermissionRequest, tool-decision, and tool-result events to the security pipeline.

698 

699#### Verify

700 

701- [ ] Run `git status`. Expected: No approval prompt appears.

702 

703- [ ] Run `git push`. Expected: An approval prompt appears.

704 

705- [ ] Run `terraform apply`. Expected: An approval prompt appears.

706 

707- [ ] Run `kubectl delete pod test`. Expected: An approval prompt appears.

708 

709- [ ] Run `rm -rf test-directory`. Expected: The command is forbidden.

710 

711- [ ] Deny one approval request. Expected: The command does not run, and the denial is logged.

712 

713- [ ] Restart the client and repeat the checks. Expected: The rule remains enforced.

714 

715#### Roll back

716 

717Restore the prior requirements bundle. Narrow an overly broad token pattern instead of removing an entire sensitive command class.

718 

719#### Boundaries

720 

721Prefix rules are not a complete operating-system policy engine. Pair them with sandboxing, least-privilege OS accounts, network restrictions, cloud IAM, branch protection, deployment approvals, and database authorization.

722 

723</PersistentChecklist>

724 

725 

726 

727 

728 

729## Combined recipes for enterprise security goals

730 

731These examples show how to combine controls for common enterprise security goals. Test the configuration on each client and environment in scope.

732 

733 

734 

735<a id="let-developers-use-codex-while-protecting-production"></a>

736 

737 

738 

739### Let developers use Codex while protecting production

740 

741 

742 

743<PersistentChecklist client:load id="codex-security-cookbook-let-developers-use-codex-while-protecting-production" itemIds={["run-a-normal-workspace-task-expected-the-normal-task", "attempt-a-representative-sensitive-command-and-deny-the-approval", "verify-the-codex-identity-cannot-obtain-production-write-access", "restart-the-client-and-repeat"]} description="This browser could not save your verification progress.">

744 

745**Uses these configuration recipes:** Restrict permission profiles and Full Access; Protect secrets and unrelated repositories; Require approval for sensitive commands.

746 

747Developers have legitimate production access, but you want Codex to help with development without making unreviewed production changes.

748 

749- Define an approved workspace profile and enforce the allowed profiles and approval policies. Deliver these settings as administrator-enforced requirements to prevent users from overriding them.

750 

751- Run Codex under a separate, lower-privilege identity or in an environment that cannot access or obtain production write credentials. Developers can retain production access through a separate authorized workflow.

752 

753- Minimize environment variables passed to spawned commands. If the agent needs authentication, use an independent broker to provide short-lived credentials scoped to the exact target and action.

754 

755- Decide which commands require an approval prompt and which are forbidden. Require a person to approve selected high-impact commands, such as `git push`, `terraform apply`, Kubernetes changes, and database migrations; forbid commands that must never run.

756 

757- Keep production IAM, branch protection, and deployment approvals enforced independently of Codex.

758 

759#### Restrict permission profiles and require a human reviewer

760 

761In the administrator-managed `requirements.toml`, allow the built-in workspace and read-only profiles and require user review for actions that need approval:

762 

763```toml

764allowed_approval_policies = ["on-request"]

765allowed_approvals_reviewers = ["user"]

766default_permissions = ":workspace"

767 

768[allowed_permission_profiles]

769":read-only" = true

770":workspace" = true

771```

772 

773The workspace profile permits work in the workspace within its sandbox; the read-only profile is available for narrower work. Full-access profiles are not on the allowlist.

774 

775Set `approval_policy = "on-request"` in the client configuration if the client needs an explicit compatible choice. `on-request` permits an approval prompt when required; it does not prompt for every command. Add explicit rules for the actions that need review, and retain independent production authorization.

776 

777Managed profile allowlists require Codex 0.138.0 or later; use and test the documented legacy sandbox-mode requirements for older clients.

778 

779Restart each pilot client, verify the approved profile works, and verify a disallowed full-access profile is rejected.

780 

781#### Separate the Codex identity from production credentials

782 

783In your device management or development environment provisioning system, create a dedicated Codex user, container, or development host with access only to the source and development services it needs. Do not mount the developer's production credential files, token helpers, or keychains into that environment, and prevent the identity from acquiring production write roles.

784 

785If the agent needs service access, configure your organization's credential broker to issue short-lived credentials restricted to the development resource and action. The developer can use their normal identity through a separate authorized production workflow.

786 

787For example, in AWS IAM, open **Roles**, select the Codex development role, and under **Permissions** add a reviewed inline policy like this one, replacing the account and role with your own:

788 

789```json

790{

791 "Version": "2012-10-17",

792 "Statement": [

793 {

794 "Sid": "DenyAssumeExampleProductionRole",

795 "Effect": "Deny",

796 "Action": "sts:AssumeRole",

797 "Resource": "arn:aws:iam::111122223333:role/ExampleProductionRole"

798 }

799 ]

800}

801```

802 

803This example denies attempts to assume the named role, but it does not deny attempts to assume other roles. Also remove direct production permissions, restrict other production roles and credential sources, and review trust policies and organization-level controls.

804 

805Test the development role against representative development and production permissions without making a production change. See [AWS IAM role policy examples](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_policy-examples.html).

806 

807#### Minimize the shell environment

808 

809In `/etc/codex/config.toml` for a system-wide starting configuration, or `~/.codex/config.toml` for one user, configure which environment variables spawned commands inherit:

810 

811```toml

812[shell_environment_policy]

813inherit = "core"

814ignore_default_excludes = false

815 

816[shell_environment_policy.filters]

817"AWS_*" = "exclude"

818"AZURE_*" = "exclude"

819"GITHUB_*" = "exclude"

820"*_TOKEN" = "exclude"

821"*_SECRET" = "exclude"

822"*_PASSWORD" = "exclude"

823```

824 

825This is a configurable default, not an enforced credential boundary. User settings, shell startup or snapshots, credential helpers, and other credential sources may still expose credentials.

826 

827In `requirements.toml`, use the following optional restrictions to disable login shells and shell snapshots if they are compatible with your workflow:

828 

829```toml

830allow_login_shell = false

831 

832[features]

833shell_snapshot = false

834```

835 

836Pilot these settings because some workflows depend on login shell initialization.

837 

838Start Codex with harmless synthetic variables matching the filters and inspect a spawned command's environment; also verify a login shell request is rejected if disabled. Independently verify that the execution identity cannot access real production credentials. See [Shell environment policy](https://learn.chatgpt.com/docs/config-file/config-advanced#shell-environment-policy).

839 

840#### Prompt for selected high-impact commands

841 

842Add requirements rules for the commands your organization uses. For example:

843 

844```toml

845[rules]

846prefix_rules = [

847 { pattern = [{ token = "git" }, { token = "push" }], decision = "prompt", justification = "Review Git pushes." },

848 { pattern = [{ token = "terraform" }, { token = "apply" }], decision = "prompt", justification = "Review infrastructure changes." },

849 { pattern = [{ token = "kubectl" }, { any_of = ["apply", "delete", "patch"] }], decision = "prompt", justification = "Review cluster changes." },

850 { pattern = [{ token = "python3" }, { token = "manage.py" }, { token = "migrate" }], decision = "prompt", justification = "Review database migrations." },

851]

852```

853 

854Use `forbidden` for a command that must never run; replace or add patterns for the actual deployment and migration tools.

855 

856These rules match command prefixes and do not cover every equivalent action. Test absolute paths, wrappers, alternate argument orders, other clients, and other tools separately.

857 

858On a disposable target, run a normal command, request a listed action, deny the approval request, and verify the action did not execute. See [Enforcing command rules](https://learn.chatgpt.com/docs/enterprise/managed-configuration#enforce-command-rules-from-requirements).

859 

860#### Enforce repository and deployment approvals outside Codex

861 

862In your source-control platform, protect production branches such as `main`: require reviewed changes and the necessary approvals and status checks, and review which roles can bypass those requirements. Configure deployment approval in the relevant deployment system and database privileges in the database itself.

863 

864Use a disposable repository to verify a reviewed change works and an unauthorized direct push is rejected. These controls apply regardless of whether an action was requested through Codex.

865 

866#### Verify

867 

868On a disposable test target:

869 

870- [ ] Run a normal workspace task. Expected: The task succeeds.

871 

872- [ ] Attempt a representative sensitive command and deny the approval request. Expected: The denied command does not run.

873 

874- [ ] Verify the Codex identity cannot obtain production write access.

875 

876- [ ] Restart the client and repeat.

877 

878#### Boundaries

879 

880Prefix rules are not a complete operating system policy engine. Pair them with sandboxing, least-privilege OS accounts, network restrictions, cloud IAM, branch protection, deployment approvals, and database authorization.

881 

882</PersistentChecklist>

883 

884 

885 

886 

887 

888 

889 

890<a id="reduce-the-risk-of-publishing-internal-code"></a>

891 

892 

893 

894### Reduce the risk of publishing internal code

895 

896 

897 

898<PersistentChecklist client:load id="codex-security-cookbook-reduce-the-risk-of-publishing-internal-code" itemIds={["create-harmless-canaries-and-confirm-denied-file-reads-fail", "if-network-access-is-enabled-check-that-an-approved", "with-a-harmless-marker-and-disposable-test-accounts-or"]} description="This browser could not save your verification progress.">

899 

900**Uses these configuration recipes:** Protect secrets and unrelated repositories; Restrict network destinations; Allow only approved MCP servers; Require approval for sensitive commands.

901 

902Developers use Codex with internal repositories, and you want to reduce the risk of code being sent to a public repository, public code snippet, or other unapproved destination.

903 

904- Add exact deny paths for known credential directories and unrelated repositories, and minimize environment variables passed to spawned commands.

905 

906- When agent internet access is required, use a narrow allowlist of approved domains. Allow only approved MCP server names and identities, and require review for selected publishing commands or deny them, such as `git push`.

907 

908- Use source control hooks and permissions, policies for public repositories and code snippets, and data loss prevention controls appropriate to your organization.

909 

910#### Deny access to unrelated repositories and credential files

911 

912In administrator-managed `requirements.toml`, add exact paths that the local agent must not read:

913 

914```toml

915[permissions.filesystem]

916deny_read = ["~/.ssh", "~/.aws/credentials", "~/.kube/config", "/work/unrelated-repository"]

917```

918 

919Replace the examples with paths present on your managed devices. This managed deny applies across allowed permission profiles; a deny configured only inside one custom profile does not protect users who select a different profile. Prefer exact known paths and test any glob patterns at the depths you need.

920 

921On native Windows, managed `deny_read` covers direct file tools but does not by itself prevent shell subprocess reads; use OS identities and file access control lists as well.

922 

923Create harmless canary files in the denied locations. Under every allowed profile, verify that direct and shell reads of those files are denied and that an approved source file can be read. See [Managed deny-read requirements](https://learn.chatgpt.com/docs/enterprise/managed-configuration#enforce-deny-read-requirements).

924 

925#### Minimize credential-bearing shell variables

926 

927In `/etc/codex/config.toml` or `~/.codex/config.toml`, set a narrow inherited environment:

928 

929```toml

930[shell_environment_policy]

931inherit = "core"

932ignore_default_excludes = false

933 

934[shell_environment_policy.filters]

935"AWS_*" = "exclude"

936"AZURE_*" = "exclude"

937"GITHUB_*" = "exclude"

938"*_TOKEN" = "exclude"

939"*_SECRET" = "exclude"

940"*_PASSWORD" = "exclude"

941```

942 

943This setting reduces inherited variables but is user-configurable and does not prevent access to credential files, helpers, shell startup content, or other identities.

944 

945Where appropriate, an administrator can also add these restrictions to `requirements.toml` and pilot them to assess their effect on developer workflows:

946 

947```toml

948allow_login_shell = false

949 

950[features]

951shell_snapshot = false

952```

953 

954Test with synthetic canary variables and a separate least-privilege execution identity. Do not use real credentials. See [Shell environment policy](https://learn.chatgpt.com/docs/config-file/config-advanced#shell-environment-policy).

955 

956#### Allow only approved network destinations for local commands

957 

958If local sandboxed commands need network access, merge both the profile and managed-proxy settings below into `requirements.toml`, replacing the domains with approved endpoints:

959 

960```toml

961default_permissions = "corp_network"

962 

963[allowed_permission_profiles]

964corp_network = true

965 

966[permissions.corp_network]

967extends = ":workspace"

968 

969[permissions.corp_network.network]

970enabled = true

971 

972[experimental_network]

973enabled = true

974managed_allowed_domains_only = true

975 

976[experimental_network.domains]

977"git.corp.example" = "allow"

978"registry.corp.example" = "allow"

979```

980 

981The network-enabled profile grants the sandboxed command a network path, while the managed proxy restricts its destinations. Deploy them together; a network-enabled profile without the intended managed proxy does not apply the same destination restrictions. If internet access is unnecessary, keep network access disabled.

982 

983Do not combine the canonical `domains` table with legacy `allowed_domains` or `denied_domains` settings; migrate and test the existing policy.

984 

985Restart the client and verify that an approved endpoint works and an unapproved endpoint is blocked.

986 

987These settings are experimental; validate OS and client support, and configure private-network access separately if an approved host resolves to a private address. An approved full sandbox escalation can bypass the command proxy.

988 

989This network control for local commands does not by itself cover web search, apps, MCP servers, browser activity, or cloud environments, which need separate policies. An approved hosting domain may also contain public repositories or public code snippets, so destination allowlisting alone is not content protection. See [Network access requirements](https://learn.chatgpt.com/docs/enterprise/managed-configuration#configure-network-access-requirements).

990 

991#### Configure cloud environment networking separately

992 

993In the current Codex Cloud interface, open the environment configuration. Leave **Allow Codex to access internet** off. If you need internet access, turn it on and choose **Custom domains only**, add the exact required hosts under **Additional allowed domains**, then save the configuration, publish or republish the environment, and test a new task.

994 

995Review service authentication and capabilities independently.

996 

997Legacy Codex Cloud uses a separate per-environment agent internet setting with controls for allowed domains and HTTP methods; setup scripts have their own access behavior.

998 

999Test the environment version you actually use. See [Connect to services](https://learn.chatgpt.com/docs/environments/cloud-environments#connect-to-services) and [legacy internet settings](https://learn.chatgpt.com/docs/cloud/internet-access).

1000 

1001#### Restrict MCP servers and prompt before Git pushes

1002 

1003Allow only approved local MCP server identities in `requirements.toml`. For example:

1004 

1005```toml

1006[mcp_servers.internal]

1007identity = { url = "https://mcp.corp.example/mcp" }

1008```

1009 

1010Configure the actual server separately in the user or managed-default `config.toml`, using the matching name and URL and the authentication required by your server:

1011 

1012```toml

1013[mcp_servers.internal]

1014url = "https://mcp.corp.example/mcp"

1015```

1016 

1017The requirement only permits a matching server and does not create it. Review that server's own access and tools.

1018 

1019Verify that the approved server can connect and that a server with a different name or URL is not allowed.

1020 

1021Add a managed command rule to request review before a representative publishing command:

1022 

1023```toml

1024[rules]

1025prefix_rules = [

1026 { pattern = [{ token = "git" }, { token = "push" }], decision = "prompt", justification = "Review the destination before publishing." },

1027]

1028```

1029 

1030Pair this with `allowed_approval_policies = ["on-request"]` and `allowed_approvals_reviewers = ["user"]` as top-level requirements if a person must review.

1031 

1032Deny a test push and confirm it does not run.

1033 

1034Prefix matching does not cover every wrapper, API client, app, or alternate publishing path.

1035 

1036#### Restrict public publishing with source control and DLP controls

1037 

1038In your source control platform, restrict public repository creation and limit who can change repository visibility, where supported. Review bypass permissions for privileged users. Separately check personal accounts, code snippets, external organizations, and token access: organization settings do not govern every destination.

1039 

1040In the relevant repository, require reviewed changes and review branch protection and bypass permissions.

1041 

1042In your organization's DLP console, configure a pilot policy for sensitive source-code content and the upload or repository channels your DLP product actually covers; set the action to block and test with an inert synthetic marker.

1043 

1044Where the source-control platform supports server-side controls, configure and enforce reviewed hooks for repositories receiving pushes.

1045 

1046Use authorized test destinations and confirm blocking before any publication.

1047 

1048#### Verify

1049 

1050- [ ] Create harmless canaries and confirm that attempts to read denied files fail.

1051 

1052- [ ] If network access is enabled, check that an approved destination succeeds and an unapproved destination is blocked; otherwise, verify network requests are blocked.

1053 

1054- [ ] With a harmless marker and disposable test accounts or destinations, verify representative attempts to publish publicly are blocked before publication.

1055 

1056#### Boundaries

1057 

1058An allowed domain can still host public content. Configure web search, apps, MCP servers, browser activity, and Codex Cloud separately; local sandbox rules do not control them.

1059 

1060</PersistentChecklist>

1061 

1062 

1063 

1064 

1065 

1066 

1067 

1068<a id="keep-codex-from-changing-its-own-safeguards"></a>

1069 

1070 

1071 

1072### Keep Codex from changing its own safeguards

1073 

1074 

1075 

1076<PersistentChecklist client:load id="codex-security-cookbook-keep-codex-from-changing-its-own-safeguards" itemIds={["confirm-a-benign-bash-command-runs", "confirm-a-command-containing-codexhooktestdeny-is-blocked", "verify-that-the-policy-and-dependencies-cannot-be-changed", "attempt-to-edit-the-managed-policy-expected-the-managed", "attempt-to-weaken-a-restriction-through-user-or-project", "restart-the-client-and-verify-the-restrictions-still-apply"]} description="This browser could not save your verification progress.">

1077 

1078**Uses these configuration recipes:** Restrict permission profiles and Full Access; Allow only approved MCP servers; Restrict network destinations; Protect secrets and unrelated repositories; Require approval for sensitive commands.

1079 

1080You want the restrictions governing Codex to remain in force when it works in a repository or a user changes local configurations.

1081 

1082- Deliver supported permission, approval, MCP, network, and command restrictions as administrator-enforced requirements.

1083 

1084- Install hook scripts in an administrator-managed directory and use managed-only hooks if user, project, and plugin hooks should be ignored.

1085 

1086- Protect policy files and the configuration distribution path with operating system and device management controls. Run Codex without the privileges needed to change those protections.

1087 

1088- Review the effective configuration for each client and environment in scope.

1089 

1090#### Enforce the permitted profiles, approvals, server identities, and commands

1091 

1092Merge reviewed settings into the administrator-managed `requirements.toml`, rather than relying on a user's or repository's editable settings. For example:

1093 

1094```toml

1095allowed_approval_policies = ["on-request"]

1096allowed_approvals_reviewers = ["user"]

1097default_permissions = ":workspace"

1098 

1099[allowed_permission_profiles]

1100":read-only" = true

1101":workspace" = true

1102 

1103[mcp_servers.internal]

1104identity = { url = "https://mcp.corp.example/mcp" }

1105 

1106[rules]

1107prefix_rules = [

1108 { pattern = [{ token = "git" }, { token = "push" }], decision = "prompt", justification = "Review Git pushes." },

1109]

1110```

1111 

1112This example permits two profiles, requires a human reviewer when approval is needed, permits a matching MCP identity, and prompts for a particular command prefix.

1113 

1114Configure the MCP server itself separately and add the organization's other sensitive command patterns. Add global file restrictions and network restrictions when needed; requirements constrain supported settings but cannot substitute for the identity, service, and destination controls outside Codex.

1115 

1116Managed profile allowlists require Codex 0.138.0 or later.

1117 

1118On a pilot client, attempt to select a disallowed profile, change a restricted user or project setting, and use a non-allowlisted MCP identity; verify each is rejected or remains constrained after restart. Deny a test command approval and verify the command does not run.

1119 

1120#### Add managed filesystem and network restrictions

1121 

1122To deny sensitive local files across allowed profiles, add the following table to `requirements.toml` and replace the examples with your organization's paths:

1123 

1124```toml

1125[permissions.filesystem]

1126deny_read = ["~/.ssh", "~/.aws/credentials", "~/.kube/config"]

1127```

1128 

1129Where sandboxed local commands need network access, define an allowed network-enabled profile and managed destinations together:

1130 

1131```toml

1132default_permissions = "corp_network"

1133 

1134[allowed_permission_profiles]

1135corp_network = true

1136 

1137[permissions.corp_network]

1138extends = ":workspace"

1139 

1140[permissions.corp_network.network]

1141enabled = true

1142 

1143[experimental_network]

1144enabled = true

1145managed_allowed_domains_only = true

1146 

1147[experimental_network.domains]

1148"git.corp.example" = "allow"

1149```

1150 

1151Choose this profile policy in place of the earlier `:workspace` default, or merge both profile names deliberately; do not paste duplicate keys or tables. If commands do not need network, keep it disabled.

1152 

1153Verify exact denied paths using harmless files, and verify approved and unapproved destinations.

1154 

1155On native Windows, also use file access control lists because shell subprocess reads are not covered by managed `deny_read` alone.

1156 

1157Local command networking does not govern other clients, apps, connectors, or cloud execution.

1158 

1159#### Install and enforce administrator-managed hooks

1160 

1161Have an administrator install a reviewed hook program in a root-managed directory, such as `/etc/codex/hooks/pre_tool_use_policy.py`, and prevent the Codex user from changing the file or its directory. In `requirements.toml`, enable hooks and ignore user, project, session, and plugin hooks:

1162 

1163```toml

1164allow_managed_hooks_only = true

1165 

1166[features]

1167hooks = true

1168 

1169[hooks]

1170managed_dir = "/etc/codex/hooks"

1171 

1172[[hooks.PreToolUse]]

1173matcher = "^Bash$"

1174 

1175[[hooks.PreToolUse.hooks]]

1176type = "command"

1177command = "/usr/bin/python3 /etc/codex/hooks/pre_tool_use_policy.py"

1178timeout = 30

1179statusMessage = "Checking managed Bash command"

1180```

1181 

1182The requirement registers the hook but does not install it. For a local macOS integration test, save the following as `pre_tool_use_policy.py` and have an administrator install it with the commands below.

1183 

1184It blocks only the synthetic marker; replace it with a reviewed organization-specific policy before relying on it. Confirm that `/usr/bin/python3` exists on the target and adjust the interpreter path if necessary:

1185 

1186```python

1187import json

1188import sys

1189 

1190event = json.load(sys.stdin)

1191command = event.get("tool_input", {}).get("command", "")

1192if "CODEX_HOOK_TEST_DENY" in command:

1193 print("Synthetic test command blocked by managed hook.", file=sys.stderr)

1194 sys.exit(2)

1195```

1196 

1197```bash

1198sudo install -d -o root -g wheel -m 755 /etc/codex/hooks

1199sudo install -o root -g wheel -m 644 ./pre_tool_use_policy.py /etc/codex/hooks/pre_tool_use_policy.py

1200```

1201 

1202Restart the local client, then:

1203 

1204- [ ] Confirm a benign Bash command runs.

1205 

1206- [ ] Confirm a command containing `CODEX_HOOK_TEST_DENY` is blocked.

1207 

1208- [ ] Verify that the policy and dependencies cannot be changed by the Codex user.

1209 

1210`allow_managed_hooks_only` skips all non-managed user, project, session, and plugin hooks and may affect other workflows.

1211 

1212The Bash matcher does not cover every tool or input supplied later to an existing process; errors, timeouts, or malformed hook responses can allow a tool call to proceed.

1213 

1214Cloud-orchestrated Work uses different supported hook handlers. Keep independent OS and service protections. See [Managed hooks](https://learn.chatgpt.com/docs/enterprise/managed-configuration#enforce-managed-hooks-from-requirements) and [hook behavior](https://learn.chatgpt.com/docs/hooks#pretooluse).

1215 

1216#### Protect the policy and its distribution

1217 

1218On macOS, an administrator can deploy a reviewed and merged requirements file in a root-owned parent directory and prevent the Codex user from writing to the file:

1219 

1220```bash

1221sudo install -d -o root -g wheel -m 755 /etc/codex

1222sudo install -o root -g wheel -m 644 ./requirements.reviewed.toml /etc/codex/requirements.toml

1223ls -ld /etc/codex

1224ls -l /etc/codex/requirements.toml

1225```

1226 

1227On Linux, use the appropriate administrator group; on Windows, protect the ProgramData directory and file with administrator-managed access control lists. Restrict who can change the MDM or cloud policy, review changes, and preserve a rollback copy.

1228 

1229Using a non-admin pilot account, verify that the account cannot modify the policy, parent directory, or managed hook program; try a weaker user or project setting, restart Codex, and verify the enforced behavior persists.

1230 

1231Test each client and environment in scope rather than assuming all clients load the same policy.

1232 

1233#### Verify

1234 

1235Using a non-admin test identity:

1236 

1237- [ ] Attempt to edit the managed policy. Expected: The managed file cannot be changed.

1238 

1239- [ ] Attempt to weaken a restriction through user or project configuration. Expected: Weaker settings are rejected or remain constrained.

1240 

1241- [ ] Restart the client and verify the restrictions still apply.

1242 

1243#### Boundaries

1244 

1245A user or agent with sufficient host administrator privileges may be able to change the surrounding protections. User-editable settings alone are not a substitute for administrator-managed requirements.

1246 

1247</PersistentChecklist>

1248 

1249 

1250 

1251 

1252 

1253## Source pages

1254 

1255- [Configuration Reference](https://learn.chatgpt.com/docs/config-file/config-reference)

1256 

1257- [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration)

1258 

1259- [Advanced Configuration](https://learn.chatgpt.com/docs/config-file/config-advanced)

1260 

1261- [Authentication](https://learn.chatgpt.com/docs/auth)

1262 

1263- [Sandboxing](https://learn.chatgpt.com/docs/sandboxing)

1264 

1265- [Auto-review](https://learn.chatgpt.com/docs/sandboxing/auto-review)

1266 

1267- [Agent approvals and security](https://learn.chatgpt.com/docs/agent-approvals-security)

1268 

1269- [Agent internet access](https://learn.chatgpt.com/docs/cloud/internet-access)

1270 

1271- [Cloud environments](https://learn.chatgpt.com/docs/environments/cloud-environment)

1272 

1273- [Recommended configuration](https://learn.chatgpt.com/docs/cyber-safety/recommended-configuration)

1274 

1275- [Compliance API and audit events](https://learn.chatgpt.com/docs/enterprise/compliance-api)

Details

1# Deploy the Windows app1# Deploy the Windows app and Codex CLI

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 

5Choose how your organization installs apps.5Deploy the Windows desktop app, Codex CLI, or both to managed Windows devices. Choose the app for desktop access or the CLI for terminal access.

6 

7The desktop app and standalone CLI use different installation contexts. Before deploying the CLI, choose and validate the account used to run its installer.

8 

9| Your goal | Start with |

10| ----------------------------------------- | ----------------------------------------------------------------- |

11| Distribute the desktop app | [Deploy the Windows app](#deploy-the-windows-app) |

12| Give employees standalone terminal access | [Deploy Codex CLI on Windows](#deploy-codex-cli-on-windows) |

13| Apply Codex requirements on Windows | [Configure managed requirements](#configure-managed-requirements) |

14| Prepare Windows command execution | [Configure the Windows sandbox](#configure-the-windows-sandbox) |

15 

16## Deploy the Windows app

17 

18Choose a method based on your management tool and whether devices can access Microsoft's distribution services.

19 

20Before deployment, configure applicable controls using [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration). To prepare Codex command execution in the desktop app, follow [Windows sandbox setup](https://learn.chatgpt.com/docs/windows/windows-sandbox). Check device compatibility and complete any required legacy setup.

21 

22The MSIX links below download the latest release for each architecture, not a historical version. Review the downloaded package and keep the approved artifact in your deployment system. Follow [Manage app updates](https://learn.chatgpt.com/docs/enterprise/manage-app-updates) to coordinate the app's built-in updater with Microsoft Store, Intune, and other deployment tools.

6 23 

7<a id="deploy-the-app-with-an-enterprise-management-tool"></a>24<a id="deploy-the-app-with-an-enterprise-management-tool"></a>

8 25 


59For optional installation through Company Portal, use **Available for enrolled79For optional installation through Company Portal, use **Available for enrolled

60devices** instead.80devices** instead.

61 81 

62Devices need access to the Microsoft Store and Windows Update endpoints in82Devices need access to the Microsoft Store and Windows Update endpoints in Microsoft's [network requirements](https://learn.microsoft.com/en-us/intune/fundamentals/endpoints#microsoft-store). If these endpoints are blocked, select **Offline MSIX**.

63Microsoft's [network requirements](https://learn.microsoft.com/en-us/intune/fundamentals/endpoints#microsoft-store).

64If your network blocks these endpoints, select **Offline MSIX**.

65 83 

66For installation context, network requirements, and deployment monitoring, see84For installation context, network requirements, and deployment monitoring, see

67Microsoft's [Intune Store app guide](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-microsoft-store).85Microsoft's [Intune Store app guide](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-microsoft-store).


73 91 

74### Deploy an offline package with Intune92### Deploy an offline package with Intune

75 93 

76Use a downloaded MSIX when devices can't use Microsoft's distribution services94Use a downloaded MSIX when devices can't use Microsoft's distribution services or you need to distribute a package your organization has reviewed. The links download the latest release. For repeat deployments, use the approved artifact in your deployment system. Choose **Required** for automatic installation.

77or you need to deploy a specific approved version. Choose a **Required**

78assignment so Intune installs the app automatically.

79 95 

80<WarningTip>96<WarningTip>

81 If you've only blocked access to the Microsoft Store app, you can still deploy97 Blocking access to the Microsoft Store app does not prevent deployment through

82 through Intune's Microsoft Store integration. Select **Microsoft Store98 Intune's Microsoft Store integration. You can still use **Microsoft Store

83 (recommended)** above.99 (recommended)**.

84</WarningTip>100</WarningTip>

85 101 

86 102 


1072. In the Intune admin center, go to **Apps** > **All apps** > **Create**.1242. In the Intune admin center, go to **Apps** > **All apps** > **Create**.

108 Select **Line-of-business app**, upload the MSIX, and review the package125 Select **Line-of-business app**, upload the MSIX, and review the package

109 information.126 information.

127 

1103. On **Assignments**, add your target device group under **Required**.1283. On **Assignments**, add your target device group under **Required**.

129 

1114. In that assignment's **Install Context** column, select **User context**,1304. In that assignment's **Install Context** column, select **User context**,

112 change it to **Device context**, and save.131 change it to **Device context**, and save.

1135. Review and create the app. Confirm successful installation in **Device132 

114 install status**, then have employees launch ChatGPT normally.1335. Review and create the app. Confirm successful installation in **Device install status**, then have employees launch ChatGPT normally.

115 134 

116</WorkflowSteps>135</WorkflowSteps>

117 136 


124 143

125 144 

126 145 

127To let users choose when to install the offline package, use a **Windows app146To offer installation through Company Portal, deploy the offline package as a **Windows app (Win32)** with an **Available for enrolled devices** assignment:

128(Win32)** with an **Available for enrolled devices** assignment:

129 147 

130<WorkflowSteps>148<WorkflowSteps>

131 149 

1321. Download the [x64 MSIX](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-x64.msix) or [Arm64 MSIX](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-arm64.msix), plus the [offline license](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-License.xml). Rename the package to `ChatGPT.msix` and keep both files in the same1501. Download the [x64 MSIX](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-x64.msix) or [Arm64 MSIX](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-arm64.msix), plus the [offline license](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-License.xml). Rename the package to `ChatGPT.msix` and keep both files in the same

133 folder.151 folder.

1342. Save the following as `Install-ChatGPT.ps1`152 

135 beside the downloaded files:1532. Save this script as `Install-ChatGPT.ps1` beside the downloaded files:

136 154 

137```powershell155```powershell

138 #Requires -RunAsAdministrator156 #Requires -RunAsAdministrator


144 -Regions all162 -Regions all

145```163```

146 164 

1473. Use Microsoft's [Win32 app workflow](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-win32) to package these files and add a **Windows app (Win32)** in Intune. Set1653. Save this script as `Uninstall-ChatGPT.ps1` beside the MSIX, license, and installation script. Configure Intune to run this script in System context when uninstalling the app. The script removes the provisioned package and app registrations for all users on the device:

148 **Install behavior** to **System**, target the package's architecture, and166 

149 run the script with 64-bit Windows PowerShell. Assign it as167```powershell

150 **Available for enrolled devices**.168 #Requires -RunAsAdministrator

169 $ErrorActionPreference = 'Stop'

170 

171 Get-AppxProvisionedPackage -Online |

172 Where-Object DisplayName -eq 'OpenAI.Codex' |

173 Remove-AppxProvisionedPackage -Online -AllUsers

174 

175 Get-AppxPackage -AllUsers -Name 'OpenAI.Codex' |

176 Remove-AppxPackage -AllUsers

177```

178 

179 Follow your organization's PowerShell script-signing policy for both scripts.

180 

1814. Use Microsoft's [Win32 app workflow](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-win32) to package the MSIX, license, `Install-ChatGPT.ps1`, and `Uninstall-ChatGPT.ps1` together. Add a **Windows app (Win32)** in Intune, set **Install behavior** to **System**, and target the package's architecture. Configure the 64-bit install and uninstall commands below, then assign the app as **Available for enrolled devices**.

151 182 

152</WorkflowSteps>183</WorkflowSteps>

153 184 

154<details>185<details>

155<summary>Win32 installation and detection settings</summary>186<summary>Win32 installation, removal, and detection settings</summary>

156 187 

157Use this install command:188Set **Install command** to:

158 189 

159```text190```text

160%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -File .\Install-ChatGPT.ps1191%SystemRoot%\Sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -File .\Install-ChatGPT.ps1

161```192```

162 193 

163For the custom detection rule, run the following script in 64-bit PowerShell.194For devices where Windows is installed at `C:\Windows`, set **Uninstall command** to:

164It reports success when Windows has provisioned the app on the device. If you deploy a195 

165specific version, also compare its `Version` with your approved version.196```text

197C:\Windows\Sysnative\WindowsPowerShell\v1.0\powershell.exe -NoProfile -File .\Uninstall-ChatGPT.ps1

198```

199 

200Use the actual Windows directory if it differs. This literal path selects 64-bit Windows PowerShell from Intune's 32-bit command context. Do not substitute `%SystemRoot%` in the uninstall field: Intune does not expand environment variables there. If you need variable expansion, package a wrapper script as described in [Microsoft's program settings](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-win32#step-2-program).

201 

202Run this custom detection script in 64-bit PowerShell. It reports success when the app is provisioned on the device. To detect a specific approved version, also compare the package's `Version` with that version.

166 203 

167```powershell204```powershell

168$package = Get-AppxProvisionedPackage -Online -ErrorAction Stop |205$package = Get-AppxProvisionedPackage -Online -ErrorAction Stop |


175exit 1212exit 1

176```213```

177 214 

178For the uninstall command, package an `Uninstall-ChatGPT.ps1` script with these215Windows registers the provisioned package at sign-in. If the app doesn't appear, have users sign out and back in.

179commands and run it in the same System context. This removes the provisioned

180package and the app registrations for all users on the device.

181 

182```powershell

183#Requires -RunAsAdministrator

184$ErrorActionPreference = 'Stop'

185 

186Get-AppxProvisionedPackage -Online |

187 Where-Object DisplayName -eq 'OpenAI.Codex' |

188 Remove-AppxProvisionedPackage -Online -AllUsers

189 

190Get-AppxPackage -AllUsers -Name 'OpenAI.Codex' |

191 Remove-AppxPackage -AllUsers

192```

193 

194Follow your organization's PowerShell script-signing policy for both scripts.

195 

196The app becomes available to users when Windows registers the provisioned

197package at sign-in. Have users sign out and back in if it doesn't appear.

198 216 

199</details>217</details>

200 218 


227 247 

228</WorkflowSteps>248</WorkflowSteps>

229 249 

230Use the Windows app package deployment type, rather than the Store-link250Use the Windows app package deployment type, not the Store-link type. See Microsoft's [Configuration Manager guide](https://learn.microsoft.com/en-us/intune/configmgr/apps/get-started/creating-windows-applications) for package requirements and all-user provisioning.

231deployment type. For package requirements and all-user provisioning, see

232Microsoft's [Configuration Manager guide](https://learn.microsoft.com/en-us/intune/configmgr/apps/get-started/creating-windows-applications).

233 251 

234If your deployment workflow requires it, download the [offline license](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-License.xml) alongside the package.252If your deployment workflow requires it, download the [offline license](https://persistent.oaistatic.com/codex-app-prod/ChatGPT-License.xml) alongside the package.

235 253 

254#### Remove a provisioned app with Configuration Manager

255 

256If users have already signed in to devices with the provisioned app, create both uninstall deployments:

257 

2581. Target an uninstall deployment to the **device collection** containing the affected devices.

259 

2602. Target a second uninstall deployment to the **user collection** containing users who have already signed in to those devices.

261 

262Removing the provisioned app from the device does not uninstall it for existing users. Verify removal for both the device and those user accounts. See Microsoft's [provisioned app removal guidance](https://learn.microsoft.com/en-us/intune/configmgr/apps/get-started/creating-windows-applications#provision-windows-app-packages-for-all-users-on-a-device).

263 

236 264

237 265 

238 266


240 268 

241### Deploy with another management tool269### Deploy with another management tool

242 270 

243Use your management tool's MSIX deployment workflow to install the app on managed271Use your management tool's MSIX deployment workflow.

244Windows devices.

245 272 

246<WorkflowSteps>273<WorkflowSteps>

247 274 


302 331 

303### Let users install the app332### Let users install the app

304 333 

305Use this option when users can install applications themselves or get help334Use this option when users can install applications themselves or get help from an administrator.

306from an administrator.

307 335 

308<WorkflowSteps>336<WorkflowSteps>

309 337 

3101. Direct users to the [ChatGPT Windows installer](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi).3381. Direct users to the [ChatGPT Windows installer](https://get.microsoft.com/installer/download/9PLM9XGG6VKS?cid=website_cta_psi).

339 

3112. Run the installer and follow the Windows installation3402. Run the installer and follow the Windows installation

312 prompts. An administrator must approve the installation.341 prompts. An administrator must approve the installation.

3133. Open ChatGPT and sign in with a work account to get started.342 

3433. Open ChatGPT and sign in with a work account.

314 344 

315</WorkflowSteps>345</WorkflowSteps>

316 346 


320winget install --id 9PLM9XGG6VKS -s msstore350winget install --id 9PLM9XGG6VKS -s msstore

321```351```

322 352 

323The installer provides automatic updates. Microsoft Store components may appear353The installer provides automatic updates. Microsoft Store components may appear during installation or updates; users don't need to browse the Store.

324during installation or updates, but users don't need to browse the Store.

325 354 

326 355

327 356 


331 360 

332### Install from an offline package361### Install from an offline package

333 362 

334Download the files on a connected machine, then copy them to the target device.363Download the files on a connected machine, then copy them to the target device. An administrator must perform the installation.

335An administrator must perform the installation.

336 364 

337<WorkflowSteps>365<WorkflowSteps>

338 366 


353 382 

354</WorkflowSteps>383</WorkflowSteps>

355 384 

356These links provide the latest Store-signed package for each architecture.385The download links provide the latest Store-signed package for each architecture. Offline installation still requires online access to use ChatGPT. Standalone MSI and non-Store EXE packages aren't available for the desktop app.

357Offline installation doesn't provide offline access to ChatGPT. Standalone

358MSI and non-Store EXE packages aren't available.

359 386 

360 387

361 388 


364 391 

365</Tabs>392</Tabs>

366 393 

394## Deploy Codex CLI on Windows

395 

396Prepare the CLI package, apply your device policy, and verify terminal access from the employee's account.

397 

398### Before you begin

399 

400- Identify the target Windows devices and users and their processor architectures, then choose an installation method. Confirm that users have Codex access and can complete your organization's sign-in flow.

401 

402- For Intune, prepare app-management permissions, enrolled devices that meet [Microsoft's Win32 packaging prerequisites](https://learn.microsoft.com/en-us/intune/app-management/deployment/create-win32-package), and an unattended installation package.

403 

404- Assign responsibility for CLI updates and removal. If you use npm, account for the managed Node.js/npm installation and its global package location.

405 

406### Choose an installation method

407 

408Choose an installation method and an explicit CLI release. Review the [CLI releases on GitHub](https://github.com/openai/codex/releases), then replace `<approved-version>` in the examples with your approved version number in `x.y.z` form. Use the same version in your package and detection rule.

409 

410The standalone installer defaults to `latest` when no release is specified. Set `-Release` explicitly to pin the deployment to a release; see the [installer's release parameter](https://github.com/openai/codex/blob/092d3acd6bec3e3a14bdc7e7a2810ab628ab759d/scripts/install/install.ps1#L1-L14). For general installation guidance, see [CLI installation](https://learn.chatgpt.com/docs/codex/cli).

411 

412**Standalone PowerShell installer.** From a new PowerShell window, download the installer and pass the approved release:

413 

414```powershell

415$CodexRelease = '<approved-version>'

416Invoke-WebRequest -UseBasicParsing -Uri 'https://chatgpt.com/codex/install.ps1' -OutFile '.\codex-install.ps1'

417powershell -ExecutionPolicy Bypass -File .\codex-install.ps1 -Release $CodexRelease

418```

419 

420**npm.** If Node.js and npm are already managed on the device, select the approved package version explicitly:

421 

422```powershell

423$CodexRelease = '<approved-version>'

424npm install -g "@openai/codex@$CodexRelease"

425```

426 

427For managed distribution, keep the reviewed installer or package artifact and selected release in your IT-owned package. Define installation context, detection, removal, and update behavior. Selecting a version does not change the installer's user-profile defaults or provide a complete unattended deployment wrapper.

428 

429### Set the installation context

430 

431The [standalone installer](https://chatgpt.com/codex/install.ps1) defaults to runtime files in the current user's profile, a command directory at `%LOCALAPPDATA%\Programs\OpenAI\Codex\bin`, and the **User PATH**.

432 

433Running the unchanged installer as **SYSTEM** targets the SYSTEM profile and environment. Selecting **System** in Intune does not make this an all-users installation.

434 

435| Deployment choice | What to validate |

436| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

437| Install for the signed-in employee | Run installation and detection in that user's context. Open a new terminal and confirm that the employee can resolve and run `codex`. |

438| Build a device-wide package | Define and validate the machine installation layout, runtime files, permissions, PATH exposure, detection, and removal. The default installer does not provide this design. |

439| Use npm | Confirm the global package prefix and command location for the account running npm. “Global” does not necessarily mean all Windows users. |

440 

441Separate user installation, device policy delivery, and administrator-approved sandbox setup. When a procedure requires an employee's profile, use that employee's identity rather than SYSTEM.

442 

443Keep the standalone runtime files together; copying only `codex.exe` is not a complete standalone package.

444 

445### Package and assign the CLI through Intune

446 

447Prepare and validate an IT-owned Win32 package with an unattended installer, uninstaller, and detection logic for the chosen installation context.

448 

449<WorkflowSteps>

450 

4511. Prepare a source folder containing the approved installation payload and your unattended setup script. Specify the approved CLI release in that script rather than allowing it to resolve `latest`. Keep the Microsoft packaging tool and output folder outside that source folder.

452 

4532. Generate the `.intunewin` file with the Microsoft Win32 Content Prep Tool. This example assumes your reviewed setup script is named `Install-Codex.ps1`:

454 

455```powershell

456 IntuneWinAppUtil.exe -c C:\Packages\Codex\Source -s Install-Codex.ps1 -o C:\Packages\Codex\Output -q

457```

458 

459 The tool packages the source folder's contents. See [Create a Win32 app package](https://learn.microsoft.com/en-us/intune/app-management/deployment/create-win32-package).

460 

4613. In Intune, create a **Windows app (Win32)** and upload the package.

462 

4634. Set the install and uninstall commands, **User** or **System** behavior, requirements, and detection rules to match the package.

464 

4655. Assign it as **Required** or **Available for enrolled devices**.

466 

467</WorkflowSteps>

468 

469Intune requires unattended installation. Custom detection scripts must exit with code `0` and write to stdout; output on stderr causes detection failure. See [Add and assign a Win32 app](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-win32).

470 

471Verify the CLI from the employee's account, even when the management agent reports a successful exit code.

472 

473For Configuration Manager (SCCM), use the reviewed CLI installation design in your application workflow, with a CLI-specific installer and detection rule. The desktop app's MSIX settings apply only to the desktop app.

474 

475### Configure managed requirements

476 

477Deploy administrator-enforced Windows requirements to:

478 

479```text

480%ProgramData%\OpenAI\Codex\requirements.toml

481```

482 

483Deliver the file through your endpoint management tool. Give intended users read access and prevent ordinary users from changing the administrator-owned policy.

484 

485Requirements constrain settings; configuration defaults supply starting values. Review both the local file and applicable cloud policy to determine the effective configuration.

486 

487Choose requirements for permissions, approvals, network access, and sandbox behavior. See [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration#locations-and-precedence) for supported fields and precedence.

488 

489After deployment, launch Codex as the employee and use `/status` and `/debug-config` to confirm the effective policy. Installing the CLI or delivering requirements does not grant workspace access.

490 

491### Configure the Windows sandbox

492 

493Check device compatibility before choosing a Windows sandbox. The [Windows sandbox guide](https://learn.chatgpt.com/docs/windows/windows-sandbox) covers Microsoft Execution Containers (MXC) and the legacy implementations.

494 

495#### Prefer MXC on compatible devices

496 

497For standalone CLI use, enable MXC preference in `config.toml`:

498 

499```toml

500[features]

501prefer_mxc = true

502```

503 

504You can also enforce this feature value through `requirements.toml`. The preference permits legacy fallback when MXC is unavailable. Check the device requirements in the Windows sandbox guide before enabling it.

505 

506On CLI version 0.162.0 or later, run this compatibility probe from a project directory:

507 

508```powershell

509codex -c windows.sandbox=mxc sandbox --include-managed-config --permission-profile :workspace -- cmd.exe /d /c echo MXC_OK

510$LASTEXITCODE

511```

512 

513Expect `MXC_OK` and an exit code of `0`. This checks the explicit MXC command; also inspect the employee's normal session configuration.

514 

515Before rollout, compare the sandbox guide's networking constraints with your managed network policy.

516 

517#### Prepare the legacy fallback

518 

519When MXC is unavailable or disabled, prefer the `elevated` legacy fallback. It requires administrator-approved setup, but sandboxed commands run without administrator privileges.

520 

521Follow the [IT-led setup procedure](https://learn.chatgpt.com/docs/windows/windows-sandbox) for the employee account and Codex home. Run this example from an appropriately elevated process:

522 

523```powershell

524codex sandbox setup --elevated --user 'DOMAIN\alice' --codex-home 'C:\Users\alice\.codex'

525```

526 

527Replace the sample identity and path with the intended user's values. Use an administrator-trusted CLI installation for elevated setup.

528 

529To permit only the elevated legacy implementation, add the following to `%ProgramData%\OpenAI\Codex\requirements.toml`, not `config.toml`. See [Configure a legacy fallback](https://learn.chatgpt.com/docs/windows/windows-sandbox#configure-a-legacy-fallback):

530 

531```toml

532[windows]

533allowed_sandbox_implementations = ["elevated"]

534```

535 

536This restricts legacy fallback without blocking MXC. Before allowing `unelevated`, review its weaker network isolation and lack of denied-read-path support.

537 

538### Verify CLI deployment

539 

540As an intended employee, open a new PowerShell window without administrator privileges:

541 

542```powershell

543Get-Command codex

544codex --version

545codex

546```

547 

548Confirm that the executable resolves to the intended installation, then complete the approved sign-in flow. Run a small task in a designated test project and inspect the active configuration.

549 

550| Check | Action and expected result |

551| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |

552| Installation context | Confirm that the CLI resolves from the intended employee's account, including after a new sign-in. |

553| Management-tool detection | Check that devices with the CLI installed are detected and that devices without it, including devices where it was removed, are not detected. |

554| Managed requirements | Confirm that the session shows the expected effective policy. |

555| Windows sandbox | Verify that MXC works on compatible devices and the approved legacy fallback is provisioned where required. |

556| Update | Confirm that the employee can run the approved new version after deployment. |

557| Removal | Confirm that the package removes its installation and PATH entry without deleting unrelated user configuration or project data. |

558 

367<a id="manage-in-app-updates"></a>559<a id="manage-in-app-updates"></a>

368 560 

369## Manage app updates561## Manage updates

562 

563### Desktop app

370 564 

371The app checks for updates by default, including after an offline565The app checks for updates by default, including after an offline

372installation. To enable automatic updates, allow devices to reach566installation. To enable automatic updates, allow devices to reach

373`persistent.oaistatic.com`. If you disable automatic updates, deploy newer567`persistent.oaistatic.com`. If you disable automatic updates, deploy newer

374packages through your management tool.568packages through your management tool.

375 569 

376For update policy and rollout guidance, see570Follow [Manage app updates](https://learn.chatgpt.com/docs/enterprise/manage-app-updates) to coordinate all update sources. Disabling the built-in updater does not stop Microsoft Store, Intune, or other management tools from updating the app, nor does it provide OpenAI-managed version pinning or a separate release channel. Confirm the installed version through your deployment system.

377[Manage app updates](https://learn.chatgpt.com/docs/enterprise/manage-app-updates). Disabling the built-in571 

378updater doesn't disable updates from the Microsoft Store or your management tool.572### Codex CLI

573 

574For each CLI update, choose a new approved release, update the explicit `-Release` value or npm package version in your deployment package, and update its detection rule. Deploy through your package process, then verify the installed version, account context, and detection behavior. Do not switch the managed package back to an installer command without an explicit release. See [CLI releases](https://github.com/openai/codex/releases), [CLI installation and updates](https://learn.chatgpt.com/docs/codex/cli), and [npm version selection](https://docs.npmjs.com/cli/v11/using-npm/package-spec).

379 575 

380## Troubleshooting576## Troubleshooting

381 577 

382<details>578<details>

383<summary>Users are prompted for administrator credentials when installing</summary>579<summary>Users are prompted for administrator credentials when installing</summary>

384 580 

385For self-install, this is expected. An administrator must approve the installation.581When users install the app themselves, an administrator must approve the installation.

386 582 

387For an Intune deployment through the Microsoft Store:583For an Intune deployment through the Microsoft Store:

388 584 


4184. Refresh the client's machine policy, then retry the installation in Software6174. Refresh the client's machine policy, then retry the installation in Software

419 Center.618 Center.

420 619 

421For more information about the provisioning setting, see Microsoft's [application deployment settings](https://learn.microsoft.com/en-us/intune/configmgr/apps/deploy-use/create-applications#automatically-detect-application-information).620For details about the provisioning setting, see Microsoft's [application deployment settings](https://learn.microsoft.com/en-us/intune/configmgr/apps/deploy-use/create-applications#automatically-detect-application-information).

422 621 

423</details>622</details>

424 623 

624### Codex CLI installation and configuration

625 

626| Symptom | What to check |

627| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

628| Intune reports success, but the employee cannot run Codex | Check the installation account, runtime location, and account whose PATH was updated. The unchanged installer running as SYSTEM does not install into the employee's profile. |

629| `codex` is not recognized after installation | Open a new terminal. Check the intended account's command directory and PATH. |

630| The wrong Codex version starts | Use `Get-Command codex` to check for competing standalone or npm locations. |

631| MXC probe fails | Check device capabilities, CLI version, and managed policy against the Windows sandbox guide. Provision the approved legacy fallback where appropriate. |

632| Legacy sandbox setup requests administrator approval | Complete IT-led setup for the employee's identity and Codex home. |

633| Managed settings differ from the local requirements file | Use `/status` and `/debug-config` to review effective settings, policy precedence, and supported fields. |

634 

425## Related resources635## Related resources

426 636 

637- [CLI installation](https://learn.chatgpt.com/docs/codex/cli)

638 

427- [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration)639- [Managed configuration](https://learn.chatgpt.com/docs/enterprise/managed-configuration)

640 

641- [Windows sandbox setup](https://learn.chatgpt.com/docs/windows/windows-sandbox)

642 

428- [ChatGPT desktop app for Windows](https://learn.chatgpt.com/docs/windows/windows-app)643- [ChatGPT desktop app for Windows](https://learn.chatgpt.com/docs/windows/windows-app)

644 

645- See [Microsoft Win32 packaging guide](https://learn.microsoft.com/en-us/intune/app-management/deployment/create-win32-package)

646 

647- See [Microsoft Win32 deployment settings](https://learn.microsoft.com/en-us/intune/app-management/deployment/add-win32)

permissions.md +13 −0

Details

291workspace writes while keeping environment files, generated secrets, or similar291workspace writes while keeping environment files, generated secrets, or similar

292credential-bearing files unreadable.292credential-bearing files unreadable.

293 293 

294On Linux, WSL, and native Windows with MXC or `elevated`, deny-read glob matches

295are enumerated when each sandboxed process starts. Matching files created afterward are not

296added to that process's deny list and remain readable if its other permissions

297allow access. For example, a long-running shell, script, watcher, or development

298server can read a matching `.env` file created after it started.

299 

300This snapshot lasts for the sandboxed process's lifetime, not the whole Codex

301session. Starting a new sandboxed process through Codex enumerates the matches

302again; continuing to use an already-running process does not refresh its deny

303list. Don't rely on a glob to block newly created files in that running process.

304See [Windows MXC compatibility](https://learn.chatgpt.com/docs/windows/windows-sandbox#mxc-compatibility)

305for Windows-specific limits.

306 

294`deny` glob patterns are supported as deny-read rules. `read` or `write` globs307`deny` glob patterns are supported as deny-read rules. `read` or `write` globs

295are less portable on Linux, WSL, and native Windows sandboxing, so prefer exact308are less portable on Linux, WSL, and native Windows sandboxing, so prefer exact

296paths or subtree rules such as `"docs/**" = "read"` when possible.309paths or subtree rules such as `"docs/**" = "read"` when possible.

security.md +39 −116

Details

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 

5Codex Security is an application security agent that helps security and5Codex Security reviews code for vulnerabilities and reports evidence you can

6engineering teams find, confirm, and fix vulnerabilities. Use it in6use to investigate and fix them. Choose how to run it based on where your code

7Codex, from your terminal, through the TypeScript SDK, or with connected GitHub7lives and how you want to review the results.

8repositories.

9 8 

10<CtaPillLink9## Choose where to start

11 href="https://chatgpt.com/plugins/share/676aca3811d54fa7bcdef5255236b3c4"

12 label="Install local Security plugin"

13 icon="external"

14 class="mb-8 mt-2"

15/>

16 10 

17For your first local scan, start with the [Codex Security plugin11| Use | When you want to | Start here |

18quickstart](https://learn.chatgpt.com/docs/security/plugin).12| --------------------- | ------------------------------------------------------------------------- | --------------------------------------------------- |

13| Codex Security Cloud | Scan connected GitHub repositories in Codex cloud or monitor new commits. | [Cloud setup](https://learn.chatgpt.com/docs/security/setup) |

14| Codex Security plugin | Scan a local repository in Codex and work through findings interactively. | [Run your first local scan](https://learn.chatgpt.com/docs/security/plugin) |

15| Codex Security CLI | Run repeatable terminal scans or add checks to CI. | [CLI quickstart](https://learn.chatgpt.com/docs/security/cli) |

16| Codex Security SDK | Run scans and handle results in an application or developer tool. | [SDK guide](https://learn.chatgpt.com/docs/security/sdk) |

19 17 

20## Use Codex Security in the desktop app18For your first local scan, use the plugin. In the ChatGPT desktop app, select

19**Codex**, install **Codex Security**, and open **Security** in the sidebar.

20The [Security workbench](https://learn.chatgpt.com/docs/security/plugin/workbench) keeps saved scans

21and findings available for review. You can also use the plugin in Codex CLI.

21 22 

22In the ChatGPT desktop app, open the ChatGPT dropdown and select **Codex**.23The Codex Security CLI and SDK are distributed in the public [@openai/codex-security package](https://github.com/openai/codex-security). Scans using OpenAI inference require Codex Security access. See each quickstart for its

23Install and enable the Codex Security plugin to open **Security** in the24runtime and authentication requirements.

24sidebar. The Security workbench keeps your scans, findings, and repositories in

25one place while Codex runs each scan in a task.

26 25 

27- Use **Scans** to start scans, follow their progress, and review saved results.26Codex Security Cloud is a separate plugin, available in research preview on

28- Use **Findings** to inspect issues and evidence across completed scans.27the web and in the desktop app. It requires workspace access, a GitHub

29- Use **Repositories** to review repository history and open findings.28connection, and a compatible Codex cloud environment. You can connect the

30 29repository and create an environment during setup.

31See [Use the Security workbench](https://learn.chatgpt.com/docs/security/plugin/workbench) for the

32complete desktop-app workflow.

33 

34### Explore plugin use cases

35 

36- [Run a security scan](https://learn.chatgpt.com/docs/security/plugin/scans) for a repository or one scoped folder.

37- [Run a deep security scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans) when you need broader review and can wait longer for it to finish.

38- [Review code changes](https://learn.chatgpt.com/docs/security/plugin/code-changes) before you merge a pull request or branch.

39- [Triage a backlog](https://learn.chatgpt.com/docs/security/plugin/triage-backlog) when you have existing security findings to review.

40- [Fix and verify findings](https://learn.chatgpt.com/docs/security/plugin/fix-findings) with bounded patches for approved findings.

41- [Export or track findings](https://learn.chatgpt.com/docs/security/plugin/export-findings) as portable artifacts or approval-gated tracking destinations.

42- [Write vulnerability reports](https://learn.chatgpt.com/docs/security/plugin/vulnerability-reports) from supplied findings, disclosure notes, source, and PoCs.

43- [Propose security hardening](https://learn.chatgpt.com/docs/security/plugin/security-hardening) from scan results or other security evidence.

44- [See what's new](https://learn.chatgpt.com/docs/security/plugin/changelog) in the Codex Security plugin.

45 

46The desktop Security workbench and Codex CLI use the Codex Security plugin.

47 The separate Codex Security Cloud plugin scans connected GitHub repositories

48 in Codex cloud. For Codex sandboxing, approvals, network controls, and admin

49 settings, see [Agent approvals & security](https://learn.chatgpt.com/docs/agent-approvals-security).

50 

51## Codex Security CLI and SDK

52 

53The CLI and TypeScript SDK are available as the public

54[`@openai/codex-security`](https://github.com/openai/codex-security) package.

55Run the CLI with `npx`:

56 

57```bash

58npx @openai/codex-security --help

59```

60 

61Running scans requires Codex Security access. For best results, use an account

62verified for [Trusted Access for Cyber](https://chatgpt.com/cyber).

63 

64Use the same scanner as the plugin across repositories and over time. The CLI

65discovers GitHub repositories, resumes bulk scans, tracks findings across

66scans, and records false-positive feedback. Add your architecture and security

67policies, set an estimated cost limit, or run checks in CI and before commits.

68Use the TypeScript SDK to build scanning, progress reporting, and cost controls

69into an application or developer tool.

70 

71- [Start with the CLI quickstart](https://learn.chatgpt.com/docs/security/cli) to set up the CLI,

72 preflight a repository, and run a local scan.

73- [Run bulk security scans](https://learn.chatgpt.com/docs/security/cli/bulk-scans) to discover GitHub

74 repositories or run a resumable campaign from a CSV inventory.

75- [Run scans in CI](https://learn.chatgpt.com/docs/security/cli/ci) to review pull-request changes,

76 preserve artifacts, upload SARIF, and set a severity policy.

77- [Read the CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq) for answers about scan history,

78 false-positive feedback, coverage, and fix verification.

79- [Use the CLI reference](https://learn.chatgpt.com/docs/security/cli/reference) to check supported

80 commands, flags, output formats, artifacts, and exit codes.

81- [Integrate the TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) to select targets,

82 inspect results, track progress, and cancel scans from code.

83 

84## Codex Security Cloud

85 

86Codex Security Cloud is a plugin for scanning connected GitHub repositories

87in Codex cloud. It's available in research preview on the web and in the

88desktop app.

89 

90Open **Plugins** to find and install **Codex Security Cloud**. Follow

91[Cloud setup](https://learn.chatgpt.com/docs/security/setup) to connect GitHub and start your first scan.

92 

93<CtaPillLink

94 href="https://chatgpt.com/plugins/plugin_connector_1p_6317a32dbf5c81919acd66de6722daf5"

95 label="Find Codex Security Cloud"

96 target="_blank"

97 rel="noopener noreferrer"

98 icon="external"

99 class="my-8"

100/>

101 30 

102<figure className="not-prose my-8">31<figure className="not-prose my-8">

103 <CodexScreenshot32 <CodexScreenshot


115 </figcaption>44 </figcaption>

116</figure>45</figure>

117 46 

118## How Codex Security Cloud works47For security reviews posted to GitHub pull requests, see

119 48[Security Review](https://learn.chatgpt.com/docs/security/security-review).

120Choose **One-Time Scan** to review a repository once, or **Continuous Scanning**

121to monitor new commits. Codex uses repository context to identify likely

122vulnerabilities and validates issues in an isolated environment when possible.

123 

124Use **Scans** to follow progress, **Findings** to review issues, and

125**Repositories** to manage monitoring. Review proposed patches before

126creating a pull request.

127 49 

128## Codex Security Cloud access and prerequisites50## Choose the next task

129 51 

130Use a workspace with Codex Security Cloud access, a connected GitHub52After a local scan, review its scope and findings before deciding what to do next.

131repository, and a compatible Codex cloud environment. You can connect GitHub

132and create an environment during scan setup.

133 53 

134If access is unavailable, check with your workspace administrator.54| Task | Guide |

55| ----------------------------------------------------- | ------------------------------------------------------------------- |

56| Focus a scan on a service or add security context | [Run a security scan](https://learn.chatgpt.com/docs/security/plugin/scans) |

57| Run repeated reviews of the same repository or folder | [Run a deep scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans) |

58| Check a pull request, commit, or local diff | [Review code changes](https://learn.chatgpt.com/docs/security/plugin/code-changes) |

59| Assess findings from another scanner or issue tracker | [Triage a backlog](https://learn.chatgpt.com/docs/security/plugin/triage-backlog) |

60| Generate a patch and check whether it fixes the issue | [Fix and verify findings](https://learn.chatgpt.com/docs/security/plugin/fix-findings) |

61| Share results or assign remediation work | [Export and track findings](https://learn.chatgpt.com/docs/security/plugin/export-findings) |

135 62 

136## Related docs63For automation, use the CLI guides to [scan repositories in

64bulk](https://learn.chatgpt.com/docs/security/cli/bulk-scans) or [run scans in

65CI](https://learn.chatgpt.com/docs/security/cli/ci). Look up commands and defaults in the

66[CLI reference](https://learn.chatgpt.com/docs/security/cli/reference).

137 67 

138- [Codex Security plugin quickstart](https://learn.chatgpt.com/docs/security/plugin) walks through installation and a first local scan.68Codex Security scans application code. For permissions and sandbox controls

139- [Security workbench](https://learn.chatgpt.com/docs/security/plugin/workbench) explains saved scans, findings, repositories, and scan activity in the desktop app.69that govern Codex itself, see [Agent approvals and

140- [Codex Security CLI quickstart](https://learn.chatgpt.com/docs/security/cli) walks through setup, preflight, and a first terminal scan.70security](https://learn.chatgpt.com/docs/agent-approvals-security).

141- [Run bulk security scans](https://learn.chatgpt.com/docs/security/cli/bulk-scans) explains GitHub discovery, CSV inventories, campaign results, and resume behavior.

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

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

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

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

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

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

security/cli.md +86 −382

Details

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 

5Codex Security helps security and engineering teams find, confirm, and fix5Run a standard scan of a local repository with the standalone Codex Security

6vulnerabilities. Use its command-line interface (CLI) to scan6CLI. This quickstart ends with a saved report you can review and revisit.

7repositories you own or have permission to assess, review findings over time,7For scans inside a Codex conversation, use the [Codex Security

8and check changes before they land.8plugin](https://learn.chatgpt.com/docs/security/plugin).

9 

10The `@openai/codex-security` package is public. Scans using OpenAI inference

11 require Codex Security access. For an interactive scan in Codex, start with

12 the [Codex Security plugin quickstart](https://learn.chatgpt.com/docs/security/plugin). For connected

13 GitHub repositories, see [Codex Security cloud setup](https://learn.chatgpt.com/docs/security/setup).

14 9 

15## Check the prerequisites10## Check the prerequisites

16 11 

17The CLI requires Node.js 22 (22.13.0 or later), 24, or 26. Scans, bulk scans,12You need Node.js 22 (22.13.0 or later), 24, or 26, plus Python 3.10 or later.

18exports, scan history, and saved findings also require Python 3.10 or later.13Python 3.10 also needs `tomli`. Scans using OpenAI inference require Codex Security access.

19For more detail, see [Authentication and14Depending on your account and repository, full-repository scans may also

20prerequisites](https://learn.chatgpt.com/docs/security/cli/reference#authentication-and-prerequisites).15require [Trusted Access for Cyber](https://chatgpt.com/cyber).

16 

17The CLI runs with your operating-system permissions and doesn't pause for

18approval.

19Scan processes can inherit your environment, so remove unrelated credentials

20before starting. See [Local scan

21permissions](https://learn.chatgpt.com/docs/security/cli/reference#local-scan-permissions).

21 22 

22## Set up and verify the CLI23## Set up and verify the CLI

23 24 

24Run the CLI with `npx` and check its version:25Run the public package with `npx`:

25 26 

26```bash27```bash

27npx @openai/codex-security --version28npx @openai/codex-security --version

28```29```

29 30 

30To see both the package version and the version of its bundled plugin, run:31The command prints the installed package version. Use `info --json` to check

31 32the bundled plugin version, or `--help` to list commands. Package changes are

32```bash33listed in the [CLI and SDK releases](https://github.com/openai/codex-security/releases).

33npx @openai/codex-security info --json

34```

35 

36See the [CLI and SDK releases](https://github.com/openai/codex-security/releases)

37for package changes.

38 

39List the available commands:

40 

41```bash

42npx @openai/codex-security --help

43```

44 

45See also [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference).

46 34 

47## Sign in35## Sign in

48 36 


52npx @openai/codex-security login40npx @openai/codex-security login

53```41```

54 42 

55On a remote or headless machine, use device authentication:43On a machine without a browser, add `--device-auth` and follow the displayed

56 44sign-in instructions. Use `--auth chatgpt` in the scan commands below to select

57```bash45that sign-in even when your environment also contains an API key.

58npx @openai/codex-security login --device-auth

59```

60 

61For CI and other automated workflows, set an OpenAI API key:

62 

63```bash

64export OPENAI_API_KEY="<your-api-key>"

65```

66 46 

67For Amazon Bedrock, follow the [Amazon Bedrock47For API keys and other providers, see [Select scan

68setup](https://learn.chatgpt.com/docs/security/cli/reference#use-amazon-bedrock) instead of signing in48authentication](https://learn.chatgpt.com/docs/security/cli/reference#select-scan-authentication).

69with ChatGPT or setting an OpenAI API key. Check [Bedrock release49For Amazon Bedrock, use [AWS credentials and model

70status](https://learn.chatgpt.com/docs/security/cli/reference#bedrock-release-status) to see what your50access](https://learn.chatgpt.com/docs/security/cli/reference#use-amazon-bedrock) instead of a ChatGPT

71installed version supports.51sign-in or OpenAI API key.

72 

73For [OpenRouter or

74Fireworks](https://learn.chatgpt.com/docs/security/cli/reference#use-openrouter-or-fireworks), set the

75provider's API key and select a model with `--provider` and `--model`.

76 

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

78 

79```bash

80npx @openai/codex-security scan . --auth chatgpt

81```

82 

83To require the environment API key, select API-key authentication:

84 

85```bash

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

87```

88 

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

90require [Trusted Access for Cyber](https://chatgpt.com/cyber).

91 52 

92## Prepare a scan53## Prepare a scan

93 54 

94Choose a repository you trust and have permission to assess. Scans use your55Replace these paths with your repository and a new results directory outside

95local operating-system permissions and don't pause for approval. Scan56its Git worktree:

96processes can inherit your environment, so remove unrelated credentials before

97you start. See [Local scan

98permissions](https://learn.chatgpt.com/docs/security/cli/reference#local-scan-permissions).

99 

100Choose a directory outside the repository for the scan results:

101 57 

102```bash58```bash

103REPOSITORY=/path/to/repository59REPOSITORY=/path/to/repository

104SCAN_DIR=/path/outside/repository/codex-security-results60SCAN_DIR=/path/outside/repository/codex-security-results

105```61```

106 62 

107If you omit `--output-dir`, Codex Security saves results in its own persistent63Results can include source excerpts and vulnerability details. Choose a private

108state directory. Results can include source excerpts and vulnerability details,64location. If you omit `--output-dir`, the CLI uses its persistent state directory.

109so choose a private location and an appropriate retention policy.

110 

111If the default state directory isn't writable, select a writable directory

112outside the scanned repository:

113 65 

114```bash66Check the target and output location:

115export CODEX_SECURITY_STATE_DIR=/path/outside/repository/codex-security-state

116```

117 

118Check the repository, target, and output directory before starting a scan:

119 67 

120```bash68```bash

121npx @openai/codex-security scan "$REPOSITORY" --output-dir "$SCAN_DIR" --dry-run69npx @openai/codex-security scan "$REPOSITORY" \

70 --auth chatgpt --output-dir "$SCAN_DIR" --dry-run

122```71```

123 72 

124The dry run checks local inputs, including any `--knowledge-base` paths,73A successful dry run confirms the local inputs. It doesn't start a scan, load

125without starting Codex, loading credentials, or probing the plugin's Python74credentials, or check the plugin's Python interpreter, so it doesn't establish

126interpreter.75that authentication and runtime setup will succeed.

127 76 

128## Run your first scan77## Run your first scan

129 78 

130Run a standard scan and keep its results in the selected directory:79Remove `--dry-run` to start the scan:

131 80 

132```bash81```bash

133npx @openai/codex-security scan "$REPOSITORY" --output-dir "$SCAN_DIR"82npx @openai/codex-security scan "$REPOSITORY" \

83 --auth chatgpt --output-dir "$SCAN_DIR"

134```84```

135 85 

136Interactive terminals show a live scan dashboard. Add `--headless` to show86An interactive terminal shows a live dashboard. Non-interactive terminals show progress

137plain progress lines instead. CI and terminals without an interactive session87lines. Add `--headless` to use progress lines in an interactive terminal too.

138use plain progress automatically.88The dashboard and saved logs can contain source code or credentials. Review

139 89them before sharing.

140The dashboard also shows live session details. These can contain source code

141or credentials, so review them before sharing.

142 90 

143By default, the CLI writes scan progress and its completion summary to stderr.91When the scan finishes, stderr includes the report path, finding count, and

144It doesn't print the full scan result to stdout. A completed scan prints a92elapsed time. For example:

145summary like this:

146 93 

147```text94```text

148 REPORT /path/outside/repository/codex-security-results/report.md95 REPORT /path/outside/repository/codex-security-results/report.md

149 96 

150 FINDINGS 2 (2 confirmed this scan; 0 previously found; 1 high, 1 medium)97 FINDINGS 2 (2 confirmed this scan; 0 previously found; 1 high, 1 medium)

151 COVERAGE complete

152 ELAPSED 42s98 ELAPSED 42s

153 RESULTS /path/outside/repository/codex-security-results99 RESULTS /path/outside/repository/codex-security-results

154```100```

155 101 

156Token usage and estimated cost appear when available. To print the complete102By default, the severity of a finding doesn't cause a scan to fail. For

157result as machine-readable JSON, request structured output explicitly:103machine-readable stdout, add `--json`. To make findings fail a CI check, set a

158 104[severity policy](https://learn.chatgpt.com/docs/security/cli/ci#choose-a-severity-policy).

159```bash

160npx @openai/codex-security scan "$REPOSITORY" --output-dir "$SCAN_DIR" --json

161```

162 

163Scans are report-only by default, so findings remain available for local

164review. You may want to add a severity threshold when you are ready to [run scans in

165CI](https://learn.chatgpt.com/docs/security/cli/ci).

166 

167## Choose a model and reasoning effort

168 

169Scans use `gpt-5.6-sol` with `xhigh` reasoning effort by default. Select a

170different model and effort when the task requires them. Choose a model your

171credentials can access. If you use ChatGPT sign-in, check [GPT-6.1 Sol

172availability](https://learn.chatgpt.com/docs/models#gpt-6.1-sol) before using this example:

173 

174```bash

175npx @openai/codex-security scan "$REPOSITORY" \

176 --model gpt-6.1-sol \

177 --effort medium

178```

179 

180 

181Available effort levels depend on the selected model. The CLI supports `minimal`,

182`low`, `medium`, `high`, `xhigh`, and `max`; GPT-6.1 Sol requires at least `low`.

183 105 

184## Review the results106## Review the results

185 107 

186Open `report.md` for the readable result. The scan directory also contains the108Open `report.md` from the reported directory. Confirm the target and revision,

187structured files used by automation:109then read the coverage before reviewing individual findings.

188 

189```text

190codex-security-results/

191├── scan-manifest.json

192├── findings.json

193├── coverage.json

194├── report.md

195├── artifacts/

196└── exports/

197 └── results.sarif # when produced

198```

199 

200- `scan-manifest.json` records the target, scope, producer, and sealed

201 artifacts.

202- `findings.json` records severity, confidence, locations, evidence, and

203 remediation for each finding.

204- `coverage.json` records reviewed surfaces, exclusions, deferred work, open

205 questions, and coverage completeness.

206 

207Coverage can be `complete`, `partial`, or `unknown`. Read any deferred areas or

208open questions before treating the scan as evidence of review.

209The [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference#scan-artifacts) describes

210the full artifact and output contract.

211 

212## Review and patch findings

213 

214After a complete interactive scan with findings, the CLI offers a finding

215browser. Review the evidence and choose which findings to fix. You can find

216the saved tasks in the Codex desktop app.

217 

218To patch high and critical findings without the browser:

219 

220```bash

221npx @openai/codex-security scan "$REPOSITORY" \

222 --patch --patch-severity high --json

223```

224 

225Add `--create-pr` to commit verified patches and open a GitHub pull request.

226 

227You can also patch saved findings or import Linear issues. See the

228[`validate` and `patch` reference](https://learn.chatgpt.com/docs/security/cli/reference#codex-security-validate-and-codex-security-patch).

229 

230## Choose the next scan

231 

232Use a path scan when a repository contains separate services or packages:

233 

234```bash

235npx @openai/codex-security scan "$REPOSITORY" \

236 --path services/billing \

237 --path packages/auth

238```

239 

240Review committed changes between the base revision and `HEAD`:

241 

242```bash

243npx @openai/codex-security scan "$REPOSITORY" --diff origin/main --head HEAD

244```

245 

246Review staged and unstaged changes against `HEAD`:

247 

248```bash

249npx @openai/codex-security scan "$REPOSITORY" --working-tree --base HEAD

250```

251 

252Diff and working-tree scans expect the repository argument to be the Git

253worktree root. Fetch the selected revisions before starting a diff scan.

254 

255Use deep mode when a repository or path needs broader review:

256 

257```bash

258npx @openai/codex-security scan "$REPOSITORY" --mode deep

259```

260 

261To control workers, subagents, and when the scan stops:

262 

263```bash

264npx @openai/codex-security scan "$REPOSITORY" \

265 --mode deep \

266 --workers 2 \

267 --subagents 0 \

268 --stop-after-no-new 3 \

269 --max-discovery-runs 10 \

270 --max-time-hours 1.5

271```

272 

273These options require deep mode, which supports repository and path targets,

274not diff or working-tree scans. Here, `--workers` controls independent

275standard-scan workers within one scan; `bulk-scan --workers` controls concurrent

276repository scans. `--max-time-hours` accepts a positive number up to `96`,

277including fractional hours. At the limit, the scan stops unfinished workers,

278preserves completed scan results, and aggregates them into the final report.

279 

280## Add architecture and security context

281 

282Provide architecture documents, threat models, or security policies as scan

283context. This helps Codex Security evaluate findings against how your system

284actually works:

285 

286```bash

287npx @openai/codex-security scan "$REPOSITORY" \

288 --knowledge-base /path/to/architecture.md \

289 --knowledge-base /path/to/security-policies

290```

291 

292## Add custom scan instructions

293 

294Add instructions that focus the scan on your security priorities. Use a

295second file for follow-up instructions:

296 

297```bash

298npx @openai/codex-security scan "$REPOSITORY" \

299 --scan-prompt-file /path/to/scan.md \

300 --post-scan-prompt-file /path/to/follow-up.md

301```

302 

303The follow-up runs in the same authenticated session after successful scans

304and scans with incomplete coverage or errors. If the follow-up fails, the CLI

305reports a warning and keeps the completed scan. It doesn't run after

306cancellation or a scan that reaches its cost limit. Both options also work

307with `bulk-scan`; a CSV `prompt` column adds repository-specific instructions.

308 

309## Set a scan budget

310 

311Use `--max-cost` to stop a scan when its estimated model cost exceeds a limit

312in USD:

313 

314```bash

315npx @openai/codex-security scan "$REPOSITORY" --max-cost 5

316```

317 

318Requests already in progress can finish slightly above the limit. If a deep

319scan reaches the limit after Codex Security aggregates completed worker

320results, the CLI saves the completed report, marks its coverage as `partial`,

321and returns exit code `2`. If the scan can't produce a completed report, any

322available partial output stays on disk.

323 

324## Scan changes before each commit

325 

326Install a Git pre-commit security check for your repository:

327 

328```bash

329npx @openai/codex-security install-hook

330```

331 

332The check scans staged and unstaged changes before each commit. It blocks

333high-severity findings and scan errors without replacing an existing

334pre-commit script.

335 

336## Scan repositories in bulk

337 

338Sign in to GitHub before discovering repositories:

339 

340```bash

341gh auth login

342```

343 

344Discover and select repositories from your GitHub account or organization:

345 

346```bash

347npx @openai/codex-security bulk-scan

348```

349 

350The interactive flow excludes archived repositories and forks. It asks you to

351confirm the selected repositories before scanning.

352 

353To scan a prepared repository list, provide a CSV and an output directory:

354 

355```bash

356npx @openai/codex-security bulk-scan repositories.csv \

357 --output-dir /path/outside/repositories/security-scans \

358 --workers 4

359```

360 110 

361Run the same command again to resume an existing bulk scan. Codex Security111Check `scan.status` in `scan-manifest.json` to confirm that the scan completed.

362skips completed repositories. Add `--max-attempts 3` when you want to retry112Review `coverage.json` for reviewed surfaces, excluded paths, deferred work,

363temporary repository or scan errors.113and open questions.

364 114 

365For GitHub discovery, CSV preparation, campaign results, and Docker setup, see115A completed scan exits with `0` unless findings meet a configured severity

366[Run bulk security scans](https://learn.chatgpt.com/docs/security/cli/bulk-scans).116threshold, which returns `1`. Coverage gaps don't change the exit code, so

117exit `0` doesn't mean every file was reviewed. Input, execution, result-integrity,

118or required-output failures return `2`. The

119[CLI reference](https://learn.chatgpt.com/docs/security/cli/reference#exit-codes-and-signals) explains

120the exit codes.

367 121 

368## Run bulk scans in Docker122For each finding, check the affected code, attacker prerequisites, validation

123evidence, and remaining uncertainty. A source-based finding doesn't necessarily

124include a successful runtime reproduction. Select a finding for remediation

125only after its evidence supports the claimed issue.

369 126 

370If your access includes the Codex Security Docker image, use the supplied127Keep the scan directory together when sharing or archiving it. It contains

371hardened Compose configuration and security profile on a Linux Docker host.128`scan-manifest.json`, `findings.json`, and `coverage.json` alongside the report

372The host must support unprivileged user namespace creation. Supply a repository129and supporting artifacts. See [Scan

373CSV, keep results and sign-in state in persistent mounted directories, and130artifacts](https://learn.chatgpt.com/docs/security/cli/reference#scan-artifacts) for the full layout.

374provide credentials through your environment or a secret manager:

375 

376```bash

377docker compose run --rm codex-security \

378 bulk-scan /input/repositories.csv \

379 --output-dir /output \

380 --workers 4

381```

382 

383The container runs bulk scans without interactive prompts. Use the CLI outside

384Docker when you want to discover repositories interactively. For private

385repositories, provide `GH_TOKEN` or `GITHUB_TOKEN` through your environment or

386secret manager. The [sign-in requirements](#sign-in), including account and

387repository access, also apply to containerized scans.

388 131 

389## Revisit a saved scan132## Revisit a saved scan

390 133 

391List the saved scans for your repository:134List scans for the repository:

392 135 

393```bash136```bash

394npx @openai/codex-security scans list "$REPOSITORY"137npx @openai/codex-security scans list "$REPOSITORY"

395```138```

396 139 

397Copy a scan ID from the results to inspect its findings and configuration:140Copy a scan ID from the results:

398 141 

399```bash142```bash

400npx @openai/codex-security scans show SCAN_ID143npx @openai/codex-security scans show SCAN_ID

401```144```

402 145 

403To inspect the saved events from a scan and its workers:146After a complete interactive scan with findings, the CLI also offers a finding

404 147browser. Review the evidence there before choosing a fix. For saved findings,

405```bash148use the [validate and patch

406npx @openai/codex-security scans logs SCAN_ID149commands](https://learn.chatgpt.com/docs/security/cli/reference#codex-security-validate-and-codex-security-patch).

407```

408 

409Saved logs aren't redacted and can contain source code or credentials. Review

410them before sharing.

411 

412List open findings across the repository's scans:

413 150 

414```bash151## Choose the next scan

415npx @openai/codex-security findings list "$REPOSITORY"

416```

417 

418An earlier finding stays open when the latest scan doesn't confirm it.

419 

420To mark a reviewed finding as a false positive, explain why the finding doesn't

421apply:

422 

423```bash

424npx @openai/codex-security findings false-positive FINDING_OCCURRENCE_ID \

425 --reason "The route already checks permissions"

426```

427 

428Later scans consider that explanation but still recheck the current code.

429 

430Run the same scan against the current checkout using its original configuration:

431 

432```bash

433npx @openai/codex-security scans rerun SCAN_ID

434```

435 

436Compare two scans to find new, persisting, reopened, resolved, or unknown

437findings:

438 

439```bash

440npx @openai/codex-security scans compare PREVIOUS_SCAN_ID CURRENT_SCAN_ID

441```

442 

443The comparison automatically matches findings by root cause and reuses saved

444matches.

445 

446For the bulk-scan CSV format, scan-history filters, and command options, see

447the [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference).

448 

449Continue with the workflow that fits your goal:

450 152 

451- [Run bulk security scans](https://learn.chatgpt.com/docs/security/cli/bulk-scans) to discover GitHub153| Goal | Guide |

452 repositories or scan a pinned CSV inventory.154| ---------------------------------------- | ---------------------------------------------------------------------------------------- |

453- [Read the CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq) for answers about scan history,155| Scan selected paths or a diff | [Select the scan target](https://learn.chatgpt.com/docs/security/cli/reference#select-the-scan-target) |

454 false-positive feedback, coverage, and fix verification.156| Use deep scans or limit their runtime | [Configure deep scans](https://learn.chatgpt.com/docs/security/cli/reference#configure-deep-scans) |

455- [Run scans in CI](https://learn.chatgpt.com/docs/security/cli/ci) to review pull requests, preserve157| Supply architecture or security policies | [Add security context](https://learn.chatgpt.com/docs/security/cli/reference#add-security-context) |

456 results, and set a severity policy.158| Change the model or reasoning effort | [Configure the runtime](https://learn.chatgpt.com/docs/security/cli/reference#configure-the-runtime) |

457- [Use the CLI reference](https://learn.chatgpt.com/docs/security/cli/reference) to check every flag,159| Set an estimated cost limit | [Output and policy options](https://learn.chatgpt.com/docs/security/cli/reference#set-output-and-policy-options) |

458 output format, artifact, and exit code.160| Scan multiple repositories | [Bulk scans](https://learn.chatgpt.com/docs/security/cli/bulk-scans) |

459- [Integrate the TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) to run scans from an161| Check pull requests automatically | [CI guide](https://learn.chatgpt.com/docs/security/cli/ci) |

460 application or developer tool.162 

163For authentication problems, repeat-scan differences, or false-positive

164feedback, see the [CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq).

Details

112 112 

113The CLI checks out each pinned revision, scans the selected target, records the113The CLI checks out each pinned revision, scans the selected target, records the

114result, and removes the temporary repository checkout. A repository counts as114result, and removes the temporary repository checkout. A repository counts as

115complete only when its scan has complete coverage and all required result115complete when its scan has a `completed` manifest status and valid required

116artifacts exist.116result artifacts. Coverage gaps don't make the scan fail.

117 117 

118## Share security context and instructions118## Share security context and instructions

119 119 


139 139 

140The CLI appends each repository's CSV `prompt` after the shared scan140The CLI appends each repository's CSV `prompt` after the shared scan

141instructions. Follow-up instructions run in the same authenticated session141instructions. Follow-up instructions run in the same authenticated session

142after successful scans and scans with incomplete coverage or errors, but not142after successful scans and scan errors, but not

143after cancellation or a scan that reaches its cost limit. Prompt file paths143after cancellation or a scan that reaches its cost limit. Prompt file paths

144resolve from your current directory.144resolve from your current directory.

145 145 


178 178 

179## Review campaign results179## Review campaign results

180 180 

181The output directory contains the pinned campaign, an append-only results181The output directory keeps the campaign configuration, a record of each attempt,

182ledger, and separate artifacts for each repository and attempt:182and separate results for each repository:

183 183 

184```text184```text

185security-scans/185security-scans/


219```219```

220 220 

221Results can contain source excerpts and vulnerability details. Keep the221Results can contain source excerpts and vulnerability details. Keep the

222output directory private, outside scanned repositories, and subject to an222output directory private and outside scanned repositories. Set how long to

223appropriate retention policy.223keep the results.

224 224 

225## Resume a campaign225## Resume a campaign

226 226 


232 --workers 4232 --workers 4

233```233```

234 234 

235The CLI resumes unfinished repository scans and skips completed ones. Scans235The CLI resumes the campaign, starting new attempts for eligible unfinished

236with incomplete coverage aren't retried. Their results remain available, and236repositories and skipping completed scans, including scans with coverage gaps.

237the command exits with code `2`.237Their results remain available.

238 238 

239Don't change the repository inventory or scan and follow-up instructions for239Don't change the repository inventory or scan and follow-up instructions for

240an existing output directory. The CLI checks the pinned manifest and rejects a240an existing output directory. The CLI checks the pinned manifest and rejects a


253 --max-attempts 3253 --max-attempts 3

254```254```

255 255 

256The default is one attempt per repository. Every attempt receives its own256The default is one attempt per repository. Each attempt has its own result

257receipt and artifact directory. Retries cover checkout errors, scan failures,257record and artifact directory. Retries cover checkout errors, scan failures,

258and missing required artifacts. Completed scans with incomplete coverage258and missing or invalid required artifacts. Completed scans aren't retried

259aren't retried.259because of coverage gaps or severity-policy violations.

260 260 

261Bulk scans use these exit codes:261Bulk scans use these exit codes:

262 262 

263| Exit code | Meaning |263| Exit code | Meaning |

264| --------- | --------------------------------------------------------------------------------------------------------------------- |264| --------- | ----------------------------------------------------------------------------------------------- |

265| `0` | Every repository completed successfully. |265| `0` | Every repository completed, and any configured severity policy passed. |

266| `2` | A repository couldn't complete, a scan had incomplete coverage, or the command encountered an input or runtime error. |266| `1` | Scans completed, but findings met a configured severity threshold. |

267| `2` | A repository failed because of an input, execution, result-integrity, or required-output error. |

267| `130` | Ctrl-C interrupted the campaign. |268| `130` | Ctrl-C interrupted the campaign. |

268| `143` | SIGTERM terminated the campaign. |269| `143` | SIGTERM terminated the campaign. |

269 270 

270## Run bulk scans in Docker271## Run bulk scans in Docker

271 272 

272The [Codex Security273The [Codex Security repository](https://github.com/openai/codex-security) includes a hardened

273repository](https://github.com/openai/codex-security) includes a hardened

274Compose configuration for automated CSV campaigns on a Linux Docker host. The274Compose configuration for automated CSV campaigns on a Linux Docker host. The

275host must support unprivileged user namespace creation.275host must support unprivileged user namespace creation.

276 276 

security/cli/ci.md +18 −169

Details

10Install the public `@openai/codex-security` package. Running scans still10Install the public `@openai/codex-security` package. Running scans still

11 requires Codex Security access.11 requires Codex Security access.

12 12 

13This guide includes examples for GitHub Actions and GitLab CI/CD. The same scan13This page provides a GitHub Actions workflow. For GitLab, use the

14and export commands work in other CI systems.14[GitLab CI/CD guide](https://learn.chatgpt.com/docs/security/cli/ci/gitlab). The same scan and export

15commands work in other CI systems.

15 16 

16## Prepare the workflow17## Prepare the workflow

17 18 


38 39 

39## Add the GitHub Actions workflow40## Add the GitHub Actions workflow

40 41 

41For private or internal repositories, enable42For private or internal repositories, enable [GitHub Code Security](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)

42[GitHub Code Security](https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github)

43before you upload SARIF.43before you upload SARIF.

44 44 

45Create `.github/workflows/codex-security.yml`. Before checking out the pull45Create `.github/workflows/codex-security.yml`. Before checking out the pull


168 168 

169The export step reads a completed, sealed scan and writes SARIF. It leaves the169The export step reads a completed, sealed scan and writes SARIF. It leaves the

170Codex runtime and credentials untouched. Scan artifacts can contain vulnerable170Codex runtime and credentials untouched. Scan artifacts can contain vulnerable

171source snippets, evidence, and remediation details. Choose access controls and a171source snippets, evidence, and remediation details. Set who can read them and

172short retention window appropriate for your repository.172how long to keep them.

173 173 

174## Add the GitLab CI/CD pipeline174## Add the GitLab CI/CD pipeline

175 175 


178requests, use [Run Codex Security in GitLab178requests, use [Run Codex Security in GitLab

179CI/CD](https://learn.chatgpt.com/docs/security/cli/ci/gitlab).179CI/CD](https://learn.chatgpt.com/docs/security/cli/ci/gitlab).

180 180 

181GitLab can ingest181The GitLab guide includes a scan-only starting point and the complete pipeline.

182[SARIF 2.1.0 reports](https://docs.gitlab.com/ci/yaml/artifacts_reports/#artifactsreportssarif)182It covers protected variables, artifact access, and a separate policy gate so

183on GitLab Ultimate 19.2 or later. Add a masked and hidden183GitLab can ingest findings even when the scanner returns a nonzero exit code.

184`CODEX_SECURITY_API_KEY` CI/CD variable before you run the pipeline.

185 

186The following minimal example adds a scan-only `security` job to the root

187`.gitlab-ci.yml`. Keep any existing stages and jobs in the file. It scans

188merge-request changes by default. Set `CODEX_SECURITY_FULL_SCAN_DEFAULT_BRANCH`

189to `"true"` to also scan the complete default branch:

190 

191```yaml

192variables:

193 CODEX_SECURITY_FULL_SCAN_DEFAULT_BRANCH: "false"

194 

195stages:

196 - test

197 - security

198 

199codex-security:

200 stage: security

201 image: node:26-bookworm-slim

202 rules:

203 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == $CI_PROJECT_ID'

204 variables:

205 CODEX_SECURITY_SCAN_SCOPE: "diff"

206 - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CODEX_SECURITY_FULL_SCAN_DEFAULT_BRANCH == "true"'

207 variables:

208 CODEX_SECURITY_SCAN_SCOPE: "full"

209 variables:

210 GIT_DEPTH: "0"

211 CODEX_SECURITY_CLI_DIR: "/tmp/codex-security-cli"

212 before_script:

213 - |

214 set -eu

215 apt-get update -qq

216 apt-get install -y -qq --no-install-recommends \

217 ca-certificates \

218 git \

219 python3 \

220 ripgrep

221 npm install \

222 --prefix "$CODEX_SECURITY_CLI_DIR" \

223 --ignore-scripts \

224 --no-audit \

225 --no-fund \

226 @openai/codex-security@0.1.20

227 export CODEX_SECURITY_BIN="$CODEX_SECURITY_CLI_DIR/node_modules/.bin/codex-security"

228 test -x "$CODEX_SECURITY_BIN"

229 "$CODEX_SECURITY_BIN" --version

230 script:

231 - |

232 set -eu

233 if test -z "${CODEX_SECURITY_API_KEY:-}"; then

234 echo "Set the CODEX_SECURITY_API_KEY CI/CD variable." >&2

235 exit 2

236 fi

237 

238 codex_security_api_key="$CODEX_SECURITY_API_KEY"

239 unset CODEX_SECURITY_API_KEY

240 

241 case "${CODEX_SECURITY_SCAN_SCOPE:-}" in

242 diff)

243 BASE_SHA="$CI_MERGE_REQUEST_DIFF_BASE_SHA"

244 HEAD_SHA="$CI_COMMIT_SHA"

245 BASE_REVISION="$(git merge-base "$BASE_SHA" "$HEAD_SHA")"

246 set -- --diff "$BASE_REVISION" --head "$HEAD_SHA"

247 echo "Scanning committed changes from $BASE_REVISION to $HEAD_SHA."

248 ;;

249 full)

250 set -- --mode standard

251 echo "Scanning the complete default branch at $CI_COMMIT_SHA."

252 ;;

253 *)

254 echo "Unsupported Codex Security scan scope: ${CODEX_SECURITY_SCAN_SCOPE:-unset}" >&2

255 exit 2

256 ;;

257 esac

258 

259 export CODEX_SECURITY_STATE_DIR="/tmp/codex-security-state-$CI_JOB_ID"

260 SCAN_DIR="/tmp/codex-security-results-$CI_JOB_ID"

261 JSON_FILE="/tmp/codex-security-$CI_JOB_ID.json"

262 SARIF_FILE="/tmp/codex-security-$CI_JOB_ID.sarif"

263 

264 install -d -m 700 "$CODEX_SECURITY_STATE_DIR" "$SCAN_DIR"

265 

266 set +e

267 OPENAI_API_KEY="$codex_security_api_key" \

268 "$CODEX_SECURITY_BIN" scan . \

269 "$@" \

270 --auth api-key \

271 --output-dir "$SCAN_DIR" \

272 --json > "$JSON_FILE"

273 scan_exit="$?"

274 set -e

275 unset codex_security_api_key

276 

277 install -d -m 700 codex-security-artifacts/results

278 cp -R "$SCAN_DIR"/. codex-security-artifacts/results/

279 if test -s "$JSON_FILE"; then

280 cp "$JSON_FILE" codex-security-artifacts/codex-security.json

281 fi

282 printf '%s\n' "$scan_exit" > codex-security-artifacts/scan-exit-code.txt

283 

284 export_exit=0

285 if test -f "$SCAN_DIR/scan-manifest.json"; then

286 set +e

287 "$CODEX_SECURITY_BIN" export "$SCAN_DIR" \

288 --export-format sarif \

289 --source-root "$CI_PROJECT_DIR" \

290 --output "$SARIF_FILE"

291 export_exit="$?"

292 set -e

293 if test -s "$SARIF_FILE"; then

294 cp "$SARIF_FILE" codex-security-artifacts/codex-security.sarif

295 fi

296 fi

297 

298 if test "$scan_exit" -ne 0; then

299 exit "$scan_exit"

300 fi

301 exit "$export_exit"

302 artifacts:

303 when: always

304 access: maintainer

305 expire_in: 7 days

306 paths:

307 - codex-security-artifacts/

308 reports:

309 sarif: codex-security-artifacts/codex-security.sarif

310```

311 

312By default, the job runs only for merge requests from branches in the same

313project, so fork pipelines don't receive the scan credential. Set

314`CODEX_SECURITY_FULL_SCAN_DEFAULT_BRANCH` to `"true"` at the group, project, or

315pipeline level to also run a standard full scan on the default branch. Full

316scans take longer and cost more than diff scans.

317 

318`GIT_DEPTH: "0"` provides the history needed to calculate the merge base from

319`CI_MERGE_REQUEST_DIFF_BASE_SHA` and `CI_COMMIT_SHA` for merge-request scans.

320 

321The job installs the CLI under `/tmp`, runs it by absolute path, and exposes the

322API key only to the scan process. `artifacts: when: always` preserves the SARIF

323report when the scan fails, while `artifacts:access: maintainer` limits access

324to detailed scan results.

325 

326Changes to `.gitlab-ci.yml` can expose CI/CD variables, so review pipeline

327changes before running the job. If you

328[protect `CODEX_SECURITY_API_KEY`](https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#control-access-to-protected-variables-and-runners),

329GitLab makes it available only for same-project merge requests between

330protected branches and only when the user can access the target branch.

331 

332The dedicated GitLab guide expands this minimal job into the production

333workflow linked at the start of this section.

334 184 

335## Choose a severity policy185## Choose a severity policy

336 186 

337Both examples are report-only because they omit `--fail-on-severity`. Once you187The GitHub example is report-only because it omits `--fail-on-severity`. Once you

338are ready to make findings affect the check, add a threshold to the scan188are ready to make findings affect the check, add a threshold to the scan

339command:189command:

340 190 


352The scan step uses these exit codes:202The scan step uses these exit codes:

353 203 

354| Exit | Meaning |204| Exit | Meaning |

355| ----- | --------------------------------------------------------------------------------------- |205| ----- | --------------------------------------------------------------------------- |

356| `0` | The scan completed with complete coverage, and any configured policy passed. |206| `0` | The scan completed, and any configured severity policy passed. |

357| `1` | The completed scan contains a finding at or above the threshold. |207| `1` | The completed scan contains a finding at or above the threshold. |

358| `2` | The CLI found an input or runtime error, or the completed scan has incomplete coverage. |208| `2` | An input, execution, result-integrity, or required-output failure occurred. |

359| `130` | Ctrl-C interrupted the scan. |209| `130` | Ctrl-C interrupted the scan. |

360| `143` | SIGTERM terminated the scan. |210| `143` | SIGTERM terminated the scan. |

361 211 

362A scan with `partial` or `unknown` coverage returns `2`, even without a severity212Coverage gaps don't change a completed scan's exit code or bypass its severity

363policy. The CLI still writes its available findings and coverage. Review the213policy. Exit `0` doesn't mean every file was reviewed. Review excluded paths,

364deferred areas in `coverage.json` before treating the check as conclusive.214deferred work, and open questions in `coverage.json` when assessing the result.

365 215 

366## Retry with an existing result directory216## Retry with an existing result directory

367 217 


391 directory outside the repository.241 directory outside the repository.

392- **Python setup error:** Confirm that the runner uses Python 3.10 or later.242- **Python setup error:** Confirm that the runner uses Python 3.10 or later.

393- **Incomplete coverage:** Review `coverage.json`, including deferred surfaces243- **Incomplete coverage:** Review `coverage.json`, including deferred surfaces

394 and open questions, then rerun with an appropriate target or environment.244 and open questions. Resolve the reported gaps before rerunning the scan.

395- **SARIF export error:** Confirm that the scan completed and the full scan245- **SARIF export error:** Confirm that the scan completed and the full scan

396 directory is available. Export validates the sealed artifacts before writing246 directory is available. Export validates the sealed artifacts before writing

397 SARIF.247 SARIF.


402 the job uploads a SARIF 2.1.0 file through `artifacts:reports:sarif`.252 the job uploads a SARIF 2.1.0 file through `artifacts:reports:sarif`.

403 253 

404For every command, flag, artifact, and output field, see the [CLI254For every command, flag, artifact, and output field, see the [CLI

405reference](https://learn.chatgpt.com/docs/security/cli/reference). For an interactive plugin-based CI255reference](https://learn.chatgpt.com/docs/security/cli/reference). To invoke the plugin through `codex exec`, see [Review code changes for security](https://learn.chatgpt.com/docs/security/plugin/code-changes#automate-reviews-in-cicd).

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

Details

18 18 

19- A GitLab project with a trusted runner that supports the Codex sandbox's19- A GitLab project with a trusted runner that supports the Codex sandbox's

20 user namespace.20 user namespace.

21- The Maintainer or Owner role in the GitLab project so you can configure21- The Maintainer or Owner role in the GitLab project so you can configure [project CI/CD variables](https://docs.gitlab.com/ci/variables/)

22 [project CI/CD variables](https://docs.gitlab.com/ci/variables/) and protected22 and protected resources.

23 resources.

24- An OpenAI API key with Codex Security access. Organizations using Platform23- An OpenAI API key with Codex Security access. Organizations using Platform

25 API keys can [request Trusted Access for24 API keys can [request Trusted Access for Cyber](https://openai.com/form/enterprise-trusted-access-for-cyber/).

26 Cyber](https://openai.com/form/enterprise-trusted-access-for-cyber/).25 Individuals using ChatGPT authentication can use the [personal Trusted Access flow](https://chatgpt.com/cyber). Some accounts or repositories require this

27 Individuals using ChatGPT authentication can use the [personal Trusted Access

28 flow](https://chatgpt.com/cyber). Some accounts or repositories require this

29 access for full-repository scans.26 access for full-repository scans.

30- GitLab Ultimate 19.2 or later for [SARIF 2.1.027- GitLab Ultimate 19.2 or later for [SARIF 2.1.0 ingestion](https://docs.gitlab.com/user/application_security/detect/sarif/).

31 ingestion](https://docs.gitlab.com/user/application_security/detect/sarif/).

32- Full Git history so merge request jobs can calculate the merge base.28- Full Git history so merge request jobs can calculate the merge base.

33 29 

34The pipeline image installs Node.js 26, Python 3, Git, `rg`, and the pinned30The pipeline image installs Node.js 26, Python 3, Git, `rg`, and the pinned


40 36 

41Create a masked, hidden, protected GitLab CI/CD variable named37Create a masked, hidden, protected GitLab CI/CD variable named

42`CODEX_SECURITY_API_KEY`. Use an OpenAI Platform API key with Codex Security38`CODEX_SECURITY_API_KEY`. Use an OpenAI Platform API key with Codex Security

43access, and set its environment scope to `codex-security/openai`. See39access, and set its environment scope to `codex-security/openai`. See [environment-scoped CI/CD variables](https://docs.gitlab.com/ci/environments/#limit-the-environment-scope-of-a-cicd-variable).

44[environment-scoped CI/CD variables](https://docs.gitlab.com/ci/environments/#limit-the-environment-scope-of-a-cicd-variable).

45 40 

46Add this minimal pipeline to a test project first. It scans committed changes41Add this pipeline to a test project first. It scans committed changes

47in eligible protected merge requests, publishes SARIF from a successful report42in eligible protected merge requests, publishes SARIF from a successful report

48job, and restores the scanner result in a separate gate:43job, and restores the scanner result in a separate gate:

49 44 


66 variables:61 variables:

67 GIT_DEPTH: "0"62 GIT_DEPTH: "0"

68 before_script:63 before_script:

64 - apt-get update -qq

65 - apt-get install -y -qq --no-install-recommends ca-certificates git python3 ripgrep

69 - npm install --prefix /tmp/codex-security-cli --ignore-scripts --no-audit --no-fund @openai/codex-security@0.1.2066 - npm install --prefix /tmp/codex-security-cli --ignore-scripts --no-audit --no-fund @openai/codex-security@0.1.20

70 script:67 script:

71 - |68 - |


133 130 

134 131 

135Review every change to `.gitlab-ci.yml` before running a secret-bearing job.132Review every change to `.gitlab-ci.yml` before running a secret-bearing job.

136The minimal example intentionally omits full scans and remediation.133This example omits full scans and remediation.

137 134 

138## Adopt the production pipeline135## Adopt the production pipeline

139 136 


158A merge request pipeline can access protected variables and runners only when:155A merge request pipeline can access protected variables and runners only when:

159 156 

160- You protect the source and target branches in the same project.157- You protect the source and target branches in the same project.

161- The project [permits merge request pipelines to access protected variables and158- The project [permits merge request pipelines to access protected variables and runners](https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#control-access-to-protected-variables-and-runners).

162 runners](https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/#control-access-to-protected-variables-and-runners).

163- The user who starts the pipeline can push or merge into the target branch.159- The user who starts the pipeline can push or merge into the target branch.

164 160 

165Fork pipelines and unprotected merge requests don't receive the scan161Fork pipelines and unprotected merge requests don't receive the scan


252commands do not receive the GitLab project access token or runner-injected248commands do not receive the GitLab project access token or runner-injected

253credentials.249credentials.

254 250 

255The security contract has three parts: repository-controlled commands never

256receive OpenAI or GitLab credentials, only the publishing job receives

257repository-write access, and every generated change stays a draft until a

258human reviews and merges it.

259 

260The workflow:251The workflow:

261 252 

2621. Requires complete scan coverage and a `high`- or `critical`-severity2531. Requires complete scan coverage and a `high`- or `critical`-severity

263 finding.254 finding.

2642. Confirms that the configured regression test fails before patching.2552. Confirms that the configured regression test fails before patching.

2653. Generates a focused patch and rejects changes to CI, credential, binary, or2563. Generates a patch and rejects changes to CI, credential, binary, or

266 other protected files.257 other protected files.

2674. Runs the regression test without OpenAI, GitLab, registry, deployment, or2584. Runs the regression test without OpenAI, GitLab, registry, deployment, or

268 job-token credentials.259 job-token credentials.


288The `validate`, `patch`, and `verify-fix` commands receive a process-scoped279The `validate`, `patch`, and `verify-fix` commands receive a process-scoped

289`CODEX_API_KEY`. Repository-controlled setup and test commands run as a280`CODEX_API_KEY`. Repository-controlled setup and test commands run as a

290separate unprivileged user in a writable copy of the tracked source files.281separate unprivileged user in a writable copy of the tracked source files.

291The copy intentionally excludes Git metadata, submodule contents, and282The copy excludes Git metadata, submodule contents, and

292downloaded artifacts. Setup and test commands that require `.git` or283downloaded artifacts. Setup and test commands that require `.git` or

293submodules must run in a separately designed credential-free job.284submodules must run in a separately designed credential-free job.

294 285 


303 294 

304## Publish a draft merge request295## Publish a draft merge request

305 296 

306Create a [GitLab project access297Create a [GitLab project access token](https://docs.gitlab.com/user/project/settings/project_access_tokens/#create-a-project-access-token)

307token](https://docs.gitlab.com/user/project/settings/project_access_tokens/#create-a-project-access-token)

308with the Developer role and the `api` and `write_repository` scopes. Store it as298with the Developer role and the `api` and `write_repository` scopes. Store it as

309a protected, masked, hidden `GITLAB_REMEDIATION_TOKEN` scoped only to the299a protected, masked, hidden `GITLAB_REMEDIATION_TOKEN` scoped only to the

310`codex-security/publish` environment.300`codex-security/publish` environment.


358 348 

359## Tune enforcement and cost349## Tune enforcement and cost

360 350 

361Use focused diff scans for merge request feedback, standard repository scans351Use diff scans for merge request feedback, standard repository scans

362for the default branch, and scheduled deep scans for broader coverage. Both352for the default branch, and scheduled deep scans for broader coverage. Both

363full-repository profiles are off by default. A scheduled deep scan also requires353full-repository profiles are off by default. A scheduled deep scan also requires

364`CODEX_SECURITY_DEEP_MAX_TIME_HOURS` and `CODEX_SECURITY_DEEP_MAX_COST`; keep the354`CODEX_SECURITY_DEEP_MAX_TIME_HOURS` and `CODEX_SECURITY_DEEP_MAX_COST`; keep the

security/cli/faq.md +32 −109

Details

8 8 

9## Repository scans9## Repository scans

10 10 

11### Who can use the CLI

12 

13The `@openai/codex-security` package is public.

14 

15Running scans requires Codex Security access. For best results, use an account

16verified for [Trusted Access for Cyber](https://chatgpt.com/cyber).

17 

18### Why does a scan use an API key after sign-in11### Why does a scan use an API key after sign-in

19 12 

20When your environment includes `OPENAI_API_KEY` or `CODEX_API_KEY`, scans13When your environment includes `OPENAI_API_KEY` or `CODEX_API_KEY`, scans


39`unset OPENAI_API_KEY CODEX_API_KEY`. For all supported authentication modes,32`unset OPENAI_API_KEY CODEX_API_KEY`. For all supported authentication modes,

40see the [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference#select-scan-authentication).33see the [CLI reference](https://learn.chatgpt.com/docs/security/cli/reference#select-scan-authentication).

41 34 

42### How does bulk repository scanning work

43 

44Sign in with GitHub CLI:

45 

46```bash

47gh auth login

48```

49 

50Discover and select repositories from a GitHub account or organization:

51 

52```bash

53npx @openai/codex-security bulk-scan

54```

55 

56For a prepared list, provide a repository CSV and an output directory:

57 

58```bash

59npx @openai/codex-security bulk-scan repositories.csv \

60 --output-dir /path/outside/repositories/security-scans \

61 --workers 4

62```

63 

64See [Run bulk security scans](https://learn.chatgpt.com/docs/security/cli/bulk-scans) for GitHub

65discovery, the CSV format, campaign results, and available options.

66 

67### Can an interrupted bulk scan resume35### Can an interrupted bulk scan resume

68 36 

69Yes. Run the same bulk-scan command with the original CSV and output directory.37Yes. Run the same bulk-scan command with the original CSV and output directory.


78 --max-attempts 346 --max-attempts 3

79```47```

80 48 

81A completed scan with `partial` or `unknown` coverage keeps its results and49Completed scans keep their results and aren't retried, even when coverage gaps

82causes the campaign to exit with code `2`. It isn't retried, even with50remain. Coverage gaps don't cause the campaign to exit with code `2`.

83`--max-attempts`.

84 

85### How can a scan use architecture and security policies

86 

87Pass architecture documents, threat models, or security policies with

88`--knowledge-base`:

89 

90```bash

91npx @openai/codex-security scan . \

92 --knowledge-base /path/to/architecture.md \

93 --knowledge-base /path/to/security-policies

94```

95 

96Codex Security uses these documents as context for the current scan. For

97supported file types and directory behavior, see [Add security

98context](https://learn.chatgpt.com/docs/security/cli/reference#add-security-context).

99 51 

100## Findings and coverage52## Findings and coverage

101 53 


148```100```

149 101 

150The comparison automatically matches findings by root cause, reuses saved102The comparison automatically matches findings by root cause, reuses saved

151matches, and identifies new, persisting, reopened, resolved, and unknown103matches, and identifies new, persisting, reopened, not observed, resolved, and

152findings. A finding counts as resolved only when the later scan covers its104unknown findings. When a later scan doesn't find an earlier finding in the code

153original target and affected path without coverage gaps.105it scanned, the finding is not observed. It counts as resolved only after it is

106explicitly closed as already fixed. Excluded paths and uncertain matches remain

107unknown.

154 108 

155### How does false-positive feedback work109### How does false-positive feedback work

156 110 


199 153 

200### How can a team confirm that a fix worked154### How can a team confirm that a fix worked

201 155 

202After applying a fix, rerun the original scan:156Recheck the original finding against the changed checkout. From that checkout,

203 157pass its report and the issue you want to validate:

204```bash

205npx @openai/codex-security scans rerun BEFORE_SCAN_ID

206```

207 

208Compare the original findings with the new scan:

209 

210```bash

211npx @openai/codex-security scans compare BEFORE_SCAN_ID AFTER_SCAN_ID

212```

213 

214Confirm that the new scan covers the original target and affected path without

215coverage gaps. Then directly recheck the original finding against the current

216checkout:

217 158 

218```bash159```bash

219npx @openai/codex-security validate /path/to/original/findings.json \160npx @openai/codex-security validate /path/to/original/findings.json \

220 "Recheck the SQL injection in src/orders.ts:42 against the current code"161 "Recheck the SQL injection in src/orders.ts:42 against the current code"

221```162```

222 163 

223A missing finding or scan comparison alone doesn't prove that a fix worked.164Review the evidence that the vulnerable path is closed and legitimate behavior

165still works. Run the original reproducer or regression test when available.

166If the check can't run, note the remaining uncertainty in the result.

167 

168A [scan comparison](https://learn.chatgpt.com/docs/security/cli/reference#match-and-compare-findings)

169can show how findings changed, but a missing finding alone doesn't verify a fix.

224 170 

225### What does incomplete coverage mean171### What does incomplete coverage mean

226 172 

227Coverage can be `complete`, `partial`, or `unknown`. Review `coverage.json`173Review `coverage.json` for excluded paths, deferred surfaces, and open questions.

228for excluded paths, deferred surfaces, and open questions before treating a174New results don't include a coverage-completeness field. Check `scan.status` in

229scan as evidence of review.175`scan-manifest.json` for execution status.

230 176 

231Scans with partial or unknown coverage return exit code `2`, even without a177Coverage gaps don't change a completed scan's exit code. Exit `0` doesn't mean

232severity policy. They still keep any available findings and coverage. A later178every file was reviewed. A later scan can't establish that an earlier finding

233scan can't establish that an earlier finding no longer exists when it doesn't179no longer exists when it doesn't cover that finding's original path.

234cover that finding's original path.

235 180 

236## Automation and cost181## Automation and cost

237 182 


245 190 

246The default is `96` hours. Use any positive value up to `96`, including191The default is `96` hours. Use any positive value up to `96`, including

247fractions. At the deadline, Codex Security stops unfinished workers, keeps192fractions. At the deadline, Codex Security stops unfinished workers, keeps

248completed standard-scan results, and aggregates them into the final report. If193completed standard-scan results, and aggregates them into the final report.

249no worker finishes source review, the report records partial coverage and the194Check the report for reviewed areas and deferred work. The deadline alone

250CLI returns exit code `2`.195doesn't determine the exit code; execution status and the severity policy do.

251 196 

252For persistent settings or bulk campaigns, set `max_time_hours` under197For persistent settings or bulk campaigns, set `max_time_hours` under

253`[deep_scan]` in the [deep-scan198`[deep_scan]` in the [deep-scan


263 208 

264The limit is an estimate, not a hard spending cap. Requests already in209The limit is an estimate, not a hard spending cap. Requests already in

265progress can finish above it. If a deep scan reaches the limit after Codex210progress can finish above it. If a deep scan reaches the limit after Codex

266Security aggregates completed worker results, the CLI saves the completed211Security aggregates completed worker results, the CLI can save a completed

267report with partial coverage and exits with code `2`. Otherwise, it preserves212report with a budget warning. It returns `0`, or `1` if findings meet the

268any available partial output.213configured severity threshold. If it can't produce a valid completed result,

269 214it returns `2` and preserves any available output.

270### Can scans check commits and pull requests215 

271 216For pull-request checks, see [Run scans in CI](https://learn.chatgpt.com/docs/security/cli/ci).

272Install a pre-commit security check for staged and unstaged changes:217For a check before each commit, use

273 218[`install-hook`](https://learn.chatgpt.com/docs/security/cli/reference#codex-security-install-hook).

274```bash

275npx @openai/codex-security install-hook

276```

277 

278For pull-request checks, scan the committed changes and set a severity

279threshold:

280 

281```bash

282npx @openai/codex-security scan . \

283 --diff origin/main \

284 --fail-on-severity high

285```

286 

287A complete scan returns exit code `1` when it finds an issue at or above the

288selected severity. See [Run scans in CI](https://learn.chatgpt.com/docs/security/cli/ci) for the

289complete GitHub Actions workflow, artifact handling, and SARIF export.

290 

291### Can another application run scans directly

292 

293Yes. Use the [TypeScript SDK](https://learn.chatgpt.com/docs/security/sdk) to start scans, select

294targets, inspect findings and coverage, track progress, and apply cost controls

295from an application or developer tool.

Details

334```334```

335 335 

336When the time limit expires, the scan stops unfinished workers, keeps completed336When the time limit expires, the scan stops unfinished workers, keeps completed

337scan results, and aggregates them into the final report. If no worker finishes337scan results, and aggregates them into the final report. Check the report for

338source review, the scan records partial coverage and returns exit code `2`.338reviewed areas and deferred work. The deadline alone doesn't determine the exit

339code; execution status and the severity policy do.

339 340 

340Set persistent defaults in `~/.codex/codex-security/config.toml`, or in341Set persistent defaults in `~/.codex/codex-security/config.toml`, or in

341`$CODEX_HOME/codex-security/config.toml` when you set `CODEX_HOME`:342`$CODEX_HOME/codex-security/config.toml` when you set `CODEX_HOME`:


375To add scan instructions, provide a text or Markdown file with376To add scan instructions, provide a text or Markdown file with

376`--scan-prompt-file`. Use `--post-scan-prompt-file` to run follow-up377`--scan-prompt-file`. Use `--post-scan-prompt-file` to run follow-up

377instructions in the same authenticated session after successful scans and378instructions in the same authenticated session after successful scans and

378scans with incomplete coverage or errors:379scan errors:

379 380 

380```bash381```bash

381npx @openai/codex-security scan . \382npx @openai/codex-security scan . \


412 413 

413The cost limit is an estimate, not a hard spending cap. Requests already in414The cost limit is an estimate, not a hard spending cap. Requests already in

414progress can finish slightly above the limit. If a deep scan reaches the limit415progress can finish slightly above the limit. If a deep scan reaches the limit

415after Codex Security aggregates completed worker results, the CLI seals the416after Codex Security aggregates completed worker results, the CLI can seal a

416available results, marks coverage as `partial`, and returns exit code `2`.417completed result and report the budget warning. It returns `0`, or `1` if

417Otherwise, it returns `2` and leaves any available partial output on disk.418findings meet the configured severity threshold. If it can't produce a valid

419completed result, it returns `2` and leaves any available output on disk.

418 420 

419When you omit `--output-dir`, results persist under421When you omit `--output-dir`, results persist under

420`$CODEX_HOME/state/plugins/codex-security/scans/<repository>`. `CODEX_HOME`422`$CODEX_HOME/state/plugins/codex-security/scans/<repository>`. `CODEX_HOME`


513## `codex-security bulk-scan`515## `codex-security bulk-scan`

514 516 

515Discover and scan GitHub repositories, or run a resumable scan from a517Discover and scan GitHub repositories, or run a resumable scan from a

516repository CSV:518repository CSV.

517 519 

518For a complete guide to GitHub discovery, CSV inventories, campaign results,520For a complete guide to GitHub discovery, CSV inventories, campaign results,

519and containerized scans, see [Run bulk security521and containerized scans, see [Run bulk security


565repository. Use `--scan-prompt-file FILE` to add shared scan instructions; the567repository. Use `--scan-prompt-file FILE` to add shared scan instructions; the

566CSV `prompt` column adds repository-specific instructions after that shared568CSV `prompt` column adds repository-specific instructions after that shared

567prompt. `--post-scan-prompt-file FILE` runs follow-up instructions after each569prompt. `--post-scan-prompt-file FILE` runs follow-up instructions after each

568scan, including scans with incomplete coverage or errors. It doesn't run after570scan, including scan errors. It doesn't run after

569cancellation or when a scan reaches its cost limit.571cancellation or when a scan reaches its cost limit.

570 572 

571`--workers` limits simultaneous repository scans and defaults to `4`. `--mode`573`--workers` limits simultaneous repository scans and defaults to `4`. `--mode`

572defaults to `standard`, and `--max-attempts` defaults to `1`. Set574defaults to `standard`, and `--max-attempts` defaults to `1`. Set

573`--max-attempts` to retry repository or scan errors. Completed scans with575`--max-attempts` to retry repository or scan errors. Completed scans aren't

574incomplete coverage aren't retried. Their results remain available, and the576retried because of coverage gaps or severity-policy violations. Their results

575command returns exit code `2`.577remain available.

576 578 

577Run the same command again to resume from an existing output directory. The CLI579Run the same command again to resume from an existing output directory. The CLI

578skips completed scans, including scans with incomplete coverage.580skips completed scans, including scans with coverage gaps.

579 581 

580For containerized campaigns, see [Run bulk scans in582For containerized campaigns, see [Run bulk scans in

581Docker](https://learn.chatgpt.com/docs/security/cli/bulk-scans#run-bulk-scans-in-docker).583Docker](https://learn.chatgpt.com/docs/security/cli/bulk-scans#run-bulk-scans-in-docker).


632npx @openai/codex-security scans logs SCAN_ID634npx @openai/codex-security scans logs SCAN_ID

633```635```

634 636 

635Add `--json` for a machine-formatted result containing full information.637Add `--json` for structured output.

636 638 

637### Match and compare findings639### Match and compare findings

638 640 

639Compare two scans to find new, persisting, reopened, resolved, and unknown641Compare two scans to find new, persisting, reopened, not observed, resolved, and

640findings:642unknown findings:

641 643 

642```bash644```bash

643npx @openai/codex-security scans compare PREVIOUS_SCAN_ID CURRENT_SCAN_ID645npx @openai/codex-security scans compare PREVIOUS_SCAN_ID CURRENT_SCAN_ID


650npx @openai/codex-security scans match PREVIOUS_SCAN_ID CURRENT_SCAN_ID652npx @openai/codex-security scans match PREVIOUS_SCAN_ID CURRENT_SCAN_ID

651```653```

652 654 

653A finding is unknown when the later scan has incomplete coverage or doesn't655A finding is unknown when its path is excluded or its match is uncertain. If

654cover the finding's original location. Add `--force` to `match` when you need to656the later scan doesn't find it in the code it scanned, it is not observed.

655recompute an existing match.657Only a finding explicitly closed as already fixed is resolved. Add `--force`

658to `match` when you need to recompute an existing match.

656 659 

657To match all completed scans for the current repository, including scans from660To match all completed scans for the current repository, including scans from

658other checkouts:661other checkouts:


683Add `--json` for structured output. The list identifies findings seen in the686Add `--json` for structured output. The list identifies findings seen in the

684latest scan and earlier findings that weren't confirmed in that scan.687latest scan and earlier findings that weren't confirmed in that scan.

685 688 

686Note that earlier findings remain open until resolved or dismissed (absence689Earlier findings remain open until resolved or dismissed. Their absence from

687from the latest scan is not interpreted as proof that it's fixed).690the latest scan doesn't establish that they are fixed.

688 691 

689To record a reviewed finding as a false positive:692To record a reviewed finding as a false positive:

690 693 


805| `--json` | Write structured publication results to stdout. Progress remains on stderr. |808| `--json` | Write structured publication results to stdout. Progress remains on stderr. |

806 809 

807Linear issue descriptions and dry-run output can include source code snippets810Linear issue descriptions and dry-run output can include source code snippets

808 and vulnerability details. Publish only to an authorized Linear team or811 and vulnerability details. Check who can view the destination team or project

809 project, and treat saved output as sensitive.812 before publishing.

810 813 

811Each non-dry-run invocation attempts to create a new issue for every finding.814Each non-dry-run invocation attempts to create a new issue for every finding.

812Publishing the same scan again doesn't match, update, or reuse existing issues.815Publishing the same scan again doesn't match, update, or reuse existing issues.


1025### Completion summary1028### Completion summary

1026 1029 

1027A completed scan writes its open repository finding count, severity breakdown,1030A completed scan writes its open repository finding count, severity breakdown,

1028coverage, elapsed time, report path, and result directory to stderr. It1031elapsed time, report path, and result directory to stderr. It

1029includes token usage and estimated cost when available:1032includes token usage and estimated cost when available. For example:

1030 1033 

1031```text1034```text

1032 REPORT /path/to/scan/report.md1035 REPORT /path/to/scan/report.md

1033 1036 

1034 FINDINGS 4 (3 confirmed this scan; 1 previously found; 1 critical, 2 high, 1 informational)1037 FINDINGS 4 (3 confirmed this scan; 1 previously found; 1 critical, 2 high, 1 informational)

1035 COVERAGE complete

1036 ELAPSED 1s1038 ELAPSED 1s

1037 TOKENS 1,250 input, 200 cached, 30 output1039 TOKENS 1,250 input, 200 cached, 30 output

1038 RESULTS /path/to/scan1040 RESULTS /path/to/scan


1071 1073 

1072Progress, completion summaries, archive notices, and errors remain on stderr.1074Progress, completion summaries, archive notices, and errors remain on stderr.

1073A completed scan still prints the full JSON result when a severity policy1075A completed scan still prints the full JSON result when a severity policy

1074returns exit `1` or incomplete coverage returns exit `2`.1076returns exit `1`.

1075 1077 

1076`codex-security scan --json` emits one JSON document. `codex exec --json`1078`codex-security scan --json` emits one JSON document. `codex exec --json`

1077 emits a JSON Lines event stream. Use the output format that matches the1079 emits a JSON Lines event stream. Use the output format that matches the


1079 1081 

1080## Scan artifacts1082## Scan artifacts

1081 1083 

1082A completed scan keeps the readable report and structured artifacts together:1084A completed scan keeps the readable report and structured artifacts together.

1085The sealed manifest records artifact hashes so later readers can check that

1086those files haven't changed:

1083 1087 

1084```text1088```text

1085<scan-directory>/1089<scan-directory>/


1098| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------- |1102| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------- |

1099| `scan-manifest.json` | Scan identity, status, target, scope, producer, and sealed artifact records. |1103| `scan-manifest.json` | Scan identity, status, target, scope, producer, and sealed artifact records. |

1100| `findings.json` | Finding identifiers, severity, confidence, taxonomy, locations, evidence, validation, data flow, reachability, and remediation. |1104| `findings.json` | Finding identifiers, severity, confidence, taxonomy, locations, evidence, validation, data flow, reachability, and remediation. |

1101| `coverage.json` | Reviewed surfaces, exclusions, deferred work, open questions, and coverage completeness. |1105| `coverage.json` | Reviewed surfaces, exclusions, deferred work, and open questions. |

1102| `report.md` | Readable scan report. |1106| `report.md` | Readable scan report. |

1103| `artifacts/` | Supporting scan artifacts. |1107| `artifacts/` | Supporting scan artifacts. |

1104| `exports/results.sarif` | SARIF generated during the scan, when present. |1108| `exports/results.sarif` | SARIF generated during the scan, when present. |

1105 1109 

1106Coverage completeness has three values:1110Read `scan.status` in `scan-manifest.json` for execution status: `completed`,

1107 1111`failed`, `canceled`, or `interrupted`. New results don't include

1108- `complete`: The scan records complete coverage for its selected scope.1112`coverage.completeness`. Review deferred surfaces, explicit exclusions, and

1109- `partial`: The scan records deferred work or other coverage limits.1113open questions in `coverage.json` to understand what the scan reviewed.

1110- `unknown`: The scan reports coverage completeness as unknown.

1111 

1112Review deferred surfaces, explicit exclusions, and open questions before using

1113coverage as evidence for a security decision.

1114 1114 

1115## Exit codes and signals1115## Exit codes and signals

1116 1116 

1117The CLI uses these exit codes:1117The CLI uses these exit codes:

1118 1118 

1119| Exit | Condition |1119| Exit | Condition |

1120| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |1120| ----- | ----------------------------------------------------------------------------------------------------------------------------------------- |

1121| `0` | A scan completed with complete coverage and passed its severity policy, a bulk scan or publication completed without failures, or another command succeeded. |1121| `0` | A scan or bulk campaign completed and passed its severity policy, a publication completed without failures, or another command succeeded. |

1122| `1` | A completed scan reports a finding at or above the configured severity. |1122| `1` | A completed scan or bulk campaign reports a finding at or above the configured severity. |

1123| `2` | The CLI found an input, runtime, or export error, a scan has incomplete coverage, a bulk scan has repositories with errors, or a publication has one or more failed findings. |1123| `2` | An input, execution, result-integrity, required-output, or export failure occurred, or a publication has one or more failed findings. |

1124| `130` | Ctrl-C interrupted a scan or publication. |1124| `130` | Ctrl-C interrupted a scan or publication. |

1125| `143` | SIGTERM terminated a scan or publication. |1125| `143` | SIGTERM terminated a scan or publication. |

1126 1126 

1127Any scan with `partial` or `unknown` coverage returns `2`, even without a1127Coverage gaps don't change a completed scan's exit code or bypass its severity

1128severity policy. When you request structured output, completed scans and1128policy. Exit `0` doesn't mean every file was reviewed. When you request

1129structured output, completed scans and

1129partial publications still write the available results to stdout. The CLI1130partial publications still write the available results to stdout. The CLI

1130prints the location of any partial output after an interruption or runtime1131prints the location of any partial output after an interruption or runtime

1131error.1132error.


1143or restrict these scan controls. Host and network restrictions still apply.1144or restrict these scan controls. Host and network restrictions still apply.

1144 1145 

1145Scan and workbench processes can inherit your environment, including unrelated1146Scan and workbench processes can inherit your environment, including unrelated

1146API tokens and cloud credentials. Scan only repositories you trust and have1147API tokens and cloud credentials. Remove unrelated credentials before

1147permission to assess, and provide only the credentials the scan requires.1148starting a scan.

1148 1149 

1149## Authentication and prerequisites1150## Authentication and prerequisites

1150 1151 

security/faq.md +56 −97

Details

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 

5This FAQ covers the Codex Security Cloud plugin. For local scans and workflows that run in5These answers apply to Codex Security Cloud. For installation and a first scan,

6a Codex task, see the [Codex Security plugin quickstart](https://learn.chatgpt.com/docs/security/plugin).6use [Cloud setup](https://learn.chatgpt.com/docs/security/setup). Local scans have separate

7 7[plugin](https://learn.chatgpt.com/docs/security/plugin) and [CLI](https://learn.chatgpt.com/docs/security/cli) guides.

8{/* vale Microsoft.Auto = NO */}

9{/* vale Vale.Spelling = NO */}

10 

11## Getting started

12 

13### What is Codex Security Cloud?

14 

15Codex Security Cloud scans connected GitHub repositories, validates likely

16vulnerabilities, and presents findings with evidence and remediation guidance.

17Use its plugin on the web or in the desktop app to run repository scans and

18monitor new commits.

19 

20### How do I open Codex Security Cloud?

21 

22Open **Plugins** to find and install **Codex Security Cloud**, then open it.

23See [Cloud setup](https://learn.chatgpt.com/docs/security/setup) for the full workflow.

24 

25### Is this the same plugin as local Codex Security?

26 

27No. The Codex Security Cloud plugin scans connected GitHub repositories in

28Codex cloud. The [Codex Security plugin](https://learn.chatgpt.com/docs/security/plugin) runs local

29scans in a Codex task.

30 

31### What if access is unavailable?

32 

33Check with your workspace administrator.

34 

35### How does Codex Security work?

36 

37Codex Security runs analysis in an ephemeral, isolated container and temporarily clones the target repository. It performs code-level analysis and returns structured findings with a description, file and location, criticality, root cause, and a suggested remediation.

38 

39For findings with verification steps, it runs commands or tests in the sandbox and attaches the results as evidence.

40 

41### Does it replace SAST?

42 

43No. Codex Security complements SAST. It adds semantic, LLM-based reasoning and automated validation, while existing SAST tools still provide broad deterministic coverage.

44 8 

45## Billing9## Billing

46 10 


101Scans marked "Exempt from billing. No charges apply." incur no charges,65Scans marked "Exempt from billing. No charges apply." incur no charges,

102even when they show token usage and cost.66even when they show token usage and cost.

103 67 

104## Features68## Scanning

105 

106### What is the analysis pipeline?

107 

1081. **Analysis** builds a threat model for the repository.

1092. **Scanning** reviews the repository once or monitors commit changes for likely issues.

1103. **Validation** tries to reproduce likely vulnerabilities in a sandbox to reduce false positives.

1114. **Remediation** provides guidance and, where available, proposed patches to review before opening a PR.

112 

113### What languages are supported?

114 

115Codex Security is language-agnostic. In practice, performance depends on the model's reasoning ability for the language and framework used by the repository.

116 

117### What outputs do I get after the scan completes?

118 

119You get ranked findings with criticality, validation evidence, remediation guidance, and a proposed patch when one is available.

120 

121### How is customer code isolated?

122 

123Each analysis and validation job runs in an ephemeral Codex container with session-scoped tools. Artifacts are extracted for review, and the container is torn down after the job completes.

124 

125### Does Codex Security auto-apply patches?

126 

127No. When a finding has a proposed patch, review it before selecting **Create draft pull request**.

128 69 

129### Does the project need to be built for scanning?70### Does the project need to be built for scanning?

130 71 

131No. Codex Security can produce findings from repository and commit context without a compile step. During auto-validation, it may try to build the project inside the container if that helps reproduce the issue. For environment setup details, see [Codex cloud environments](https://learn.chatgpt.com/docs/environments/cloud-environment).72Codex Security can analyze source without a successful build. Validation may

132 73need dependencies or a working build to reproduce an issue. Configure those

133### How does Codex Security reduce false positives and avoid broken patches?74requirements in the [Codex cloud

75environment](https://learn.chatgpt.com/docs/environments/cloud-environment).

134 76 

135Codex Security uses two stages. First, the model ranks likely issues. Then auto-validation tries to reproduce each issue in a clean container. Findings that successfully reproduce are marked as validated, which helps reduce false positives before human review.77If validation can't run, inspect what the finding establishes from source and

78what still depends on runtime or deployment behavior.

136 79 

137### How do repository scans and commit monitoring differ?80### What languages are supported?

138 81 

139A **Repository** scan runs once across the repository. **Commit changes**82Codex Security analyzes source across languages. Results depend on the model's

140monitors new commits and can review existing commit history. See83ability to reason about the language and framework, and on the available

141[Monitor new commits](https://learn.chatgpt.com/docs/security/setup#5-monitor-new-commits).84repository context. A successful scan doesn't imply equal coverage across

85languages or components. Check the report for the scope actually reviewed.

142 86 

143### How long do scans take?87### How do repository scans and commit monitoring differ?

144 88 

145Scan time varies with repository size and validation work. Check **Scans** for89A **One-Time Scan** reviews the repository once. **Continuous Scanning** monitors

146progress and status.90new commits and can review selected commit history. Enable it after the first

91scan using [Monitor new commits](https://learn.chatgpt.com/docs/security/setup#5-monitor-new-commits).

147 92 

148### Can I pause commit monitoring?93### Can I pause commit monitoring?

149 94 

150Yes. Open **Repositories**, select the repository, and open **Monitoring95Open **Repositories**, select the repository, and open **Monitoring settings**.

151settings**. Set monitoring to **Paused** and select **Save**.96Set monitoring to **Paused** and select **Save**. You can enable it again from

152 97the same settings.

153### What is a threat model?

154 

155A threat model is the scan-time security context for a repository. It combines a concise project overview with attack-surface details such as entry points, trust boundaries, auth assumptions, and risky components. For more detail, see [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model).

156 98 

157### How is a threat model generated?99### Can I edit the threat model?

158 100 

159Codex Security analyzes the repository's code to summarize its architecture and security entry points.101Yes. Update it in the monitored repository's **Monitoring settings** when the

102architecture, deployment, or security assumptions change. The [threat-model

103guide](https://learn.chatgpt.com/docs/security/threat-model) explains what to include. Changes apply to

104future scans.

160 105 

161### Does it replace manual security review?106## Findings and validation

162 107 

163No. Codex Security accelerates review and helps rank findings, but it does not replace code-level validation, exploitability checks, or human threat assessment.108### What does validation establish?

164 109 

165### Can I edit the threat model?110Read the evidence attached to the particular finding. Source analysis can

111establish a vulnerable code path. Execution evidence can show that a specific

112reproducer or test demonstrated the issue.

166 113 

167For a monitored repository, Codex Security creates the initial threat model. Open the repository's **Monitoring settings** to update it as the architecture, risks, and business context change. For the editing workflow, see [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model).114A finding's recorded status and severity help organize review. Use the

115underlying evidence and prerequisites to decide whether it applies to your

116system and what to fix.

168 117 

169### What does the proposed patch contain?118### What happens if validation fails?

170 119 

171The proposed patch contains a minimal actionable diff with filename and line context when a remediation can be generated for the finding.120Inspect the attempted validation and any available logs. A failed reproducer

121can mean the issue doesn't apply, but it can also mean the environment or test

122was unsuitable. Resolve the stated gap before dismissing the finding or

123claiming that it was reproduced.

172 124 

173### Does the patch directly modify my PR branch?125### What if the scan reports no findings?

174 126 

175No. The workflow generates a diff, patch file, or suggested change for maintainers and reviewers to inspect before applying.127Confirm that the scan completed and reviewed the intended repository and

128revision. Read any recorded limits or unfinished work. A scan that reports no

129findings can still miss vulnerabilities.

176 130 

177## Validation131## Fixes

178 132 

179### What is auto-validation?133### Does Codex Security apply patches automatically?

180 134 

181Auto-validation is the phase that tries to reproduce a suspected issue in an isolated container. It records whether reproduction succeeded or failed and captures logs, commands, and related artifacts as evidence.135The action depends on the finding. **Fix with Codex** on a repository finding

136starts a conversation that asks Codex to verify the issue, implement a fix,

137and run relevant tests. Review the changes in that conversation.

182 138 

183### What happens if validation fails?139For a finding with a suggested patch, review the diff before selecting

140**Create draft pull request**. Creating the draft doesn't merge the fix.

184 141 

185The finding remains unvalidated. Logs and reports still capture what was attempted so engineers can retry, investigate further, or adjust the reproduction steps.142### How do I know whether a patch fixed the issue?

186 143 

187{/* vale Microsoft.Auto = YES */}144Review the patch's validation evidence, including whether the original issue

188{/* vale Vale.Spelling = YES */}145still reproduces and whether legitimate behavior still works. If validation

146wasn't completed, keep that uncertainty with the finding. A proposed patch,

147draft pull request, or status change alone doesn't verify a fix.

security/plugin.md +30 −63

Details

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 

5Codex Security scans your code for vulnerabilities and validates plausible5Install the Codex Security plugin, run a standard scan of a local repository,

6findings. For each reportable issue, it gives you the evidence and remediation6and review its findings. The scan leaves your source unchanged and saves a

7guidance you need to review the result. Scan only code you own or have7report with evidence and remediation guidance.

8permission to assess.

9 

10Follow this quickstart to install the plugin and run a standard, read-only scan

11of a local repository in Codex.

12 8 

13This page covers the Codex Security plugin in the desktop app or Codex CLI. To9This page covers the Codex Security plugin in the desktop app or Codex CLI. To

14 scan a connected GitHub repository in Codex cloud, install the separate10 scan a connected GitHub repository in Codex cloud, install the separate


56 52 

57 53 

58 54 

59Check the [plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) before you rely55If **Security** doesn't appear in the desktop-app sidebar, confirm that

60 on a feature or start a long-running scan. If **Security** doesn't appear in56 **Codex** is selected and the plugin is enabled. Update the app and plugin if

61 the desktop-app sidebar, update the app and plugin and confirm that the plugin57 needed, and check whether your workspace administrator allows the plugin.

62 is enabled.

63 58 

64## Run your first scan59## Run your first scan

65 60 


92 leave **Deep scan** off, and select the entire repository or one folder.87 leave **Deep scan** off, and select the entire repository or one folder.

93 Confirm that the branch and revision identify the code you intended to scan.88 Confirm that the branch and revision identify the code you intended to scan.

94 89 

953. Add relevant context903. Add security context

96 91 

97 Choose the model and reasoning effort. Open **Additional context** only when92 Choose the model and reasoning effort. Open **Additional context** only when

98 you need to describe a specific attack vector, security-sensitive area, or93 you need to describe an attack vector, security-sensitive area, or

99 repository detail that should guide the review.94 repository detail that should guide the review.

100 95 

101 <figure className="not-prose my-6">96 <figure className="not-prose my-6">


168 163 

169 164 

170 165 

171## What the scan creates166## Interpret the result

172 

173<ContentModeSwitch group="codex-surface" id="app">

174 167 

175Completed scans remain available in **Scans**. Review their findings and168Check the target and revision first. Then read which areas were reviewed and

176coverage in the Security workbench, or inspect related findings and repository169which were deferred. A completed scan can still have coverage gaps. A review

177history in **Findings** and **Repositories**. The scan also creates the files170that reports no findings hasn't necessarily ruled out every vulnerability.

178below.

179 

180</ContentModeSwitch>

181 

182<ContentModeSwitch group="codex-surface" id="cli">

183 

184Every completed scan reports a summary in the terminal and creates the files

185below.

186 

187</ContentModeSwitch>

188 171 

172Open a finding and read its source evidence, attacker prerequisites, validation,

173and remaining uncertainty. Validation can use source analysis without running

174a reproducer. Use the recorded method and evidence to decide whether the issue

175applies to your system.

189 176 

177## What the scan creates

190 178 

191- `report.md`, the primary readable entry point to the scan results.179In the desktop app, completed scans remain in **Scans**. In Codex CLI, use the

192- `findings/<slug>/`, when detailed vulnerability reports and supporting180scan directory reported in the conversation. Open `report.md` for the readable

193 proof-of-concept files are available.181result. Detailed vulnerability reports under `findings/` and design proposals

194- `hardening/`, when structural hardening guidance and supporting proposals or182under `hardening/` are optional outputs you can request.

195 diagrams are available.

196- Structured scan data in `scan-manifest.json`, `findings.json`, and

197 `coverage.json` for automation and integrations. You can review scan results

198 without opening these files.

199 183 

200Keep the full scan directory together when sharing or archiving results so the184The directory also contains `scan-manifest.json`, `findings.json`, and

201links from `report.md` continue to work.185`coverage.json` for tools and automation. Keep it together when sharing or

186archiving results so the report's links continue to work.

202 187 

203## Choose your next workflow188## Choose your next workflow

204 189 

205- [Use the Security workbench](https://learn.chatgpt.com/docs/security/plugin/workbench) to manage190- [Configure scope and security context](https://learn.chatgpt.com/docs/security/plugin/scans) for the

206 saved scans, findings, repositories, and scan activity in the desktop app.191 next scan, or [review a code change](https://learn.chatgpt.com/docs/security/plugin/code-changes).

207- [Run a scan from the CLI](https://learn.chatgpt.com/docs/security/cli) if you have beta access and

208 need a repeatable terminal workflow with structured results.

209- [Run a standard or scoped scan](https://learn.chatgpt.com/docs/security/plugin/scans) to review a

210 repository or one folder with the default workflow.

211- [Assess a first scan](https://learn.chatgpt.com/docs/security/plugin/scans#assess-a-first-scan)

212 to check the results against known issues and decide when to scan again.

213- [Run a deep scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans) for a more thorough scan

214 when you can allow for a longer runtime.

215- [Review code changes](https://learn.chatgpt.com/docs/security/plugin/code-changes) to assess a pull

216 request, commit, branch range, or working-tree patch.

217- [Triage a backlog](https://learn.chatgpt.com/docs/security/plugin/triage-backlog) to review existing

218 security findings.

219- [Fix and verify a finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings) after you192- [Fix and verify a finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings) after you

220 accept one finding for remediation.193 accept its evidence, or [track it in an issue](https://learn.chatgpt.com/docs/security/plugin/export-findings).

221- [Export or track findings](https://learn.chatgpt.com/docs/security/plugin/export-findings) to create194 

222 JSON, CSV, SARIF, an approval-gated Linear, GitHub, or Jira issue, or a private195For other scan modes and workflows, return to the [Codex Security

223 draft GitHub Security Advisory.196overview](https://learn.chatgpt.com/docs/security).

224- [Write vulnerability reports](https://learn.chatgpt.com/docs/security/plugin/vulnerability-reports)

225 to turn supplied findings, disclosure notes, source, and PoCs into

226 self-contained reports.

227- [Propose security hardening](https://learn.chatgpt.com/docs/security/plugin/security-hardening) to

228 consider structural or architectural options based on scan results or other

229 security evidence.

Details

493 493 

494- Run standard scans against Git repositories, individual folders, or494- Run standard scans against Git repositories, individual folders, or

495 codebases without Git history. Deep scans can also target a specific folder.495 codebases without Git history. Deep scans can also target a specific folder.

496- Cancel an active scan explicitly, resume an interrupted scan without another496- Cancel an active scan, resume an interrupted scan without another

497 setup prompt, and receive a warning before starting concurrent deep scans.497 setup prompt, and receive a warning before starting concurrent deep scans.

498- Follow clearer setup and progress states, with more compact progress498- Follow clearer setup and progress states, with more compact progress

499 summaries and errors that remain visible until you address them.499 summaries and errors that remain visible until you address them.


524 524 

525### Run evidence-backed security reviews525### Run evidence-backed security reviews

526 526 

527- Scan an authorized repository or selected folder for security527- Scan a repository or selected folder for security

528 vulnerabilities.528 vulnerabilities.

529- Run repeated discovery across an entire repository when you need more529- Run repeated discovery across an entire repository when you need more

530 thorough coverage.530 thorough coverage.


532 security regressions.532 security regressions.

533- Move each candidate through threat modeling, finding discovery, validation,533- Move each candidate through threat modeling, finding discovery, validation,

534 and impact analysis before generating scan reports.534 and impact analysis before generating scan reports.

535- Fix one accepted finding with a focused patch, regression coverage, and535- Fix one accepted finding with a patch, regression coverage, and

536 verification of the original issue.536 verification of the original issue.

Details

58 58 

59## Automate reviews in CI/CD59## Automate reviews in CI/CD

60 60 

61If you have access to the beta standalone CLI, see [Run Codex Security in61For the standalone CLI, see [Run Codex Security in

62CI](https://learn.chatgpt.com/docs/security/cli/ci) for structured JSON, a severity policy, and SARIF62CI](https://learn.chatgpt.com/docs/security/cli/ci) for structured JSON, a severity policy, and SARIF

63upload. Continue with this section to invoke the installed plugin skill63upload. Continue with this section to invoke the installed plugin skill

64through `codex exec`.64through `codex exec`.


77codex plugin add codex-security@openai-curated77codex plugin add codex-security@openai-curated

78```78```

79 79 

80The install command uses the public Codex CLI plugin marketplace. Check the80The install command uses the public Codex CLI plugin marketplace. See the [plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) for version-specific

81[plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) before you depend on a81requirements.

82specific plugin version or feature in CI.

83 82 

84Next, provide an OpenAI API key from your CI secret store as83Next, provide an OpenAI API key from your CI secret store as

85`CODEX_SECURITY_API_KEY`. Expose the credential only for the scan:84`CODEX_SECURITY_API_KEY`. Expose the credential only for the scan:


97`$TMPDIR/codex-security-scans/<repository>/<scan-id>/`:96`$TMPDIR/codex-security-scans/<repository>/<scan-id>/`:

98 97 

99| File | Contents |98| File | Contents |

100| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |99| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |

101| `report.md` | Primary readable entry point to the complete scan directory. |100| `report.md` | Primary readable entry point to the complete scan directory. |

102| `findings/<slug>/` | Detailed vulnerability reports and supporting proof-of-concept files, when requested. |101| `findings/<slug>/` | Detailed vulnerability reports and supporting proof-of-concept files, when requested. |

103| `hardening/` | Structural hardening guidance and supporting proposals, when requested. |102| `hardening/` | Structural hardening guidance and supporting proposals, when requested. |

104| `findings.json` | Findings with stable identifiers, severity, confidence, source locations, and remediation. Feed approved internal security workflows or downstream tools. |103| `findings.json` | Findings with stable identifiers, severity, confidence, source locations, and remediation. Use these fields in security workflows or downstream tools. |

105| `scan-manifest.json` | Sealed scan receipt with the reviewed target, revisions, and artifact hashes. |104| `scan-manifest.json` | Sealed scan receipt with the reviewed target, revisions, and artifact hashes. |

106| `coverage.json` | Reviewed and deferred surfaces, exclusions, and coverage completeness. |105| `coverage.json` | Reviewed and deferred surfaces, exclusions, and coverage completeness. |

107 106 

108The [`findings.json` schema](https://github.com/openai/plugins/blob/main/plugins/codex-security/schemas/findings.schema.json)107For field definitions, see the [findings schema](https://github.com/openai/plugins/blob/main/plugins/codex-security/schemas/findings.schema.json). Use `findingId` to identify the finding and `occurrenceId` for its occurrence

109defines the complete structure. The schema includes these fields:108in this scan.

110 

111| Field | Type | Description |

112| ------------------------- | ------ | ---------------------------------------------------------------------- |

113| `documentType` | String | Identifies the document as `codex-security.findings`. |

114| `schemaVersion` | String | Identifies the findings schema version. |

115| `scanId` | String | Identifies the scan that produced the findings. |

116| `findings` | Array | Contains zero or more finding objects. |

117| `findings[].findingId` | String | Stable finding identifier derived from the finding fingerprint. |

118| `findings[].occurrenceId` | String | Identifies this occurrence of the finding in a specific scan. |

119| `findings[].ruleId` | String | Identifies the vulnerability family. |

120| `findings[].identity` | Object | Contains the semantic anchor and optional sibling-instance identifier. |

121| `findings[].fingerprints` | Object | Contains the fingerprint algorithm and primary fingerprint. |

122| `findings[].title` | String | Provides the short finding title. |

123| `findings[].summary` | String | Summarizes the vulnerability and its impact. |

124| `findings[].severity` | Object | Contains the severity level and optional scoring details. |

125| `findings[].confidence` | Object | Contains the confidence level and rationale. |

126| `findings[].taxonomy` | Object | Contains the vulnerability category and CWE identifiers. |

127| `findings[].locations` | Array | Lists affected files, line numbers, and location roles. |

128| `findings[].remediation` | String | Describes the recommended fix. |

129| `findings[].provenance` | Object | Identifies the source of the finding. |

130 109 

131For example, this command prints one tab-separated row per finding:110For example, this command prints one tab-separated row per finding:

132 111 


1423, `jq`, and the provider's command-line tools. The `npm` global package prefix1213, `jq`, and the provider's command-line tools. The `npm` global package prefix

143must be writable.122must be writable.

144 123 

145Choose the example for your CI provider:

146 

147Scan results can include sensitive vulnerability details. Keep artifacts124Scan results can include sensitive vulnerability details. Keep artifacts

148private, and publish findings only after reviewing the audience, content, and125private, and review the destination and content before publishing findings.

149required approvals.126Choose the example for your CI provider:

150 127 

151<Tabs128<Tabs

152 id="codex-security-ci-examples"129 id="codex-security-ci-examples"

Details

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 

5Run a deep scan when you need a more thorough review and can allow for a longer5A deep scan runs multiple independent standard scans over the same repository

6runtime. Deep scans search a repository more extensively and can reduce6or folder and combines their findings. Use it when you want repeated review

7variability between runs.7and can allow for the additional runtime and token use.

8 8 

9Start with a [standard scan](https://learn.chatgpt.com/docs/security/plugin/scans) to check your scope9Start with a [standard scan](https://learn.chatgpt.com/docs/security/plugin/scans) to check that the

10and results. Then use a deep scan when you need a more thorough assessment.10scope and security context match your goal. Repeated review can find issues

11missed by an earlier pass, but doesn't guarantee complete detection or identical

12results between runs.

11 13 

12## Choose between standard and deep scans14## Choose between standard and deep scans

13 15 

14| | Standard scan | Deep scan |16| | Standard scan | Deep scan |

15| ----------------------- | -------------------------------------------------- | ----------------------------------------------------- |17| ---------- | ------------------------------------------- | ---------------------------------------------- |

16| Best for | First runs and routine repository or folder review | More thorough reviews after a standard scan |18| Review | One standard scan | Multiple standard scans with combined findings |

17| Variability | Standard | Reduced |19| Use it for | A first scan or a review of a defined scope | Additional independent reviews of that scope |

18| Scope | Repository or explicit folder | Repository or explicit folder |20| Scope | Repository or folder | Repository or folder |

19| Runtime and resources | Lower | Higher |21| Changes | Use the change-review workflow | Not supported |

20| Pull requests and diffs | Use the change-review workflow | Not supported; use the change-review workflow instead |

21 22 

22## Configure deep-scan runtime23## Start the deep scan

23 

24To control a deep scan's concurrency and duration, create or edit

25`~/.codex/codex-security/config.toml`. If you set `CODEX_HOME`, use

26`$CODEX_HOME/codex-security/config.toml` instead.

27 

28For example, this profile runs a shorter scan with limited concurrency:

29 

30```toml

31[deep_scan]

32workers = 2

33subagents = 0

34stop_after_no_new = 3

35max_discovery_runs = 10

36max_time_hours = 1.5

37```

38 

39| Setting | Default | Description |

40| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |

41| `workers` | `4` | Number of independent standard-scan workers allowed to run at the same time. Legacy `"auto"` also resolves to `4`. |

42| `subagents` | `3` | Number of subagents each worker may start. Set `0` to disable them. |

43| `stop_after_no_new` | `4` | Stop after this many consecutive completed worker scans produce no new findings. |

44| `stop_after_consecutive_errors` | `3` | Stop after this many consecutive worker errors. |

45| `max_discovery_runs` | `40` | Limit the number of independent standard-scan runs before aggregation. |

46| `max_time_hours` | `96` | Limit worker execution to a positive number of hours up to `96`; use fractions as needed. |

47 

48Lower values can reduce scan time and token use but may miss findings.

49Configuration changes apply to new deep scans, not scans already in progress.

50 24 

51When the time limit expires, Codex Security stops unfinished workers, keeps25For the best scan quality, use `gpt-5.6-sol`

52completed scan results, and aggregates them into the final report. If no worker26with `xhigh` reasoning effort.

53finishes source review before the deadline, the report records partial

54coverage.

55 27 

56The `max_time_hours` setting requires plugin version `0.1.19` or later. See the28<WorkflowSteps>

57[plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) for release details.

58 29 

59## Start the deep scan301. Open **Security** > **Scans** and select **+ Scan**.

312. Choose a repository or folder, select **Codebase**, and turn on **Deep scan**.

32 The scan reviews the entire selected repository or folder.

333. Choose the model and reasoning effort. Add threat-model or deployment

34 context under **Additional context**.

354. Select **Start scan**.

60 36 

61In the desktop app, open **Security**, select **Scans**, and select **+ Scan**.37</WorkflowSteps>

62Choose a repository or another folder, select **Codebase**, and turn on

63**Deep scan**. The scan covers the entire selected repository or folder.

64 38 

65You can also start a repository-wide deep scan from a Codex conversation:39You can also start it from a Codex conversation:

66 40 

67```text41```text

68Use $codex-security:deep-security-scan to run a deep security scan of this repository.42Use $codex-security:deep-security-scan to run a deep security scan of this repository.

69```43```

70 44 

71For one component in a monorepo, identify the folder explicitly:45For one component, replace "this repository" with the path to its folder.

72 

73```text

74Use $codex-security:deep-security-scan to run a deep security scan of /absolute/path/to/repository/services/payments.

75```

76 

77For a scoped deep scan in the desktop app, select the folder as the codebase.

78The scan covers the entire selected folder.

79 

80## Confirm setup and preflight

81 

82For the best scan quality, use `gpt-5.6-sol`

83with `xhigh` reasoning effort.

84 

85<WorkflowSteps>

86 

871. Select **Codebase** and turn on **Deep scan**.

882. Confirm that the repository or selected folder is the code you intended to

89 scan.

903. Choose a model and reasoning effort.

914. Open **Additional context** for concrete attack vectors, sensitive

92 application areas, or repository context that the code can't reveal.

935. Select **Start scan**.

94 

95</WorkflowSteps>

96 46 

97Deep scan workers inherit your selected model and reasoning settings. Each47Deep scan workers inherit your selected model and reasoning settings. Each

98worker runs a complete standard scan, and Codex Security aggregates the48worker runs a complete standard scan, and Codex Security aggregates the

99completed results. Follow the saved scan from **Scans**, or select **View49completed results. Follow the saved scan from **Scans**, or select **View

100activity** to inspect its Codex task. Check the [plugin50activity** to inspect its Codex task. Set [runtime limits](#configure-deep-scan-runtime) before starting if you need

101changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) before you update the plugin or51to limit concurrency or duration.

102start a long-running scan.

103 52 

104<figure className="not-prose my-8">53<figure className="not-prose my-8">

105 <CodexScreenshot54 <CodexScreenshot


129finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings).78finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings).

130 79 

131To review a pull request, commit, branch range, or local patch, use [Review code80To review a pull request, commit, branch range, or local patch, use [Review code

132changes](https://learn.chatgpt.com/docs/security/plugin/code-changes). A deep scan never substitutes81changes](https://learn.chatgpt.com/docs/security/plugin/code-changes). Deep scans don't accept diff targets.

133for the diff-focused workflow.82 

83## Configure deep-scan runtime

84 

85To control a deep scan's concurrency and duration, create or edit

86`~/.codex/codex-security/config.toml`. If you set `CODEX_HOME`, use

87`$CODEX_HOME/codex-security/config.toml` instead.

88 

89For example, this profile runs a shorter scan with limited concurrency:

90 

91```toml

92[deep_scan]

93workers = 2

94subagents = 0

95stop_after_no_new = 3

96max_discovery_runs = 10

97max_time_hours = 1.5

98```

99 

100| Setting | Default | Description |

101| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |

102| `workers` | `4` | Number of independent standard-scan workers allowed to run at the same time. Legacy `"auto"` also resolves to `4`. |

103| `subagents` | `3` | Number of subagents each worker may start. Set `0` to disable them. |

104| `stop_after_no_new` | `4` | Stop after this many consecutive completed worker scans produce no new findings. |

105| `stop_after_consecutive_errors` | `3` | Stop after this many consecutive worker errors. |

106| `max_discovery_runs` | `40` | Limit the number of independent standard-scan runs before aggregation. |

107| `max_time_hours` | `96` | Limit worker execution to a positive number of hours up to `96`; use fractions as needed. |

108 

109Lower values can reduce scan time and token use but may miss findings.

110Configuration changes apply to new deep scans, not scans already in progress.

111 

112When the time limit expires, Codex Security stops unfinished workers, keeps

113completed scan results, and aggregates them into the final report. If no worker

114finishes source review before the deadline, the report records partial

115coverage.

116 

117The `max_time_hours` setting requires plugin version `0.1.19` or later. See the

118[plugin changelog](https://learn.chatgpt.com/docs/security/plugin/changelog) for release details.

Details

75## Track selected findings75## Track selected findings

76 76 

77Run `$codex-security:track-findings` with one validated finding or an77Run `$codex-security:track-findings` with one validated finding or an

78explicitly selected batch of up to 25 findings from the same sealed scan. Each78selected batch of up to 25 findings from the same sealed scan. Each

79run uses one provider and one destination. A private draft GitHub Security79run uses one provider and one destination. A private draft GitHub Security

80Advisory accepts only one finding.80Advisory accepts only one finding.

81 81 


124 124 

125Draft advisories require one finding from a sealed `git_revision` scan, the125Draft advisories require one finding from a sealed `git_revision` scan, the

126 verified public canonical source repository, and administrator access. The126 verified public canonical source repository, and administrator access. The

127 workflow doesn't batch, update, publish, or close advisories. Use an approved127 workflow doesn't batch, update, publish, or close advisories. Use a private

128 private issue destination when the source doesn't meet those requirements.128 issue destination when the source doesn't meet those requirements.

129 129 

130## Review the proposed write130## Review the proposed write

131 131 

Details

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 Security to turn an accepted security finding into a focused,5Start with one finding whose evidence you accept. Generate a patch,

6verified patch. You can work in the Security workbench or run the remediation6review it, and verify the original issue against the changed code. A generated

7workflow from a prompt, the command line, or CI/CD. Codex validates the issue7or applied patch isn't yet a verified fix.

8and, when testing is safe and practical, adds a focused regression test that8 

9fails before the fix and passes after it. It also checks that legitimate9In the desktop workbench, generation leaves the selected checkout unchanged.

10behavior still works. If a regression test is unsafe or infeasible, Codex10Applying the patch changes that checkout. Verification checks the patch and

11records the proof gap and provides the strongest repeatable validation11records evidence without automatically closing the finding.

12artifact instead.

13 

14Start with one accepted finding and review the proposed patch and verification

15evidence. If the workflow meets your standards, process other accepted

16findings one at a time in separate Codex tasks or CI/CD jobs. Keeping each task

17scoped makes its code changes and evidence easier to review.

18 12 

19## Fix a finding in the UI13## Fix a finding in the UI

20 14 

21Open an accepted finding from **Findings** or a completed scan in **Scans**.15Open an accepted finding from **Findings** or a completed scan in **Scans**.

22Review its evidence, then use **Patch** to generate, review, apply, and verify16Review its evidence, then use **Patch** to generate, review, apply, and verify

23one focused fix.17a fix.

24 18 

25<WorkflowSteps variant="headings">19<WorkflowSteps variant="headings">

26 20 

271. Generate a focused patch211. Generate a patch

28 22 

29 Open the finding, select the **Patch** tab, and select **Generate patch**.23 Open the finding, select the **Patch** tab, and select **Generate patch**.

30 Codex validates or reproduces the issue when feasible and writes a patch24 Codex validates or reproduces the issue when feasible and writes a patch


32 26 

332. Review the proposed diff272. Review the proposed diff

34 28 

35 Read every changed source, regression test, and validation artifact. Reject29 Check the affected code and tests. Confirm that the change addresses the

36 broad refactors, unrelated cleanup, or changes that weaken another security30 finding without unrelated refactors or weakened security controls.

37 control.

38 31 

393. Apply the patch locally323. Apply the patch locally

40 33 


44 37 

454. Verify the fix384. Verify the fix

46 39 

47 Select **Verify fix**. Codex reruns the original reproducer or the strongest40 Select **Verify fix**. Codex reruns the original reproducer or another

48 available exploit check. If a regression test is safe and practical, Codex41 exploit check. When it can run a regression test, it checks that the test

49 checks that it fails before the fix and passes after it. If the test is42 fails before the fix and passes after it. Otherwise, it records the

50 unsafe or infeasible, Codex records the proof gap and provides the43 verification gap and the checks it could complete. It also checks

51 strongest repeatable validation artifact instead. It also checks44 legitimate behavior, nearby bypasses, and repository tests.

52 legitimate behavior, nearby bypasses, and relevant repository tests.

53 45 

545. Close the finding deliberately465. Close the finding

55 47 

56 Verification doesn't automatically close a finding. Review the commands,48 Verification doesn't automatically close a finding. Review the commands,

57 results, and remaining proof gap, then close the finding with an accurate49 results, and remaining proof gap, then close the finding with an accurate


71 </figcaption>63 </figcaption>

72</figure>64</figure>

73 65 

74## Fix a finding from the CLI66## Fix a finding in a conversation

75 

76Use the Codex CLI for an accepted finding from a scan, ticket, advisory,

77disclosure, security assessment, or internal review.

78 67 

79Install Codex Security in the `CODEX_HOME` that `codex exec` uses before you68Use the installed plugin with a finding from a scan, ticket, advisory, or other

80run these commands. A fresh CI runner doesn't include marketplace plugins by69review. Supply the finding ID and report path, plus a reproducer or validation

81default.70command if you have one:

82 71 

83```text72```text

84Use $codex-security:fix-finding to fix finding <finding-id> from <report-path>. Validate the issue, make the smallest safe change, and add a focused regression test that fails before the fix and passes after it. If that test is unsafe or infeasible, record the proof gap and provide the strongest repeatable validation artifact instead. Verify that the issue no longer reproduces.73Use $codex-security:fix-finding to fix finding <finding-id> from <report-path>. Verify the issue against this checkout, fix it, and test the original failure and legitimate behavior. Record any verification you couldn't complete.

85```

86 

87Include the known source, sink, attacker input, impact, expected invariant,

88reproducer, affected files, and validation command. Codex can inspect the

89repository for missing technical details. It should ask before assuming a

90product policy or intended security invariant.

91 

92For an automated run, check out the code, make the finding report available,

93and install the plugin in the runner's `CODEX_HOME`. Then enable workspace

94writes and pass the prompt to `codex exec`:

95 

96```bash

97codex exec --sandbox workspace-write 'Use $codex-security:fix-finding to fix finding <finding-id> from <report-path>. Validate the issue, make the smallest safe change, and add a focused regression test that fails before the fix and passes after it. If that test is unsafe or infeasible, record the proof gap and provide the strongest repeatable validation artifact instead. Verify that the issue no longer reproduces.'

98```74```

99 75 

100## Scan and fix findings in CI/CD76This authorizes edits to the checkout. Codex can inspect the repository for

77missing technical details, but may need you to clarify an intended security

78policy before choosing a fix.

101 79 

102Install Codex Security in the runner's `CODEX_HOME` before you invoke either80## Run remediation without interaction

103skill. The commands below use the installed plugin; they don't install it.

104 81 

105In CI/CD, separate the change scan from remediation and require the scan to82For repeatable scans and patch generation, use the standalone

106leave the checkout unchanged. Preserve the completed scan directory as a job83CLI [validate and patch commands](https://learn.chatgpt.com/docs/security/cli/reference#codex-security-validate-and-codex-security-patch).

107artifact, review the findings, and start a separate Codex task or job for each

108finding accepted for remediation.

109 84 

110By default, `codex exec` uses a read-only sandbox. Run both the change scan and85To invoke the installed plugin through Codex CLI, install Codex Security in

111remediation with `--sandbox workspace-write`. The scan needs that permission86the runner's `CODEX_HOME` first. A fresh runner doesn't include marketplace

112to save temporary artifacts, but its prompt must still require `Do not modify87plugins by default. Use a separate checkout or job for each accepted finding:

113the checkout`. Remediation needs the same permission to write the focused

114patch and verification evidence. See [Permissions and

115safety](https://learn.chatgpt.com/docs/non-interactive-mode#permissions-and-safety).

116 

117For each scan and accepted finding:

118 

1191. Resolve the base and head revisions for the change.

1202. Run `$codex-security:security-diff-scan` against that diff without modifying

121 the checkout.

1223. Preserve the complete scan directory and select the findings to fix.

1234. Invoke `$codex-security:fix-finding` once for each accepted finding, passing

124 its finding ID and completed scan directory.

1255. Generate one focused patch and add a regression test that fails before the

126 fix and passes after it. If that test is unsafe or infeasible, record the

127 proof gap and use the strongest repeatable validation artifact instead.

1286. Verify the original issue and legitimate behavior. Return each patch, test

129 or fallback validation artifact, verification command, and any proof gap

130 independently.

131 

132First, scan the change without modifying the checkout:

133 88 

134```bash89```bash

135codex exec --sandbox workspace-write 'Use $codex-security:security-diff-scan to review changes from <base-revision> to <head-revision> for security regressions. Do not modify the checkout.'90codex exec --sandbox workspace-write 'Use $codex-security:fix-finding to fix finding <finding-id> from <report-path>. Verify the issue against this checkout, fix it, and test the original failure and legitimate behavior. Record any verification you could not complete.'

136```91```

137 92 

138Then fix one accepted finding from the completed scan:93The writable sandbox allows the workflow to edit source and tests. Preserve

139 94the patch and verification evidence for review. For installation, scan setup,

140```bash95and artifact handling, see [Automate reviews in

141codex exec --sandbox workspace-write 'Use $codex-security:fix-finding to fix finding <finding-id> from <completed-scan-directory>. Validate the finding, generate one minimal patch, and add a focused regression test that fails before the fix and passes after it. If that test is unsafe or infeasible, record the proof gap and provide the strongest repeatable validation artifact instead. Verify that the issue no longer reproduces.'96CI/CD](https://learn.chatgpt.com/docs/security/plugin/code-changes#automate-reviews-in-cicd).

142```

143 97 

144Repeat the second command in an independent task or job for each remaining98After verification, merge the change through your normal code-review process.

145accepted finding. After verification, merge each patch through your normal99If verification is incomplete, keep the finding open with the remaining work.

146code-review and release process. To hand findings to another team before

147remediation, see [Export or track

148findings](https://learn.chatgpt.com/docs/security/plugin/export-findings).

Details

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 

5Start with a standard Codex Security scan for an initial review or a routine5Use a standard scan to review a repository or a selected folder. This guide

6repository or component assessment. It runs the full scan workflow once.6explains how to set the scope, supply security context, and assess the result.

7If you haven't installed the plugin, start with the [plugin

8quickstart](https://learn.chatgpt.com/docs/security/plugin).

7 9 

8For a more thorough assessment, review the results and then run a [deep10For repeated reviews of the same scope, use a [deep

9scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans). Deep scans take longer and search11scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans). For a pull request or local diff,

10more extensively.12[review code changes](https://learn.chatgpt.com/docs/security/plugin/code-changes).

11 13 

12## Choose the scan area14## Choose the scan area

13 15 


16 18 

17Scan the whole repository when you need broad coverage and the repository is a19Scan the whole repository when you need broad coverage and the repository is a

18reasonable review unit. For a monorepo, choose one folder when a service,20reasonable review unit. For a monorepo, choose one folder when a service,

19package, or component has a clear owner and security boundary.21package, or component has an owner and security boundary.

20 22 

21You can also start a scan from a Codex conversation:23You can also start a scan from a Codex conversation:

22 24 


27To focus that conversation on a particular folder, identify the component:29To focus that conversation on a particular folder, identify the component:

28 30 

29```text31```text

30Use $codex-security:security-scan to scan this repository for security vulnerabilities, focusing on the services/billing component.32Use $codex-security:security-scan to scan only services/billing in this repository for security vulnerabilities.

31```33```

32 34 

33For a large monorepo, start with one meaningful product or service boundary.

34 

35## Configure the scan35## Configure the scan

36 36 

37For the best scan quality, use `gpt-5.6-sol`37For the best scan quality, use `gpt-5.6-sol`


432. Confirm the selected repository, current branch, and latest revision.432. Confirm the selected repository, current branch, and latest revision.

443. Set **Scan area** to the entire repository or choose one folder.443. Set **Scan area** to the entire repository or choose one folder.

454. Choose a model and reasoning effort.454. Choose a model and reasoning effort.

465. Open **Additional context** only when it changes the review. Useful context465. Use **Additional context** to describe attacker-controlled inputs, trust

47 names attacker-controlled inputs, trust boundaries, sensitive actions, or a47 boundaries, sensitive actions, or an area to prioritize.

48 specific area to prioritize.

496. Select **Start scan**.486. Select **Start scan**.

50 49 

51</WorkflowSteps>50</WorkflowSteps>


60Use `AGENTS.md` for supported build and validation commands and other59Use `AGENTS.md` for supported build and validation commands and other

61repository-specific instructions.60repository-specific instructions.

62 61 

63## Let the phases complete62## Follow scan progress

64 63 

65A scan runs these phases in order:64The workbench shows the current phase and reported progress. Select **View

66 65activity** to inspect the Codex task. Review the final result after the scan

671. **Threat modeling** identifies assets, entry points, trust boundaries, and66finishes, since findings can change while Codex checks the evidence.

68 security invariants.

692. **Finding discovery** reviews the requested code for plausible broken

70 controls and source-to-sink paths.

713. **Validation** tests or otherwise checks each candidate and records evidence

72 or proof gaps.

734. **Impact and path analysis** evaluates each candidate's realistic paths,

74 impact, and severity.

755. **Reporting** records validated findings, coverage, and scan metadata.

76 Detailed per-finding reports are available when requested.

776. **Structural hardening**, when requested, analyzes the finding set and

78 creates design guidance.

797. **Finalization** validates the structured scan contract and generates

80 `report.md`, including links to any detailed reports or hardening guidance.

81 

82The workbench shows the active scan phase and any progress the plugin reports.

83Select **View activity** to inspect the Codex task. Wait for the complete

84result instead of judging early candidates or stopping because one phase takes

85longer than another.

86 67 

87## Review the completed scan68## Review the completed scan

88 69 

89Review the result in this order:70Review the result in this order:

90 71 

911. Confirm the target, revision, and scan area.721. Confirm the target, revision, and scan area.

922. Read reviewed surfaces and every explicit deferred or follow-up area.732. Read reviewed surfaces and any deferred or follow-up areas.

933. For each finding, inspect the root control or sink, attacker-controlled743. For each finding, check how an attacker reaches the affected code, which

94 input, validation method, remaining uncertainty, realistic reachability,75 control fails, and what impact the evidence supports. Read the validation

95 severity rationale, and proposed remediation.76 method and any unresolved questions.

964. Dismiss findings whose evidence doesn't support the claimed path or impact.774. Investigate findings with missing evidence. Dismiss a finding when you can

78 explain why it doesn't apply, and keep that explanation with the result.

975. Select one accepted finding before starting a fix.795. Select one accepted finding before starting a fix.

98 80 

81A completed scan and complete coverage are separate claims. Read deferred

82areas even when the scan finishes successfully. Source-based validation can

83support a finding without a runtime reproduction. To resolve uncertainty

84that depends on execution, ask for validation of the specific finding.

85 

99<figure className="not-prose my-8">86<figure className="not-prose my-8">

100 <CodexScreenshot87 <CodexScreenshot

101 alt="Codex Security finding showing its severity, validation status, root cause, and attack path"88 alt="Codex Security finding showing its severity, validation status, root cause, and attack path"


109 </figcaption>96 </figcaption>

110</figure>97</figure>

111 98 

112## Assess a first scan99## Use your first scan as a baseline

113 100 

114Before scanning, choose two to four evaluation criteria, such as independent101Before scanning, decide what you want to compare, such as evidence quality

115discovery, evidence quality, false positives, or remediation quality. If you102or false positives. If you

116test against a known finding, record whether you provided it to Codex or103test against a known finding, record whether you provided it to Codex or

117withheld it from the scan.104withheld it from the scan.

118 105 


120Use this baseline to compare later scans after the code, security controls, or107Use this baseline to compare later scans after the code, security controls, or

121scan settings change.108scan settings change.

122 109 

123## Choose a scan cadence

124 

125Set your scan cadence based on the repository's risk and your team's capacity

126to address findings. Scan at these points:

127 

128- **Baseline:** Run a standard scan when you onboard a repository, take

129 ownership of a component, or need a starting point for a new threat model.

130- **Code changes:** [Review code

131 changes](https://learn.chatgpt.com/docs/security/plugin/code-changes) when a pull request or commit

132 changes security-sensitive code or an external integration.

133- **Regular review:** Set a recurring review interval based on your system's

134 exposure and how often the code changes. Adjust it to your team's capacity to

135 address findings.

136- **After a fix:** [Fix and verify the

137 finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings). Confirm that the issue no

138 longer reproduces and keep the original scan for comparison.

139 

140These scan triggers don't create an automated schedule.

141 

142## Reopen a previous scan110## Reopen a previous scan

143 111 

144Open **Security**, then select a saved scan from **Scans** to review its112Open **Security**, then select a saved scan from **Scans** to review its


148 116 

149## Use the results117## Use the results

150 118 

151Use the Security workbench to review findings, coverage, and follow-up areas119Open `report.md` for a portable report, and keep its scan directory together

152without inspecting raw JSON. Open `report.md` when available for the readable120when sharing or archiving it. Use [Export and track

153entry point to the complete scan directory. Keep the directory together when121findings](https://learn.chatgpt.com/docs/security/plugin/export-findings) for other formats or issue

154you share or archive it: the report links to detailed reports in `findings/`122tracking. After accepting a finding, [generate and verify a

155and structural hardening guidance in `hardening/` when those optional artifacts123fix](https://learn.chatgpt.com/docs/security/plugin/fix-findings).

156are available.

157 

158Behind the workspace, each scan preserves `scan-manifest.json`, `findings.json`,

159and `coverage.json` for automation and integrations. You normally don't need to

160open these files yourself.

161 

162For portable artifacts or external issue tracking, see [Export or track

163findings](https://learn.chatgpt.com/docs/security/plugin/export-findings).

164 

165## Next step

166 

167After you accept a finding, use [Fix and verify a

168finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings) to generate and review one

169bounded patch. Don't ask Codex to fix every finding from a scan in one chat.

Details

8findings, disclosure reports, incident reviews, assessment documents, and8findings, disclosure reports, incident reviews, assessment documents, and

9source code.9source code.

10 10 

11The result is a design portfolio, not a patch, and doesn't prove that it fixes a11The result compares design options and their engineering tradeoffs. Codex

12vulnerability. Codex changes the repository only after you select an option and12changes the repository only after you select an option and ask it

13explicitly ask it to make that change.13to implement it.

14 14 

15## Prepare the evidence15## Prepare the evidence

16 16 

17Provide the workflow with:17Provide the workflow with:

18 18 

19- A scan directory or an explicit collection of findings and reports.19- A scan directory or a collection of findings and reports.

20- The target source tree and relevant revision or snapshot when available.20- The target source tree and revision or snapshot when available.

21- PoCs, traces, incident evidence, or assessment material that supports the21- PoCs, traces, incident evidence, or assessment material that supports the

22 findings.22 findings.

23- Constraints for performance, memory, compatibility, reliability, operations,23- Constraints for performance, memory, compatibility, reliability, operations,

24 delivery time, or change scope.24 delivery time, or change scope.

25 25 

26The workflow uses the evidence to identify repeated broken invariants, dispersed26For example, repeated authorization bugs may suggest that a shared control

27controls, privileged choke points, weak isolation boundaries, and recurring27would be easier to enforce than checks in each handler. The evidence may also

28remediation patterns. It can also conclude that local fixes are more28support keeping a local fix instead of changing the architecture.

29proportionate than an architectural change.

30 29 

31## Run the workflow30## Run the workflow

32 31 


36Use $codex-security:propose-security-hardening to analyze [scan directory or finding paths] against [source tree and revision]. Develop evidence-backed structural hardening options with engineering tradeoffs, before-and-after diagrams, a migration plan, and an implementation handoff. Do not modify the repository.35Use $codex-security:propose-security-hardening to analyze [scan directory or finding paths] against [source tree and revision]. Develop evidence-backed structural hardening options with engineering tradeoffs, before-and-after diagrams, a migration plan, and an implementation handoff. Do not modify the repository.

37```36```

38 37 

39## Review the portfolio38## Choose an option

40 39 

41A useful portfolio should:40Before choosing an option, check that the proposal:

42 41 

43- Connect each proposed change to concrete findings, source, and threat-model42- Connects each proposed change to findings, source, and threat-model

44 evidence.43 evidence.

45- Describe the current design and the security invariants the new design should44- Describes the current design and the security invariants the new design should

46 preserve.45 preserve.

47- Compare distinct options, including residual risk, performance,46- Compares distinct options, including residual risk, performance,

48 reliability, operations, compatibility, and migration cost.47 reliability, operations, compatibility, and migration cost.

49- Recommend an option only when the evidence supports it, with explicit48- Supports its recommendation with evidence and states assumptions and open

50 assumptions and open questions.49 questions.

51- Include rollout, validation, rollback, and implementation guidance.50- Includes rollout, validation, rollback, and implementation guidance.

52- Separate observed facts, inferences, and proposed design properties.51- Separates observed facts, inferences, and proposed design properties.

53 52 

54Review the evidence and tradeoffs before choosing an option. An architecture53Review the evidence and tradeoffs before choosing an option. An architecture

55diagram or design recommendation doesn't replace validation of the original54diagram or design recommendation doesn't replace validation of the original

Details

12connectors can provide finding data, while GitHub findings require authenticated12connectors can provide finding data, while GitHub findings require authenticated

13GitHub REST access. Neither replaces access to the source code.13GitHub REST access. Neither replaces access to the source code.

14 14 

15Under the hood, Codex starts from the cited code or version information. It

16traces the claimed attacker-controlled source, relevant security controls,

17dangerous sink, and reachable path. It also checks the product surface and trust

18boundary, looks for contradictory evidence, and records proof gaps. Codex then returns

19one verdict per finding and ranks the findings that need action or further

20review.

21 

22This differs from `$codex-security:validation`, which can build or run code,15This differs from `$codex-security:validation`, which can build or run code,

23create a focused test or proof of concept, or exercise a real interface to16create a test or proof of concept, or exercise a real interface to

24reproduce or disprove a finding. Use triage to classify and rank an17reproduce or disprove a finding. Use triage to classify and rank an

25existing backlog. Use validation when runtime evidence could resolve a finding18existing backlog. Use validation when runtime evidence could resolve a finding

26that static evidence leaves uncertain.19that static evidence leaves uncertain.


34You can supply one finding or a collection from these sources:27You can supply one finding or a collection from these sources:

35 28 

36| Source | What to provide | Requirements |29| Source | What to provide | Requirements |

37| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |30| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

38| Pasted or local findings | SARIF results, a CVE or GHSA, an advisory, a scanner ticket, a bug bounty report, a Codex Security finding artifact, or a plain-language vulnerability claim. | No connector required. |31| Pasted or local findings | SARIF results, a CVE or GHSA, an advisory, a scanner ticket, a bug bounty report, a Codex Security finding artifact, or a plain-language vulnerability claim. | No connector required. |

39| Jira or Linear | Exact security or vulnerability issue URLs or identifiers, Jira JQL, or a Linear team, project, or search phrase. Codex retrieves the selected issue content before triage. | [Jira through Atlassian Rovo](codex://plugins/plugin_connector_692de805e3ec8191834719067174a384) or [Linear](codex://plugins/plugin_asdk_app_69a089a326dc8191b32a3f2553f5be2c) with read access. |32| Jira or Linear | Exact security or vulnerability issue URLs or identifiers, Jira JQL, or a Linear team, project, or search phrase. Codex retrieves the selected issue content before triage. | [Jira through Atlassian Rovo](codex://plugins/plugin_connector_692de805e3ec8191834719067174a384) or [Linear](codex://plugins/plugin_asdk_app_69a089a326dc8191b32a3f2553f5be2c) with read access. |

40| GitHub | A repository and one finding source: code scanning, `Dependabot` vulnerabilities and malware, security advisories and private vulnerability reports, or all sources. If you don't specify a repository, Codex uses the GitHub repository attached to the current Codex project when available. GitHub Issues aren't included in the default GitHub sources; provide a specific issue or ask for GitHub Issues explicitly when you want to triage them. | Authenticated GitHub REST access, such as `gh auth token`, `GH_TOKEN`, or `GITHUB_TOKEN`, with permission to read the selected repository and finding type. |33| GitHub | A repository and one finding source: code scanning, `Dependabot` vulnerabilities and malware, security advisories and private vulnerability reports, or all sources. If you don't specify a repository, Codex uses the GitHub repository attached to the current Codex project when available. GitHub Issues aren't included by default. Provide a specific issue or ask for GitHub Issues explicitly. | Authenticated GitHub REST access, such as `gh auth token`, `GH_TOKEN`, or `GITHUB_TOKEN`, with permission to read the selected repository and finding type. |

41 34 

42Codex keeps one result for every supplied finding, in input order, so each35Codex keeps one result for every supplied finding, in input order, so each

43source finding stays traceable. It doesn't merge or drop findings that look36source finding stays traceable. It doesn't merge or drop findings that look


74Use $codex-security:triage-finding to import and triage [code scanning, Dependabot vulnerabilities and malware, security advisories and private vulnerability reports, or all] from GitHub against this repository. Use the GitHub repository attached to the current Codex project.67Use $codex-security:triage-finding to import and triage [code scanning, Dependabot vulnerabilities and malware, security advisories and private vulnerability reports, or all] from GitHub against this repository. Use the GitHub repository attached to the current Codex project.

75```68```

76 69 

77The workflow proceeds in this order:70Codex checks the current source and applicable `SECURITY.md` policy, then

78 71returns a verdict for every input finding. It records evidence both for and

79<WorkflowSteps variant="headings">72against the claim, along with unresolved questions.

80 

811. Collect and organize the findings

82 

83 Codex retrieves any requested issue or GitHub content, preserves source

84 identifiers and references, and creates one triage item per input. It builds

85 the complete item list before assigning verdicts.

86 

872. Confirm the repository context

88 

89 Codex resolves the current repository and revision when available. It reads

90 `SECURITY.md` when present so supported versions, trusted inputs, product

91 boundaries, and out-of-scope surfaces inform the assessment.

92 

933. Inspect the static evidence

94 

95 For each finding, Codex traces the claimed attacker-controlled source,

96 relevant security control, vulnerable sink, reachable path, and supported

97 security boundary. It records supporting evidence, evidence against the

98 claim, and proof gaps.

99 

1004. Assign verdicts and ranks

101 

102 Codex assigns a verdict and confidence to every finding. It ranks

103 `confirmed` and `needs_review` findings by exploitability in separate queues.

104 

105</WorkflowSteps>

106 73 

107## Review the results74## Review the results

108 75 


112| `not_actionable` | Repository evidence rules out the claim, such as by showing an unaffected version, unreachable path, effective guard, or non-shipped surface. |79| `not_actionable` | Repository evidence rules out the claim, such as by showing an unaffected version, unreachable path, effective guard, or non-shipped surface. |

113| `needs_review` | Repository evidence isn't enough to decide because required information is missing, ambiguous, runtime-dependent, environment-dependent, or policy-dependent. |80| `needs_review` | Repository evidence isn't enough to decide because required information is missing, ambiguous, runtime-dependent, environment-dependent, or policy-dependent. |

114 81 

115Exploitability ranks use positive integers starting at `1`, independently82Use the rankings to decide which `confirmed` findings to fix first and which

116 within each verdict queue. This keeps remediation priorities separate from83`needs_review` findings to investigate first. Each group is ranked separately.

117 unresolved review work. Rank `1` is the most exploitable `confirmed` finding

118 or the highest-priority `needs_review` finding in that result set. The rank

119 isn't a scanner severity score, and `not_actionable` findings aren't ranked.

120 

121For each finding, review:

122 84 

123- the rationale for the verdict and rank85Read the verdict's rationale alongside the affected code and attacker

124- supporting evidence and evidence against the claim86prerequisites. Check the evidence against the claim and any open questions

125- open questions and remaining proof gaps87before acting on the rank. Here, `confirmed` means supported by static

126- the affected location and component88repository evidence, not reproduced by executing the application.

127- the product surface and source trust level

128- the recommended next step

129- the [`$codex-security:fix-finding`](https://learn.chatgpt.com/docs/security/plugin/fix-findings)

130 handoff, when the finding is `confirmed`

131 89 

132Triage is complete when every supplied finding has one result, Codex preserves90Jira, Linear, and other backlog records remain unchanged unless you ask Codex

133its source identifier, and any uncertainty is explicit. Jira, Linear, and other91to update them after reviewing the triage results.

134backlog records remain unchanged unless you ask Codex to write back after

135reviewing the triage results.

136 92 

137## Next steps93## Next steps

138 94 


141 verify it. Triage prepares a prompt-ready handoff but doesn't invoke the skill97 verify it. Triage prepares a prompt-ready handoff but doesn't invoke the skill

142 automatically.98 automatically.

143- `needs_review`: If running code can resolve the proof gap, use99- `needs_review`: If running code can resolve the proof gap, use

144 `$codex-security:validation` to perform bounded dynamic validation. Pass100 `$codex-security:validation` to test the finding against running code. Pass

145 the finding claim, affected locations, preconditions, static evidence, and101 the finding claim, affected locations, preconditions, static evidence, and

146 proof gaps from the triage result:102 proof gaps from the triage result:

147 103 

148```text104```text

149 Use $codex-security:validation to dynamically validate finding [triage item ID or source ID] from the backlog triage result. Use the strongest realistic, bounded method, record exactly what was tested, and preserve any remaining proof gaps.105 Use $codex-security:validation to dynamically validate finding [triage item ID or source ID] from the backlog triage result. Reproduce or disprove the finding, record what you tested, and list any remaining uncertainty.

150```106```

151 107 

152 Unlike triage, validation may build or run code, create a focused test or108 Unlike triage, validation may build or run code, create a test or

153 proof of concept, or exercise a real interface. Review the proposed commands109 proof of concept, or exercise a real interface. See [Codex approval and

154 before approving them and keep [Codex approval and security110 security policies](https://learn.chatgpt.com/docs/agent-approvals-security) for execution controls.

155 policies](https://learn.chatgpt.com/docs/agent-approvals-security) in place.

156 111 

157- `needs_review`: If the finding depends on product policy or deployment112- `needs_review`: If the finding depends on product policy or deployment

158 context, answer the listed open questions before changing code.113 context, answer the listed open questions before changing code.

Details

15- The target source tree and affected revision or release.15- The target source tree and affected revision or release.

16- Existing PoCs, logs, traces, screenshots, or diagnostic output.16- Existing PoCs, logs, traces, screenshots, or diagnostic output.

17- Fix commits or diffs when available.17- Fix commits or diffs when available.

18- The authorization boundary for any testing.

19 18 

20Source access is important because Codex checks each claim against the affected19Codex checks each claim against the affected source code before writing the

21code before writing the final report. If the source or affected revision isn't20report. If the source or affected revision isn't available, decide whether to

22available, decide whether an explicitly labeled, lower-confidence report is useful21proceed with a report that identifies the unverified claims.

23before proceeding.

24 22 

25## Run the workflow23## Run the workflow

26 24 

27Send a prompt like:25Send a prompt like:

28 26 

29```text27```text

30Use $codex-security:vulnerability-writeup to create one self-contained report for each distinct vulnerability in [input paths]. Verify the claims against [source path and revision], preserve or improve the supplied PoCs, and write the reports to [output directory]. Do not test public or production systems.28Use $codex-security:vulnerability-writeup to create one self-contained report for each distinct vulnerability in [input paths]. Verify the claims against [source path and revision], preserve or improve the supplied PoCs, and write the reports to [output directory]. Use a local test environment for reproductions.

31```29```

32 30 

33Codex inventories the supplied material, groups reports that describe the same31Codex inventories the supplied material, groups reports that describe the same

34root cause and vulnerable path, and creates one report directory per distinct32root cause and vulnerable path, and creates one report directory per distinct

35vulnerability. Each directory contains a descriptively named Markdown report33vulnerability. Each directory contains a Markdown report

36and a `poc/` directory when supporting PoC files are available.34and a `poc/` directory when supporting PoC files are available.

37 35 

38## Review each report36## Review each report


42- Traces the bug from the attacker-controlled entry point to the broken40- Traces the bug from the attacker-controlled entry point to the broken

43 security invariant and impact.41 security invariant and impact.

44- Distinguishes verified behavior from hypotheses and unresolved constraints.42- Distinguishes verified behavior from hypotheses and unresolved constraints.

45- Includes focused source excerpts with paths, functions, and the affected43- Includes source excerpts with paths, functions, and the affected

46 revision.44 revision.

47- Includes usable PoC source, build or run instructions, representative output,45- Includes PoC source, build or run instructions, representative output,

48 and safety limitations when a PoC is practical.46 and safety limitations when a PoC is practical.

49- Uses portable paths and doesn't depend on internal storage or local absolute47- Uses portable paths and doesn't depend on internal storage or local absolute

50 paths.48 paths.

51 49 

52Never test a public or production target unless you have explicit authorization

53for that exact target.

54 

55## Use reports from a scan50## Use reports from a scan

56 51 

57Detailed vulnerability reports are optional for standard, deep, and change52Detailed vulnerability reports are optional for standard, deep, and change

Details

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 

5The Security workbench brings your scans, findings, and repositories together5Use the Security workbench to start scans, review saved findings, and inspect

6in the Codex desktop app. Codex performs scan analysis in a regular task, while6a repository's scan history. Each scan runs in a Codex task you can open to

7the workbench keeps the scan and its results available when you return.7inspect its activity.

8 8 

9In the ChatGPT desktop app, open the ChatGPT dropdown and select **Codex**.9In the ChatGPT desktop app, open the ChatGPT dropdown and select **Codex**.

10Install and enable the [Codex Security plugin](https://learn.chatgpt.com/docs/security/plugin), then10Install and enable the [Codex Security plugin](https://learn.chatgpt.com/docs/security/plugin), then


252. Select an existing repository or choose another folder.252. Select an existing repository or choose another folder.

263. Choose **Codebase** to scan a repository or **Changes** to review a263. Choose **Codebase** to scan a repository or **Changes** to review a

27 Git-backed change.27 Git-backed change.

284. For a standard codebase scan, select the entire repository or a folder.284. Set the scope. For **Codebase**, choose the entire repository or a folder.

295. For a deep scan, first select the repository or folder as the codebase, then29 Turn on **Deep scan** for repeated review of the selected codebase. For

30 turn on **Deep scan**. Deep scans review the entire selected codebase.30 **Changes**, choose uncommitted changes, a commit, or a revision range.

316. For a changes scan, select uncommitted changes, a commit, or a revision31 Deep scans aren't available for changes.

32 range. **Deep scan** isn't available for changes scans.325. Choose a model and reasoning effort. Use **Additional context** for

337. Choose a model and reasoning effort. Open **Additional context** to describe33 threat-model or deployment details.

34 relevant attack vectors, focus areas, or other security context.346. Select **Start scan**.

358. Select **Start scan**.

36 35 

37</WorkflowSteps>36</WorkflowSteps>

38 37 


55 54 

56## Follow scan progress55## Follow scan progress

57 56 

58The scan page shows the current phase and any scan progress the plugin reports.57The scan page shows the current phase and any progress the plugin reports.

59For a standard scan, phases include threat modeling, discovery, validation,

60impact and path analysis, reporting, and finalization.

61 58 

62Select **View activity** to open the Codex task that runs the scan. You can59Select **View activity** to open the Codex task that runs the scan. You can

63leave the workbench and return to **Scans** without losing a saved scan. To stop60leave the workbench and return to **Scans** without losing a saved scan. To stop

64work intentionally, open the scan and select **Stop scan**.61work, open the scan and select **Stop scan**.

65 62 

66When the scan completes, open its results to review the target, revision,63When the scan completes, open its results to review the target, revision,

67findings, coverage, and available report artifacts.64findings, coverage, and available report artifacts.


86evidence, validation, and impact.83evidence, validation, and impact.

87 84 

88Use **Summary** for the finding details and **Patch** when you want to generate,85Use **Summary** for the finding details and **Patch** when you want to generate,

89review, apply, or verify a focused fix. See [Fix and verify security86review, apply, or verify a fix. See [Fix and verify security

90findings](https://learn.chatgpt.com/docs/security/plugin/fix-findings) for the remediation workflow.87findings](https://learn.chatgpt.com/docs/security/plugin/fix-findings) for the remediation workflow.

91 88 

92The **Findings** tab shows findings from saved Codex Security scans. Imported89The **Findings** tab shows findings from saved Codex Security scans. Imported

security/sdk.md +48 −40

Details

11(22.13.0 or later), 24, or 26. Scanning also requires Python 3.10 or later.11(22.13.0 or later), 24, or 26. Scanning also requires Python 3.10 or later.

12Python 3.10 also requires the `tomli` package.12Python 3.10 also requires the `tomli` package.

13 13 

14The Codex Security SDK is [publicly available on14Running scans requires Codex Security access. For general coding agents, see

15 GitHub](https://github.com/openai/codex-security). Running scans requires15 the [Codex SDK guide](https://learn.chatgpt.com/docs/codex-sdk). For terminal and CI workflows, see

16 Codex Security access. For general coding agents, see the [Codex SDK16 the [Codex Security CLI quickstart](https://learn.chatgpt.com/docs/security/cli).

17 guide](https://learn.chatgpt.com/docs/codex-sdk). For terminal and CI workflows, see the [Codex

18 Security CLI quickstart](https://learn.chatgpt.com/docs/security/cli).

19 17 

20## Set up the SDK18## Set up the SDK

21 19 


31credentials; OpenRouter and Fireworks use provider-specific API keys and29credentials; OpenRouter and Fireworks use provider-specific API keys and

32configuration.30configuration.

33 31 

34For best results, use an account verified for [Trusted Access for32For best results, use an account verified for [Trusted Access for Cyber](https://chatgpt.com/cyber). Signing in or providing an API key does not

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

36grant Trusted Access.33grant Trusted Access.

37 34 

38## Run a scan35## Run a scan

39 36 

40Scan only repositories you trust and have permission to assess. The SDK runs37The SDK runs with your local operating-system permissions and doesn't pause

41with your local operating-system permissions and never pauses for approval.38for approval.

42Scan processes can inherit your environment, so remove unrelated credentials39Scan processes can inherit your environment, so remove unrelated credentials

43before you start. See [Local scan40before you start. See [Local scan

44permissions](https://learn.chatgpt.com/docs/security/cli/reference#local-scan-permissions).41permissions](https://learn.chatgpt.com/docs/security/cli/reference#local-scan-permissions).

45 42 

46Create one `CodexSecurity` client, run a standard repository scan, and close43Save this example as `scan.mjs`. Replace the paths, run a standard repository

47the client when the work completes. Pass `outputDir` to choose a private44scan, and close the client when the work completes. Pass `outputDir` to choose a private

48results directory outside the enclosing Git worktree.45results directory outside the enclosing Git worktree.

49 46 

50If you omit `outputDir`, Codex Security saves results in its own persistent47If you omit `outputDir`, Codex Security saves results in its own persistent

51state directory. Results can include source excerpts and vulnerability48state directory. Results can include source excerpts and vulnerability

52details, so choose appropriate permissions and retention policies.49details. Set who can read them and how long to keep them.

53 50 

54```ts51```ts

55 52 


62 });59 });

63 60 

64 console.log(result.reportPath);61 console.log(result.reportPath);

65 console.log(result.coverage.completeness);62 console.log(result.manifest.scan.status);

66 console.log(result.findings.findings.length);63 console.log(result.findings.findings.length);

67} finally {64} finally {

68 await security.close();65 await security.close();

69}66}

70```67```

71 68 

72`run` starts the scan, waits for completion, validates the sealed artifacts,69Run it with Node.js:

73and returns a `ScanResult`. `close` releases the isolated runtime and supports70 

74repeated calls.71```bash

72node scan.mjs

73```

74 

75The example prints the report path, scan status, and finding count.

76Open the report to review the evidence. The count varies with the repository

77and scan, so don't use an expected count to check whether the integration works.

78 

79`run` validates the saved artifacts and returns a `ScanResult` when

80`result.manifest.scan.status` is `"completed"`. Check `result.coverage` for

81reviewed surfaces, exclusions, and deferred work. A completed scan can still

82have coverage gaps. Runtime, input, or result-integrity failures can throw an

83[error](#handle-scan-errors).

84 

85In later examples, reuse the open `security` client and keep `close()` in

86`finally` to release the runtime. Add any additional imports at the top of

87`scan.mjs`.

75 88 

76## Check inputs with preflight89## Check inputs with preflight

77 90 


91console.log(plan.outputDir);104console.log(plan.outputDir);

92```105```

93 106 

94Preflight leaves the Codex runtime and credentials untouched. It also leaves107Preflight checks local inputs without starting Codex, loading credentials, or

95plugin and Python discovery for the scan itself. This makes preflight useful108checking Python and plugin availability. A successful preflight doesn't prove

96for checking user input before a long-running or credentialed operation.109that the scan can authenticate or start.

97 110 

98To preview archival for an existing result directory, set111To preview archival for an existing result directory, set

99`archiveExisting: true`:112`archiveExisting: true`:


199`maxTimeHours` defaults to `96` and accepts a positive number up to `96`,212`maxTimeHours` defaults to `96` and accepts a positive number up to `96`,

200including fractional hours. At the deadline, Codex Security stops unfinished213including fractional hours. At the deadline, Codex Security stops unfinished

201workers, keeps completed scan results, and aggregates them into the final214workers, keeps completed scan results, and aggregates them into the final

202report. Review `result.coverage.completeness` before treating a time-limited215report. Review `result.coverage` for deferred work and open questions.

203scan as evidence of full coverage.

204 216 

205### Add a security knowledge base217### Add a security knowledge base

206 218 


254 266 

255The limit estimates spending but isn't a hard cap, so requests already in267The limit estimates spending but isn't a hard cap, so requests already in

256progress can finish slightly above it. If a deep scan reaches the limit after268progress can finish slightly above it. If a deep scan reaches the limit after

257Codex Security aggregates completed worker results, `run` returns a result269Codex Security aggregates completed worker results, `run` can return a result

258with `coverage.completeness` set to `"partial"` and reports the budget warning270with `manifest.scan.status` set to `"completed"` and report the budget warning

259through `onWarning`.271through `onWarning`. Check `result.coverage` for the work left unfinished.

260 272 

261If the scan can't produce a completed partial result, `run` throws273If the scan can't produce a valid completed result, `run` throws

262`ScanCostLimitExceededError` and preserves any available output.274`ScanCostLimitExceededError` and preserves any available output.

263 275 

264## Work with scan results276## Work with scan results


271| `manifest` | The sealed scan manifest, including target, scope, producer, and artifact records. |283| `manifest` | The sealed scan manifest, including target, scope, producer, and artifact records. |

272| `findings` | Findings from the current scan. Read finding objects from `findings.findings`. |284| `findings` | Findings from the current scan. Read finding objects from `findings.findings`. |

273| `repositoryFindings` | Open findings across repository scans, when scan history is available. |285| `repositoryFindings` | Open findings across repository scans, when scan history is available. |

274| `coverage` | Reviewed surfaces, exclusions, deferred work, open questions, and completeness. |286| `coverage` | Reviewed surfaces, exclusions, deferred work, and open questions. |

275| `scanDir` | The scan directory. |287| `scanDir` | The scan directory. |

276| `threadId` | The Codex thread identifier for the scan. |288| `threadId` | The Codex thread identifier for the scan. |

277| `turnResult` | Turn status, response, and available usage metadata. |289| `turnResult` | Turn status, response, and available usage metadata. |


319}331}

320```332```

321 333 

322Coverage completeness is `complete`, `partial`, or `unknown`. Review deferred334New results don't include `coverage.completeness`. Use `manifest.scan.status`

323surfaces, exclusions, and open questions before using a scan as evidence for a335for execution status, and review deferred surfaces, exclusions, and open

324security decision.336questions in `coverage` to understand what the scan reviewed.

325 337 

326`result.toJSON()` returns the manifest, repository and current-scan findings,338`result.toJSON()` returns the manifest, repository and current-scan findings,

327coverage, scan and thread identifiers, `reportPath`, `artifactsDir`,339coverage, scan and thread identifiers, `reportPath`, `artifactsDir`,


358console.log(result.reportPath);370console.log(result.reportPath);

359```371```

360 372 

361Pass an `AbortSignal` when cancellation comes from a request, job controller,373Pass an `AbortSignal` from your request or job controller to cancel a scan.

362or timeout:374If the scan is still running after 30 minutes, this example interrupts it and

375prints the directory containing any saved output:

363 376 

364```ts377```ts

365 378 

366 379 

367const controller = new AbortController();

368 

369try {380try {

370 const scan = security.run("/path/to/repository", {381 await security.run("/path/to/repository", {

371 outputDir: "/path/outside/repository/results",382 outputDir: "/path/outside/repository/results",

372 signal: controller.signal,383 signal: AbortSignal.timeout(30 * 60 * 1000),

373 });384 });

374 

375 controller.abort();

376 await scan;

377} catch (error) {385} catch (error) {

378 if (error instanceof ScanInterruptedError) {386 if (error instanceof ScanInterruptedError) {

379 console.error(error.scanDir);387 console.error(error.scanDir);


481 489 

482A login handle provides `waitForInstructions`, `authUrl`, `verificationUrl`,490A login handle provides `waitForInstructions`, `authUrl`, `verificationUrl`,

483`userCode`, `wait`, and `cancel` so an application can present and complete the491`userCode`, `wait`, and `cancel` so an application can present and complete the

484selected sign-in flow. The SDK can reuse a file-backed Codex sign-in. API keys492selected sign-in flow. The SDK can reuse a file-backed Codex sign-in. Use API keys

485are a useful fit for CI and server-side automation.493for CI and server-side automation.

486 494 

487When both an API key and a stored sign-in are available, the SDK uses the API495When both an API key and a stored sign-in are available, the SDK uses the API

488key by default. To use your ChatGPT sign-in instead, select it for the scan:496key by default. To use your ChatGPT sign-in instead, select it for the scan:

Details

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 

5Codex Security Review is available to ChatGPT Enterprise, Business, Edu, and5Codex Security Review is available to ChatGPT Enterprise, Business, Edu, and

6Pro customers; it is not available on Plus. Security reviews consume included6Pro customers. It isn't available on Plus. Security reviews consume included

7Codex allowance or ChatGPT credits.7Codex allowance or ChatGPT credits.

8 8 

9Codex Security Review is an additional review for customers that want to9Use Security Review to check a GitHub pull request for security issues in its

10pay particular attention to security issues in pull requests.10diff and supporting code. It uses threat-model context or security guidance

11when configured and posts findings that meet your reporting threshold.

11 12 

12Codex Security Review goes deeper than [Code13[Code Review](https://learn.chatgpt.com/docs/third-party/github) can also report security issues during

13Review](https://learn.chatgpt.com/docs/third-party/github) on security-specific risks by analyzing the14its general review, so the two reviews may report the same finding.

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

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

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

17 15 

18## Before you start16## Before you start

19 17 


73Findings posted to a pull request inherit that pull request's GitHub71Findings posted to a pull request inherit that pull request's GitHub

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

75including on public repositories or pull requests from contributors outside73including on public repositories or pull requests from contributors outside

76your workspace. Choose reporting thresholds carefully for repositories where74your workspace. The reporting threshold controls

77pull request comments may be broadly visible. The reporting threshold controls75what Codex posts to GitHub. The full Codex Security Review report remains in

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

79Codex.76Codex.

80 77 

81<a id="request-a-security-review"></a>78<a id="request-a-security-review"></a>


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

92including severity, attack path, supporting evidence, validation, and89including severity, attack path, supporting evidence, validation, and

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

94post findings to the pull request.91post findings to the pull request. Check the task status and full report

92before interpreting an empty comment result as a completed review with no

93findings.

95 94 

96## Related docs95## Related docs

97 96 

security/setup.md +37 −24

Details

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 the Codex Security Cloud plugin to scan connected GitHub repositories,5Run a first scan of a connected GitHub repository with Codex Security Cloud,

6review findings, and monitor new commits.6then review its findings. Afterward, you can enable monitoring for new commits.

7 7 

8Codex Security Cloud runs scans in [Codex cloud](https://learn.chatgpt.com/docs/cloud). For scans of a8Codex Security Cloud runs scans in [Codex cloud](https://learn.chatgpt.com/docs/cloud). For scans of a

9 local repository in the desktop app or CLI, use the separate [Codex Security9 local repository in the desktop app or CLI, use the separate [Codex Security

10 plugin](https://learn.chatgpt.com/docs/security/plugin).10 plugin](https://learn.chatgpt.com/docs/security/plugin).

11 11 

12## Before you start

13 

14Use a workspace with Codex Security Cloud access and [Codex cloud](https://learn.chatgpt.com/docs/cloud)

15set up. You need permission to connect the GitHub repository you want to scan.

16You can create its cloud environment during setup.

17 

18If the plugin is unavailable, check access with your workspace administrator.

19If a repository is missing, use **Configure access** in the repository picker to

20check the GitHub app's organization and repository access. If you can't grant

21access yourself, ask your GitHub administrator to add the repository.

22 

12## 1. Install and open the plugin23## 1. Install and open the plugin

13 24 

141. Open **Plugins** in ChatGPT on the web or in the desktop app.251. Open **Plugins** in ChatGPT on the web or in the desktop app.


25 class="my-8"36 class="my-8"

26/>37/>

27 38 

28If access is unavailable, check with your workspace administrator.

29 

30## 2. Connect GitHub39## 2. Connect GitHub

31 40 

32Confirm that [Codex cloud](https://learn.chatgpt.com/docs/cloud) is set up for your workspace. In the41Confirm that [Codex cloud](https://learn.chatgpt.com/docs/cloud) is set up for your workspace. In the


36 45 

37Codex Security Cloud doesn't support workspace connections.46Codex Security Cloud doesn't support workspace connections.

38 47 

39If a repository is missing, use **Configure access** in the repository picker to

40check the GitHub app's organization and repository access. If you can't grant

41access yourself, ask your GitHub administrator to add the repository.

42 

43## 3. Start a repository scan48## 3. Start a repository scan

44 49 

451. In **New Scan**, choose the repository.501. In **New Scan**, choose the repository.


493. Under **Scan Method**, select **One-Time Scan**.543. Under **Scan Method**, select **One-Time Scan**.

504. Select **Create**.554. Select **Create**.

51 56 

52Open the scan in **Scans** to follow its progress and review its findings and57Open the scan in **Scans** to follow progress. Wait for it to finish, then

53artifacts.58check the reported status and target before interpreting its findings. If it

59fails or is canceled, read the available output as an incomplete review.

54 60 

55## 4. Review findings and available fixes61## 4. Review findings and available fixes

56 62 


71 />77 />

72 <figcaption className="mt-3 text-sm text-secondary">78 <figcaption className="mt-3 text-sm text-secondary">

73 Filter and review open findings. Repositories, findings, and counts are79 Filter and review open findings. Repositories, findings, and counts are

74 fictional and match the overview example.80 fictional.

75 </figcaption>81 </figcaption>

76</figure>82</figure>

77 83 

78Select an issue to review its affected code, validation evidence, and84Open a finding from the scan or from **Findings**. Check its affected code and

79remediation guidance.85revision, the path an attacker could take, and the validation evidence. Read

86any unresolved assumptions before deciding whether the issue applies. A scan

87with no reported findings doesn't establish that the repository has no

88vulnerabilities.

89 

90When a repository finding offers **Fix with Codex**, selecting it starts a

91Codex conversation to check the finding against current code, implement a fix,

92and run relevant tests. Review the resulting changes and test evidence there.

80 93 

81When a finding offers **Fix with Codex**, select it to generate a proposed94Findings from commit monitoring can instead offer a suggested patch. Review

82patch. Review the patch before selecting **Create draft pull request**.95that patch before selecting **Create draft pull request**. These actions have

96different effects, so follow the workflow shown for the finding.

83 97 

84## 5. Monitor new commits98## 5. Monitor new commits

85 99 

86To review changes as new commits arrive:100Once you've reviewed the first scan, you can monitor changes as new commits

101arrive:

87 102 

881. Select **Scan**, then choose the repository and review the environment.1031. Select **Scan**, then choose the repository and review the environment.

892. Under **Scan Method**, select **Continuous Scanning**. Codex Security scans1042. Under **Scan Method**, select **Continuous Scanning**. Codex Security scans


119making the change. If you can't edit it, ask the scan owner or a Codex Security134making the change. If you can't edit it, ask the scan owner or a Codex Security

120administrator.135administrator.

121 136 

122Review and edit the generated threat model under **Project context**, then137Review the generated threat model in **Monitoring settings** and update it

123select **Save**. See [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model)138with deployment or security context the code doesn't establish. See

124for guidance.139[Improve the threat model](https://learn.chatgpt.com/docs/security/threat-model).

125 

126## Related docs

127 140 

128- [Codex Security](https://learn.chatgpt.com/docs/security) gives the product overview.141For questions about builds, validation, or result interpretation, see the

129- [Codex Security Cloud FAQ](https://learn.chatgpt.com/docs/security/faq) covers common Cloud questions.142[Cloud FAQ](https://learn.chatgpt.com/docs/security/faq). To review GitHub pull requests, use

130- [Improving the threat model](https://learn.chatgpt.com/docs/security/threat-model) explains how to improve scan context and finding prioritization.143[Security Review](https://learn.chatgpt.com/docs/security/security-review).

Details

1# Improving the threat model1# Improve the Cloud threat model

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 

5Review and update the threat model for a repository monitored by Codex Security Cloud.5Update a monitored repository's threat model when the generated version misses

6security assumptions or deployment context. This guide applies to Codex

7Security Cloud. For local plugin policy, see [Configure the

8scan](https://learn.chatgpt.com/docs/security/plugin/scans#configure-the-scan).

6 9 

7## What a threat model is10## What a threat model is

8 11 

9A threat model is a short security summary of how your repository works. Codex Security creates the first draft from the code and uses it to guide future commit scans and prioritize findings.12A threat model is a short security summary of how your repository works. Codex Security creates the first draft from the code and uses it to guide future commit scans and prioritize findings.

10 13 

11A useful threat model calls out:14A threat model describes:

12 15 

13- entry points and untrusted inputs16- Entry points and who can supply input to them

14- trust boundaries and auth assumptions17- Trust boundaries and authentication or authorization assumptions

15- sensitive data paths or privileged actions18- Sensitive data and privileged actions

16- the areas your team wants reviewed first19- Areas that need particular attention

17 20 

18For example:21For example:

19 22 

20> Public API for account changes. Accepts JSON requests and file uploads. Uses an internal auth service for identity checks and writes billing changes through an internal service. Focus review on auth checks, upload parsing, and service-to-service trust boundaries.23> The public account API accepts authenticated users' JSON requests and file

24> uploads. Users may change only accounts in their own tenant. The identity

25> service authenticates the caller, but each handler must check tenant access.

26> Billing changes go through a privileged internal service. Prioritize missing

27> tenant checks and upload paths that can reach that service.

21 28 

22## Improving and revisiting the threat model29Identify uncertain assumptions. For example, don't describe an endpoint

30as internal-only unless that is true of the deployment you want assessed.

23 31 

24Update the threat model when your architecture or priorities change, or when findings miss the areas you care about.32## Edit the threat model

25 

26### Where to edit

27 33 

281. Open the Codex Security Cloud plugin. See [Cloud setup](https://learn.chatgpt.com/docs/security/setup)341. Open the Codex Security Cloud plugin. See [Cloud setup](https://learn.chatgpt.com/docs/security/setup)

29 if you haven't installed it or configured commit monitoring.35 if you haven't installed it or configured commit monitoring.

302. Open **Repositories** and select the monitored repository.362. Open **Repositories** and select the monitored repository.

313. Open **Monitoring settings**.373. Open **Monitoring settings**.

324. Under **Project context**, edit **Threat model**, then select **Save**.384. Edit **Threat model**, then select **Save**.

33 39 

34Changes apply to future scans.40Changes apply to future scans.

35 41 

36## Related docs42Revisit the model after changes to authentication, tenant boundaries, or exposed

37 43services. Keep facts about the deployment separate from priorities for the scan.

38- [Codex Security Cloud setup](https://learn.chatgpt.com/docs/security/setup) covers repository setup and findings review.

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

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

space.md +8 −5

Details

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 

5ChatGPT Space brings your pages, files, and shared work into one place. Write and5ChatGPT Space brings your pages, slides, files, and shared work into one place.

6edit alongside ChatGPT, then invite other people to work with you.6Write and edit alongside ChatGPT, then invite other people to work with you.

7 7 

8 8 

9 9 


38 38 

39Space also brings together:39Space also brings together:

40 40 

41- **Spreadsheets and presentations:** Create and edit tables, calculations, and41- **[ChatGPT Slides](https://learn.chatgpt.com/docs/space/getting-started#create-and-refine-slides):**

42 slides with ChatGPT.42 Build a presentation from a conversation, files, or a template. Edit the same

43 deck with your team and ChatGPT, then present or export it.

44- **Spreadsheets:** Create and edit tables and calculations with ChatGPT.

43- **[Sites](https://learn.chatgpt.com/docs/sites):** Websites and tools you build with ChatGPT.45- **[Sites](https://learn.chatgpt.com/docs/sites):** Websites and tools you build with ChatGPT.

44- **Images and files:** Uploaded files and saved work you can open and reuse.46- **Images and files:** Uploaded files and saved work you can open and reuse.

45 47 


54onto a page is visible to people who can access that page. Sharing a page56onto a page is visible to people who can access that page. Sharing a page

55doesn't share your private chats or saved memory.57doesn't share your private chats or saved memory.

56 58 

57To create your first page, see [Getting started](https://learn.chatgpt.com/docs/space/getting-started).59To create your first page or slide deck, see

60[Getting started](https://learn.chatgpt.com/docs/space/getting-started).

58For workspace controls, see [Manage ChatGPT Space](https://learn.chatgpt.com/docs/enterprise/chatgpt-space).61For workspace controls, see [Manage ChatGPT Space](https://learn.chatgpt.com/docs/enterprise/chatgpt-space).

Details

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 

5Share a page on its own or, where available, share a Space to give people access5Share a page on its own or, where available, share a Space to give people access

6to a group of related pages.6to a group of related pages. You can also share a slide deck to work on a

7presentation together.

7 8 

8## Choose an access level9## Choose an access level

9 10 


79Check access to linked source material separately. A collaborator who can read80Check access to linked source material separately. A collaborator who can read

80your page may still lack permission to open a source linked from it.81your page may still lack permission to open a source linked from it.

81 82 

83## Collaborate on slides

84 

85Open a deck in Space and use its sharing controls to invite collaborators.

86Choose view access for people who need to read the deck or edit access for

87people who will revise it with you. Slides currently supports view and edit

88access; a separate comment-only role isn't available.

89 

90With edit access, you and your teammates can change the same deck at the same

91time. Use shared comments to discuss feedback, mention a teammate, or mention

92ChatGPT or your dot to request an update. For a change to a specific element,

93select it and choose **Request edits**.

94 

95To start a deck, refine its content, or export the result, see

96[Create and refine slides](https://learn.chatgpt.com/docs/space/getting-started#create-and-refine-slides).

97 

82## Resolve an access problem98## Resolve an access problem

83 99 

84If someone can't open the work, check that they are using the intended account100If someone can't open the work, check that they are using the intended account

Details

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 

5Start with a blank page, notes you already have, or a conversation you want to5Create a page or slide deck from notes, files, or a conversation. You need an

6save. You need an account with Space enabled.6account with Space enabled.

7 7 

8## Open Space8## Open Space

9 9 


53 53 

54</WorkflowSteps>54</WorkflowSteps>

55 55 

56## Create and refine slides

57 

58ChatGPT Slides lets you build a presentation with your team and ChatGPT in

59Space. On mobile, you can create slides through conversation and view decks.

60Use the web or desktop to edit slide elements directly.

61 

62<WorkflowSteps variant="headings">

63 

641. Start with your material

65 

66 Ask ChatGPT to create a presentation in Space from a conversation, an outline,

67 or source files. Describe the audience, goal, and length. You can also provide

68 a reference deck or template to guide the layout and style.

69 

70

71 

72**Prompt:**

73 

74```text

75Create an 8-slide quarterly business review in Space using these notes and metrics. The audience is our leadership team. Cover results, risks, and decisions needed. Use the attached deck as a style reference, preserve the source numbers, and flag missing information.

76```

77 

782. Refine the deck

79 

80 Open the editable deck in Space. Edit text, images, shapes, tables, and charts

81 directly, or select an element and choose **Request edits** to ask ChatGPT for

82 a change. Use the prompt bar for changes across the deck, such as shortening

83 the story for an executive audience. Ask ChatGPT to generate images or use

84 visuals you upload.

85 

863. Work with your team

87 

88 Share the deck and give collaborators edit access to work on the same slides

89 at the same time. Use shared comments to discuss changes or mention ChatGPT

90 or your dot to request a revision. See

91 [Collaborate on slides](https://learn.chatgpt.com/docs/space/collaboration#collaborate-on-slides) for

92 permissions and feedback.

93 

944. Present or export

95 

96 Check the facts, charts, and layout before presenting. Present directly in

97 ChatGPT with speaker notes, or export the deck. On the web, you can export to

98 PowerPoint (`.pptx`), PDF, or Google Slides. In the desktop app, options to

99 open the deck in PowerPoint or Keynote appear when those apps are installed.

100 Review the exported deck's content and formatting before sharing it.

101 

102</WorkflowSteps>

103 

104If the Windows desktop app creates a PowerPoint file instead of a collaborative

105deck, switch to cloud mode or use ChatGPT on the web to create and edit slides

106in Space.

107 

56## Group related pages in a space108## Group related pages in a space

57 109 

58For a topic or team with related pages, create a space. From **All**, open110For a topic or team with related pages, create a space. From **All**, open

whats-new.md +11 −0

Details

6 6 

7 7 

8 8 

9## October 12–16, 2026

10 

11 

12 

13 

14### Open your dot from iOS widgets and Shortcuts

15 

16Add the **Your dot** Home Screen widget to open your conversation, with optional message and call buttons. In Apple Shortcuts, use **Open your dot** with **Messaging**, **Dictation**, or **Call** mode. You can assign a saved shortcut to your iPhone's Action button on supported models.

17 

18These features are rolling out with ChatGPT for iOS 1.2026.279 and require [dot access](https://learn.chatgpt.com/docs/dots#access). [Set up widgets and shortcuts](https://learn.chatgpt.com/docs/dots/channels#ios-widgets-and-shortcuts).

19 

9## [October 5–9, 2026](https://learn.chatgpt.com/docs/whats-new/october-5-9-2026)20## [October 5–9, 2026](https://learn.chatgpt.com/docs/whats-new/october-5-9-2026)

10 21 

11 22 

windows.md +3 −0

Details

101 101 

102- Managed networking requires effective `allow_local_binding = true`. MXC permits connections to and from services on host loopback. Proxy domain rules still apply to proxied traffic, but the proxy's additional private-network destination checks are removed.102- Managed networking requires effective `allow_local_binding = true`. MXC permits connections to and from services on host loopback. Proxy domain rules still apply to proxied traffic, but the proxy's additional private-network destination checks are removed.

103- Remaining child processes stop when the foreground command exits. Test workflows that rely on detached development servers.103- Remaining child processes stop when the foreground command exits. Test workflows that rely on detached development servers.

104- Deny-read globs use the files that match when each sandboxed process starts, as on Linux and WSL. Matching files created later remain readable to that running process if its other permissions allow access. Long-running shells, scripts, watchers, and development servers keep that snapshot for their lifetime, not the whole Codex session. See [deny-read glob timing](https://learn.chatgpt.com/docs/permissions#deny-reads-with-exact-paths-or-globs).

104 105 

105### Configure a legacy fallback106### Configure a legacy fallback

106 107 


113 114 

114`elevated` is the preferred legacy fallback. It uses dedicated lower-privilege sandbox users, filesystem permission boundaries, firewall rules, and local policy changes needed for commands that run in the sandbox.115`elevated` is the preferred legacy fallback. It uses dedicated lower-privilege sandbox users, filesystem permission boundaries, firewall rules, and local policy changes needed for commands that run in the sandbox.

115 116 

117Like MXC, `elevated` enumerates deny-read glob matches when each sandboxed process starts. Matching files created later remain readable to that running process if its other permissions allow access. See [deny-read glob timing](https://learn.chatgpt.com/docs/permissions#deny-reads-with-exact-paths-or-globs) for the consequences for long-running processes.

118 

116`unelevated` is a legacy fallback. It runs commands with a restricted Windows token derived from your current user, applies ACL-based filesystem boundaries, and uses environment-level offline controls instead of the dedicated offline-user firewall rule. It provides weaker network isolation than `elevated` and doesn't support denied read paths, but is still useful when administrator-approved setup is blocked by local or enterprise policy.119`unelevated` is a legacy fallback. It runs commands with a restricted Windows token derived from your current user, applies ACL-based filesystem boundaries, and uses environment-level offline controls instead of the dedicated offline-user firewall rule. It provides weaker network isolation than `elevated` and doesn't support denied read paths, but is still useful when administrator-approved setup is blocked by local or enterprise policy.

117 120 

118Use MXC when the device and policy support it. Otherwise, prefer `elevated`, with `unelevated` as a secondary fallback.121Use MXC when the device and policy support it. Otherwise, prefer `elevated`, with `unelevated` as a secondary fallback.

Details

101 101 

102- Managed networking requires effective `allow_local_binding = true`. MXC permits connections to and from services on host loopback. Proxy domain rules still apply to proxied traffic, but the proxy's additional private-network destination checks are removed.102- Managed networking requires effective `allow_local_binding = true`. MXC permits connections to and from services on host loopback. Proxy domain rules still apply to proxied traffic, but the proxy's additional private-network destination checks are removed.

103- Remaining child processes stop when the foreground command exits. Test workflows that rely on detached development servers.103- Remaining child processes stop when the foreground command exits. Test workflows that rely on detached development servers.

104- Deny-read globs use the files that match when each sandboxed process starts, as on Linux and WSL. Matching files created later remain readable to that running process if its other permissions allow access. Long-running shells, scripts, watchers, and development servers keep that snapshot for their lifetime, not the whole Codex session. See [deny-read glob timing](https://learn.chatgpt.com/docs/permissions#deny-reads-with-exact-paths-or-globs).

104 105 

105### Configure a legacy fallback106### Configure a legacy fallback

106 107 


113 114 

114`elevated` is the preferred legacy fallback. It uses dedicated lower-privilege sandbox users, filesystem permission boundaries, firewall rules, and local policy changes needed for commands that run in the sandbox.115`elevated` is the preferred legacy fallback. It uses dedicated lower-privilege sandbox users, filesystem permission boundaries, firewall rules, and local policy changes needed for commands that run in the sandbox.

115 116 

117Like MXC, `elevated` enumerates deny-read glob matches when each sandboxed process starts. Matching files created later remain readable to that running process if its other permissions allow access. See [deny-read glob timing](https://learn.chatgpt.com/docs/permissions#deny-reads-with-exact-paths-or-globs) for the consequences for long-running processes.

118 

116`unelevated` is a legacy fallback. It runs commands with a restricted Windows token derived from your current user, applies ACL-based filesystem boundaries, and uses environment-level offline controls instead of the dedicated offline-user firewall rule. It provides weaker network isolation than `elevated` and doesn't support denied read paths, but is still useful when administrator-approved setup is blocked by local or enterprise policy.119`unelevated` is a legacy fallback. It runs commands with a restricted Windows token derived from your current user, applies ACL-based filesystem boundaries, and uses environment-level offline controls instead of the dedicated offline-user firewall rule. It provides weaker network isolation than `elevated` and doesn't support denied read paths, but is still useful when administrator-approved setup is blocked by local or enterprise policy.

117 120 

118Use MXC when the device and policy support it. Otherwise, prefer `elevated`, with `unelevated` as a secondary fallback.121Use MXC when the device and policy support it. Otherwise, prefer `elevated`, with `unelevated` as a secondary fallback.