How to Secure OpenAI Codex and ChatGPT Agents: 10 Controls for 2026

Summary: The weeks before someone resigns are when customer lists, pricing and source code are most likely to walk out the door, and AI tools now make that data easier to reshape and carry. Companies that watch data movement on the device, in context, can protect what matters without treating every employee like a suspect.

Kitecyber | Data & Gen AI Security | November 2026

A developer runs codex in a repository and asks it to fix a failing build. A finance lead opens the ChatGPT desktop app and asks Work to compare three spreadsheets on her laptop, then let Computer Use update a report in Excel. An engineer connects Codex to an internal MCP server and a GitHub plugin. In each case, an OpenAI agent is reading local files, running commands or operating applications with that employee’s access.

That is exactly what makes these tools productive. It is also why securing OpenAI usage is no longer just a question of which websites employees can reach. This guide explains where the risk sits across Codex, the ChatGPT desktop app and ChatGPT itself, walks through ten controls security teams can put in place, and closes with the workspace policies every ChatGPT deployment should configure.

Key takeaways

Why OpenAI’s agents change the risk model

ChatGPT started as a browser tab. A URL filter covered most usage. OpenAI’s current products work very differently.
The product line moves fast. ChatGPT agent mode has been retired in favor of Work, and the ChatGPT Atlas browser has been retired and no longer receives updates. Retired software that stays installed on laptops is an unpatched risk in its own right.

Shared responsibility

OpenAI provides

Your organization decides

Model safeguards, product security, sandboxing and patches

Which accounts, plans and workspaces employees may use

Business data commitments (Business, Enterprise and Edu data is not used for training by default)

What data employees may put into prompts, files and agent tasks

Admin controls: SSO, SCIM, RBAC, Agent Security policies, requirements.toml, feature flags

Whether those controls are deployed, tested and enforced on every device

Compliance API, audit logs and OpenTelemetry export

Who collects and monitors them, and how incidents are handled

Training commitments govern what happens after data arrives. They do not stop sensitive data from being sent in the first place.

What has already gone wrong

These incidents show realistic failure modes, most of them triggered by ordinary work.
The pattern: untrusted content plus an agent with the user’s access. The attacker rarely needs to compromise OpenAI itself.

Six surfaces where data can leave through OpenAI tools

10 controls to secure Codex and OpenAI agents on employee devices

1. Build an inventory of OpenAI agents, accounts and add-ons

Start with what is actually installed and signed in:
Device management can report installed apps. Configuration files reveal the rest. Repeat the inventory regularly, because Codex and the desktop app update often and new capabilities arrive behind feature flags.

Priority: Immediate

2. Pin usage to your company workspace and block personal accounts

Personal accounts sit outside SSO, retention settings and the Compliance API. Provide a sanctioned workspace first, then restrict the alternatives.
Header injection only works where traffic passes through your proxy, so remote and off-network devices need an endpoint-based path.

Priority: Immediate

3. Deploy admin-enforced requirements for Codex

Codex separates requirements, which users cannot override, from managed defaults, which set starting values users can change. Requirements can be delivered three ways, in this order of precedence:
A reasonable starting baseline:
# requirements.toml
allowed_approval_policies = ["on-request"]
allowed_sandbox_modes     = ["read-only", "workspace-write"]
allowed_web_search_modes  = ["cached"]
allow_managed_hooks_only  = true

[permissions.filesystem]
# adjust paths for your OS and directory layout
deny_read = ["https://kitecyber.com/Users/*/.ssh", "https://kitecyber.com/Users/*/.aws", "./**/.env"]

[rules]
prefix_rules = [
  { pattern = [{ token = "git" }, { any_of = ["push", "commit"] }],
    decision = "prompt", justification = "Review before changing remote history." },
]

What this does:

Test on representative devices first. Some keys require recent Codex versions (permission-profile allowlists need 0.138.0 or later), OpenAI has retired the untrusted approval policy, and on native Windows managed deny_read applies to Codex’s direct file tools but not to shell subprocesses. Also note that Codex local is enabled by default for new ChatGPT Enterprise workspaces, so turn it on deliberately for the groups that need it.
Priority: High

4. Keep the sandbox on, the network closed and credentials protected

The sandbox is the boundary that still holds when an agent is tricked.

Priority: High

5. Treat repositories, instruction files and add-ons as untrusted input

Every major Codex CVE in the last year started with content inside a repository.

Priority: High

6. Govern MCP servers, apps and plugins with least privilege

Priority: High

7. Configure the ChatGPT desktop app’s local agents deliberately

Work Local, Computer Use and Browser Use are powerful, and each has its own control.
Priority: Medium–High

8. Control what sensitive data reaches the prompt

No sandbox decides whether a particular paste, upload or agent file read is appropriate. OpenAI’s own Work security guidance tells customers to “apply your organization’s endpoint, file-access, proxy, and data-loss-prevention controls” and to confirm whether those controls can stop sensitive information from entering a task before it is processed.

Priority: High

9. Monitor activity and prepare an incident playbook

Priority: Medium–High

10. Write an AI acceptable-use policy and train people on it

Keep it short and specific:
Map it to frameworks you already report against, such as SOC 2, ISO 27001, HIPAA or GDPR, so AI controls appear in existing audits.
Priority: Foundational

Securing everyday ChatGPT use: the workspace policies to configure

Most employees will use ChatGPT for chat, documents and analysis rather than coding agents. These are the settings to review in the ChatGPT Admin Console before broad rollout. Availability differs between Business and Enterprise, and some controls depend on rollout.

Area

Policy to configure

Why it matters

Identity

Verify domains, enforce SSO, provision with SCIM, turn off automatic account creation, set a least-privilege default role

Access follows your identity lifecycle and leavers lose access automatically

Account control

Workspace Blocking header (ChatGPT-Allowed-Workspace-Id) on your proxy; IP allowlisting for workspace and Compliance API access

Stops sign-in to personal and unapproved workspaces on managed networks

Retention and keys

Set the workspace retention period; consider Enterprise Key Management and data residency where required

Limits how long prompts, files and outputs persist

Features (RBAC)

Decide per role on models, GPT creation and sharing, projects, memory and improved memory, Work Local, Work Cloud, Codex local and access tokens

Gives powerful features only to the groups that need them

Sharing

Turn off Share chats and scheduled tasks where not needed (Enterprise and Edu). Business cannot disable shared links workspace-wide

Workspace links are restricted to members, but conversations can still spread internally

Apps and plugins

Start with a narrow app list, restrict write actions, review OAuth and action domains regularly

Connectors are the main path to bulk data and to prompt injection

Prompt-injection risk

Make Lockdown Mode available to high-risk users (executives, finance, legal)

Limits web and external-service tools that can be abused for exfiltration. It does not apply to Codex

Audit

Connect the Compliance API to your SIEM or eDiscovery tool and name who reviews it

Gives you evidence for investigations and audits

Mobile

Use ChatGPT for Intune for managed mobile access where available

Brings phones under the same identity and app protection policies

Two practical notes. First, workspace settings govern only your workspace. An employee on a personal account outside your network is outside all of them, which is why account control (section 2) and endpoint controls matter. Second, tell employees what is monitored and why. Clear rules and in-the-moment guidance change behavior better than surprise blocks.

Quick-start checklist

#

Control

Native option

Priority

1

Inventory agents, accounts, configs and retired installs

MDM app inventory, config file review

Immediate

2

Company workspace only

SSO/SCIM, ChatGPT-Allowed-Workspace-Id, forced_chatgpt_workspace_id, allowed_chatgpt_workspaces

Immediate

3

Admin-enforced Codex requirements

Agent Security, macOS MDM, requirements.toml

High

4

Sandbox, network and credential protection

workspace-write, deny_read, [experimental_network], keyring storage

High

5

Untrusted repos, instructions and add-ons

Version floors, trust_level, allow_managed_hooks_only

High

6

MCP, app and plugin governance

[mcp_servers] allowlist, Admin Console Plugins, RBAC

High

7

Desktop agent configuration

computer_use, browser_use, app rules, allow_appshots

Medium–High

8

Data-aware controls on paste, upload and file access

Endpoint DLP and classification (third party)

High

9

Monitoring and incident response

OpenTelemetry, Compliance API

Medium–High

10

Policy and training

Internal

Foundational

Where native controls stop

OpenAI’s controls are the right foundation, and every organization using Codex or ChatGPT should deploy them. It is still worth being clear about what they do not cover:
Closing those gaps means adding controls on the device itself that understand data, user, process and network context across every AI tool, not one vendor at a time.

Where Kitecyber fits

Kitecyber provides Gen AI and data security that runs on the endpoint, the layer where Codex, the ChatGPT desktop app and its local agents actually work. A single lightweight agent combines device posture, OS and process activity, user activity, network activity and on-device data classification across 80+ categories. That context lets security teams:

Kitecyber can run as SaaS, self-hosted or with your own keys, and typically goes live in about a day. It complements OpenAI’s native controls rather than replacing them.

Book a Kitecyber walkthrough at kitecyber.com to see Codex, ChatGPT and other AI activity, data context and policy on one endpoint view.

Frequently Asked Questions

It can be, when it is configured deliberately. Pin it to your workspace, deploy admin-enforced requirements, keep the sandbox in workspace-write or read-only, allowlist MCP servers and keep clients current. Most risk comes from permissive settings, untrusted repositories and the data users share.
OpenAI states that Business, Enterprise and Edu data, including Codex data, is not used to train its models by default. That governs what happens after data is sent. It does not stop sensitive data from being shared.
On Enterprise, have your proxy add the ChatGPT-Allowed-Workspace-Id header with your workspace IDs to requests to chatgpt.com. For Codex, enforce allowed_login_methods and allowed_chatgpt_workspaces through MDM or the system requirements.toml. Remote devices need an endpoint-based path, because header injection only applies to traffic through your proxy.
An admin-enforced policy file that users cannot override. It can restrict approval policies, sandbox modes, web search, hooks, MCP servers, file reads, command rules and desktop features such as Computer Use. Deliver it from the Admin Console, through macOS MDM, or as a system file.
Add the paths to deny_read under [permissions.filesystem] in requirements.toml, and keep the sandbox enabled. On native Windows, managed deny_read covers Codex’s direct file tools but not shell subprocesses, so use the Windows sandbox or WSL2 and protect secrets at the OS level too
Yes. Set computer_use, browser_use, browser_use_external and in_app_browser to false in Agent Security or requirements.toml, or allow them only for specific groups and apps.
CVE-2025-61260 (project config could run an MCP command at startup), CVE-2025-59532 (sandbox working-directory escape), and CVE-2026-19590 through CVE-2026-19593 (repository Git settings or instructions could run programs without approval). All are fixed. Keep Codex CLI at 0.131.0 or later and Codex Desktop at 26.519 or later.

Ajay Gulati

Ajay Gulati is a passionate entrepreneur focused on bringing innovative products to market that solve real-world problems with high impact. He is highly skilled in building and leading effective software development teams, driving success through strong leadership and technical expertise. With deep knowledge across multiple domains, including virtualization, networking, storage, cloud environments, and on-premises systems, he excels in product development and troubleshooting. His experience spans global development environments, working across multiple geographies. As the co-founder of Kitecyber, he is dedicated to advancing AI-driven security solutions.

Scroll to Top