This benchmark defines a prescriptive security baseline for OpenAI Codex when it runs locally through the ChatGPT desktop app, Codex CLI or IDE extension, and when work is delegated to Codex cloud. It is written for security engineering, platform engineering, endpoint management, internal audit and development teams that need measurable controls around an agent that can read code, execute commands, use networks and invoke external tools.
Independent publication: this is a CIS-style benchmark, not an official CIS Benchmark and not an OpenAI certification. Product behaviour, CLI flags and configuration keys were checked against official OpenAI documentation and Codex CLI 0.147.0 on 15 August 2026.
How this benchmark uses CIS guidance
CIS Controls v8.1 remains the governing structure: inventory, data protection, secure configuration, identity, access control, vulnerability management, audit logging, network defence, supplier management, application security and incident response. The latest CIS Controls v8.1.2 AI Security Guidance Workbook, alongside the earlier AI and LLM, AI Agent and MCP Companion Guides, extends that structure to context integrity, prompt injection, tool misuse, excessive autonomy, non-human identities, agent supply chains and auditable actions. This benchmark turns those outcomes into Codex-specific settings and evidence.
The CIS implementation groups and this benchmark’s profiles are related but not identical. Level 1 is the minimum Codex configuration for ordinary development. Level 2 adds centrally enforced requirements for sensitive code, production access, regulated data, privileged repositories and managed fleets. Level 2 includes every Level 1 control. Automated means the pass or fail result can be determined from configuration and machine evidence without assessor judgment. A control is marked Manual when approval, provenance, appropriateness or an operator exercise must be assessed, even if automation supplies part of the evidence.
Traceability is outcome-based rather than a claim of one-to-one CIS conformance. Primary mappings include Safeguards 1.1 and 2.1 for asset and software inventory; 3.3 for data access; 4.1 for secure configuration; 5.1 and 6.1 for account inventory and access granting; 8.1 for audit-log management; 12.2 for secure network architecture; 15.1 for service-provider inventory; 16.1 for secure development; and 17.1 for incident handling. Each organisation must map these controls to its applicable Implementation Group, assets, legal obligations and accepted risk.
- Pass: every audit step is satisfied and the evidence identifies the client, version, device or cloud environment, user or service identity, policy source and assessment time.
- Fail: any required step is not satisfied, a security-sensitive value is merely recommended rather than enforced, or a lower-precedence setting cannot be proven effective.
- Not applicable: use only when the capability is technically disabled—for example MCP, plugins or Codex cloud. Record the disabling control and compensating boundary.
- Exception: record the owner, business justification, affected assets, expiry, compensating controls and explicit security approval.
Reference architecture
- 01
Workspace identity and managed requirements establish non-overridable policy
- 02
Project trust decides whether repository-supplied .codex configuration loads; AGENTS.md remains a separate instruction surface
- 03
Permission profile or sandbox bounds filesystem and command execution
- 04
Approval policy governs attempts to cross the boundary
- 05
Network, MCP, apps, plugins and Computer Use have separate least-privilege gates
- 06
Hooks, OpenTelemetry and enterprise audit evidence support detection and response
Level 1 — minimum baseline
Ensure Codex starts in a dedicated, version-controlled workspace
Description
Codex shall start at the root of the intended repository or an isolated task workspace. It shall not start from the user home directory, filesystem root, a shared parent containing unrelated repositories, or a directory containing personal data.
Rationale
The working root determines the files placed in context and the default write boundary. An unnecessarily broad root increases disclosure and modification scope. CIS Controls 1, 3 and 4 require accurate asset scope, data protection and secure configuration.
Impact
Cross-repository work requires a deliberate additional root or a purpose-built parent workspace. Developers may need separate chats for unrelated repositories.
Default value
Codex uses the selected working directory; the operator chooses its scope.
Audit
- Run pwd and git rev-parse --show-toplevel; confirm the active root is the intended repository.
- Run /status and inspect any --add-dir arguments. Confirm every writable root is required and contains no unrelated code, credentials or personal files.
- Confirm temporary task workspaces are removed or retained according to the repository’s data-handling policy.
Remediation
- Exit Codex, change to the repository root and begin a new chat.
- Remove unnecessary --add-dir grants. For multi-repository work, create an isolated parent containing only the required repositories.
Ensure repository trust is explicit and reviewed
Description
A repository shall be marked trusted only after its ownership and project-scoped .codex configuration, AGENTS.md instructions, hooks, rules, skills and MCP definitions have been reviewed. Unknown or third-party repositories shall remain untrusted or run in an isolated disposable environment. Untrusted status shall not be treated as disabling AGENTS.md.
Rationale
Codex skips project .codex configuration layers, including project hooks and rules, for projects marked untrusted. AGENTS.md is discovered as a separate instruction surface and is read before work; project trust is not documented as a switch that suppresses it. Both boundaries therefore need review.
Impact
Untrusted projects cannot contribute project-local .codex configuration, hooks or rules. Repository instructions may still influence the agent, so hostile or unknown code still requires isolation and cautious tool permissions.
Default value
Untrusted projects skip project-scoped .codex layers; trust is an explicit local decision.
Audit
- Inspect .codex/, AGENTS.md and referenced scripts before accepting trust.
- Review the effective projects.<path>.trust_level entry and confirm unknown repositories are untrusted.
- Verify the repository remote, owner and checkout provenance.
Remediation
- Set the project trust level to untrusted, remove unexpected project configuration and reopen Codex.
- Use an ephemeral VM or container for adversarial code review where repository trust cannot be established.
Ensure workspace-write sandboxing and on-request approvals are explicit
Description
Interactive development sessions shall use sandbox_mode = "workspace-write" with approval_policy = "on-request". Review-only work shall use read-only. danger-full-access and --dangerously-bypass-approvals-and-sandbox shall not be used on developer endpoints.
Rationale
Sandboxing determines what commands can do technically; approvals determine when Codex may ask to cross that boundary. Either control alone is insufficient. Explicit values prevent a launch preset or later default from silently widening authority.
Impact
Codex will request approval for operations outside the workspace or blocked network activity. Some developer workflows need narrowly scoped changes rather than unrestricted execution.
Default value
Version-controlled folders are normally recommended workspace-write with on-request approvals; non-version-controlled folders may start read-only.
Audit
- Run codex --version and /status; capture the effective sandbox and approval policy.
- Inspect config.toml, profile files, launch aliases and IDE settings for danger-full-access, approval_policy = "never", --yolo or bypass flags.
- Attempt a harmless write outside the workspace and confirm it does not execute without approval.
Remediation
- Set sandbox_mode = "workspace-write" and approval_policy = "on-request" in the appropriate config layer.
- Use /permissions to switch review tasks to read-only. Move truly unattended work to an externally isolated runner covered by control 2.5.
approval_policy = "on-request"
sandbox_mode = "workspace-write"
web_search = "cached"
[sandbox_workspace_write]
network_access = false
exclude_slash_tmp = true
exclude_tmpdir_env_var = true
[shell_environment_policy]
inherit = "core"
ignore_default_excludes = false
[shell_environment_policy.filters]
"AWS_*" = "exclude"
"AZURE_*" = "exclude"
"GITHUB_*" = "exclude"
"GOOGLE_*" = "exclude"
"*_TOKEN" = "exclude"
"*_SECRET" = "exclude"This is the core local sandbox excerpt, not evidence that every Level 1 control is satisfied: command rules, MCP and extension inventory, project trust and transcript retention require separate configuration or assessment. The stable sandbox configuration above is intentionally separate from the beta permission-profile configuration later in this benchmark. OpenAI states that default_permissions/[permissions] and sandbox_mode/sandbox_workspace_write do not compose. Do not put both approaches in the same effective configuration.
Ensure command network access is disabled by default
Description
Commands spawned by Codex shall have network access disabled unless the task requires named destinations. Enabling web search, MCP, apps, a browser or Codex cloud shall be assessed separately because the command sandbox network policy does not govern those surfaces.
Rationale
Outbound access converts a compromised or prompt-injected agent into an exfiltration and payload-retrieval path. The CIS AI guidance treats external tools and data paths as explicit agent attack surfaces.
Impact
Package installation, remote APIs and network tests fail until an approved workflow or scoped exception is used.
Default value
The local workspace-write sandbox has command network access off by default.
Audit
- Confirm sandbox_workspace_write.network_access is false or absent under workspace-write.
- From a test repository, attempt a harmless request to an unapproved public endpoint and confirm it is blocked.
- Inventory web search, MCP, apps, Browser, Computer Use and Codex cloud separately; do not infer their state from the shell test.
Remediation
- Set sandbox_workspace_write.network_access = false.
- When commands require network access, use an approved domain policy and activate the network proxy; a domain table without an active proxy does not constrain direct traffic.
Ensure secrets are excluded from the workspace and command environment
Description
Codex shall not receive long-lived production credentials, personal tokens, signing material or unrelated secrets through files, prompts, environment variables, MCP configuration, AGENTS.md or command output. Shell inheritance shall be reduced and secret-like variables explicitly filtered.
Rationale
An agent cannot disclose a credential it cannot access. Local sandboxes primarily control writes and networking; they do not make every readable file safe. Environment inheritance is a frequent path by which a coding task gains unrelated cloud authority.
Impact
Builds requiring authentication must use short-lived, repository- and task-scoped credentials delivered only to the process that needs them.
Default value
Codex has documented default secret-name exclusions, but ignore_default_excludes defaults to true; set it to false to apply them.
Audit
- Review repository files and history for .env files, keys and tokens; use secret scanning without printing secret values.
- Inspect shell_environment_policy. Confirm ignore_default_excludes is false and organisation-specific credential patterns are excluded.
- Review MCP env, env_vars, bearer_token_env_var and env_http_headers entries for least-privilege credential delivery.
Remediation
- Remove secrets from the repository and agent environment; rotate anything exposed to a prompt, transcript, command output or commit.
- Use workload identity, SSO or a broker that issues short-lived credentials with audience, repository and action scope.
Ensure live web search is disabled for ordinary coding sessions
Description
web_search shall be cached/indexed or disabled for ordinary development. Live search shall be enabled only for tasks with an explicit research need and a threat model for hostile page content.
Rationale
Live content can contain indirect prompt injection. Cached or indexed results reduce arbitrary live-page exposure but remain untrusted and must not be allowed to authorize actions.
Impact
Very recent information may be unavailable until the operator deliberately enables live search or supplies a reviewed source.
Default value
Codex normally uses cached search; full-access modes can default to live results.
Audit
- Inspect the effective web_search value and launch arguments; confirm --search is not added globally.
- Confirm operators understand that web search domain filters do not restrict MCP, apps, browsers or spawned command traffic.
Remediation
- Set web_search = "cached" or "disabled". Use a task-specific override for approved research and return to the baseline afterwards.
Ensure command rules are narrow, tested and deny-first
Description
Rules that permit commands outside the sandbox shall use exact, minimal prefixes and inline match/not_match tests. Destructive version-control, publishing, deployment, identity and credential commands shall be forbidden or require approval. Broad shell prefixes shall not be approved.
Rationale
A remembered prefix rule is durable authority. Over-broad patterns can allow unsafe arguments or subcommands after one apparently benign approval. Deterministic denial is stronger than a natural-language instruction.
Impact
Developers will receive approval prompts for new commands and must maintain rules as tooling changes.
Default value
No organisation-specific command rules exist unless configured; Smart approvals may propose a prefix rule for operator review.
Audit
- Review every active rules/*.rules file from managed, user and trusted project layers.
- Run codex execpolicy check --pretty against positive and negative command examples.
- Reject rules for generic shells, interpreters or wrappers unless the complete invocation remains constrained.
Remediation
- Replace broad rules with exact argument prefixes, justification and match/not_match tests.
- Remove stale user rules and put non-negotiable forbidden rules in managed requirements.
Ensure MCP servers and tools are explicitly approved
Description
MCP shall be disabled when not required. Each enabled server shall have an approved owner, identity, transport, version, authentication method, scopes and tool allowlist. Side-effecting tools shall use prompt or writes approval mode rather than auto.
Rationale
MCP servers provide both instructions and executable capabilities. STDIO servers run local code; HTTP servers receive requests and credentials. The CIS MCP Companion Guide treats these connections as identity, access-control, logging and application-security boundaries.
Impact
Developers cannot connect arbitrary servers or expose every tool from an approved server. Integration onboarding requires review.
Default value
Users can configure MCP servers unless managed requirements restrict the approved name and identity.
Audit
- Run codex mcp list and /mcp; reconcile every server to the approved inventory.
- Inspect command, args, cwd, URL, env, env_vars, headers, scopes, enabled_tools, disabled_tools and per-tool approval modes.
- Confirm packages are version-pinned or integrity-controlled and static secrets are not stored in config.toml.
Remediation
- Disable unknown servers, restrict enabled_tools, set default_tools_approval_mode = "writes" or "prompt", and use per-tool overrides.
- Prefer OAuth or environment-sourced short-lived tokens to literal headers. Revoke credentials exposed to an unapproved server.
Ensure plugins, skills, hooks and AGENTS.md are treated as executable supply chain
Description
Repository and user extensions shall be reviewed before enablement. Hook commands, plugin marketplaces, skill scripts and agent instructions shall have a known owner, approved source, integrity or version record and removal path.
Rationale
These artefacts can add instructions, run code, introduce MCP servers or influence approvals. A repository instruction file is not code in syntax, but it can still steer a capable agent toward consequential tool use.
Impact
Unreviewed convenience extensions are unavailable. Teams need a lightweight intake and emergency-revocation process.
Default value
Customization is available unless administrators constrain it; project layers load only for trusted projects.
Audit
- Inventory project, user, plugin and managed hooks; enabled skills; installed plugins; marketplace sources; AGENTS.md files and plugin-bundled MCP servers.
- Confirm hook trust is persisted only after review and --dangerously-bypass-hook-trust is absent from normal launch paths.
- Verify extension owners, source repositories, pinned refs or versions and last review dates.
Remediation
- Disable unknown extensions and rotate credentials available to them.
- Move approved code to a controlled source, pin versions, protect review ownership and document emergency disablement.
Ensure local transcripts and logs follow data-retention policy
Description
Session history, local logs, screenshots, tool output and generated artefacts shall be classified, access-controlled and retained only as long as required. history.persistence shall be set to none where saving complete transcripts is not approved.
Rationale
Agent transcripts can contain source code, secrets, personal data, vulnerability details and command output. The history file creates a durable secondary copy outside the repository’s normal controls.
Impact
Disabling history prevents normal session resumption and reduces forensic context. Organisations must balance data minimisation with investigation needs.
Default value
Codex can save transcripts to history.jsonl unless persistence is disabled.
Audit
- Inspect history.persistence, history.max_bytes and the permissions and retention of the configured state and log directories.
- Sample records using synthetic data and confirm redaction, endpoint backup and deletion behaviour match policy.
Remediation
- Set [history] persistence = "none" for restricted workloads, or cap and protect saved history where retention is approved.
- Do not place secrets in prompts. Remove and rotate exposed values rather than relying only on transcript deletion.
Level 2 — managed and sensitive environments
Ensure security policy is enforced with requirements.toml
Description
Enterprise deployments shall enforce approval, permission, web-search, feature, hook, MCP, marketplace and update constraints through requirements.toml delivered by a protected system or cloud-managed policy. Managed defaults alone shall not be counted as enforcement. Authentication method, ChatGPT workspace identity, approved model provider or catalogue and non-human task identities shall also have named owners and protected configuration appropriate to the deployment.
Rationale
User and project configuration can be changed. OpenAI distinguishes non-overridable requirements from managed defaults that users may change until the next restart, and project-local configuration cannot set model-provider or telemetry routing. CIS secure-configuration, account-inventory and access-granting outcomes require an enforceable source of truth and attributable human or workload identities.
Impact
A policy defect can affect the fleet. Requirements need change control, staged rollout, rollback and break-glass governance.
Default value
No administrator-enforced requirements exist unless an enterprise deploys them.
Audit
- Identify every requirements source and precedence: system, cloud bundle, legacy managed config and macOS MDM.
- Attempt a conflicting CLI or config override and confirm Codex falls back to a compliant value and notifies the user.
- Verify all supported clients meet the minimum approved version and that update checks, authentication method, ChatGPT workspace, model provider or catalogue and unattended task identities match policy.
Remediation
- Deploy requirements.toml through protected endpoint management or cloud-managed configuration.
- Assign named policy owners, peer review, staged rollout and automatic version compliance checks. Restrict login and workspace identity in protected non-project configuration where applicable, and permit only approved model endpoints and catalogues.
Ensure Codex 0.138+ uses an allowlisted permission profile
Description
After every managed client is Codex 0.138.0 or later, administrators shall select an organisation-owned least-privilege profile with default_permissions and allow only explicitly approved profiles. :danger-full-access shall be omitted. Legacy sandbox_mode settings shall be removed from every effective config layer.
Rationale
Permission profiles combine filesystem and network rules in a named policy and allow future profiles to fail closed when omitted from the allowlist. OpenAI explicitly warns that profile settings do not compose with legacy sandbox settings.
Impact
Fleet rollout must be version-gated. Older clients ignore the managed profile allowlist and default, so mixed-version deployment can produce a weaker state.
Default value
Permission profiles are beta. Managed profile allowlists require Codex 0.138.0 or later.
Audit
- Prove every managed client is version 0.138.0 or later before enabling allowed_permission_profiles.
- Search all config layers and launch flags for sandbox_mode, [sandbox_workspace_write] and --sandbox; confirm none remains.
- Confirm the active profile denies sensitive globs and that omitted built-ins, including :danger-full-access, cannot be selected.
Remediation
- Upgrade the fleet, define a namespaced custom profile extending :workspace or :read-only, set it as default and allowlist only approved profiles.
- Keep allowed_sandbox_modes only as a temporary mixed-version constraint; remove legacy settings after migration.
allowed_approval_policies = ["on-request"]
allowed_approvals_reviewers = ["user"]
allowed_web_search_modes = ["cached"]
default_permissions = "org_workspace"
check_for_update_on_startup = true
allow_login_shell = false
allow_managed_hooks_only = true
allow_remote_control = false
allow_appshots = false
[allowed_permission_profiles]
":read-only" = true
org_workspace = true
# :danger-full-access is omitted and therefore denied.
[permissions.org_workspace]
description = "Workspace-only access; no general filesystem read."
extends = ":workspace"
[permissions.org_workspace.filesystem]
":root" = "deny"
":minimal" = "read"
":tmpdir" = "deny"
":slash_tmp" = "deny"
glob_scan_max_depth = 4
[permissions.org_workspace.filesystem.":workspace_roots"]
"**/*.env" = "deny"
"**/.env.*" = "deny"
"**/secrets/**" = "deny"
# An explicitly empty allowlist disables every MCP server.
[mcp_servers]
# Permit marketplace operations only from this administrator-owned directory.
[marketplaces]
restrict_to_allowed_sources = true
[marketplaces.allowed_sources.company_plugins]
source = "local"
path = "/opt/company/codex-plugins"
[features]
apps = false
browser_use = false
browser_use_external = false
browser_use_full_cdp_access = false
computer_use = false
in_app_browser = false
memories = false
multi_agent = false
plugin_sharing = false
plugins = false
remote_plugin = false
workspace_dependencies = falseThis Level 2 example deliberately disables all MCP servers and permits user-configured marketplace operations only from the example administrator-owned local directory, which must be replaced with a real protected source or removed with marketplace functionality. Where MCP is required, replace the empty mcp_servers table with an administrator-approved entry that matches both the configured name and exact command identity or URL. OpenAI documents marketplace restriction with one or more allowed sources; this benchmark does not assume that restrict_to_allowed_sources with no allowed_sources table is a supported deny-all pattern. OpenAI-managed marketplaces may remain available where the product recognises their reserved source and name, so retain features.plugins = false when the requirement is no plugin execution at all.
Ensure external capability surfaces are disabled or separately governed
Description
Apps, plugins, memories, Appshots, Browser Use, full CDP access, external browsers, Computer Use, in-app browser, remote control, multi-agent collaboration, bundled workspace dependencies and plugin sharing shall be disabled unless each capability has a documented owner, data boundary, approval model and monitoring control.
Rationale
Command-network policy does not govern these surfaces. Each can create its own path to external content, sensitive context or consequential action. A single shell allowlist is therefore not a complete agent egress policy.
Impact
Users lose capabilities until approved. Some workflows require separate managed groups or a purpose-built environment.
Default value
Omitted requirement keys leave normal product availability unconstrained.
Audit
- Inspect managed feature pins, allow_appshots and allow_remote_control. Confirm omitted keys are not mistakenly treated as disabled.
- Test the desktop app, CLI and IDE extension because supported features and policy coverage can differ by client and version.
- Reconcile enabled apps and plugins to workspace RBAC and connected-system permissions.
Remediation
- Pin unused features false in requirements.toml, set allow_appshots = false and set allow_remote_control = false.
- For approved capabilities, define least-privilege tool permissions, destination restrictions, data classification, user training and audit coverage.
Ensure MCP, marketplaces and hooks are centrally allowlisted
Description
requirements.toml shall allow MCP servers only when both name and identity match, restrict user-configured marketplaces to approved sources, and allow only managed hooks where hooks enforce security policy.
Rationale
Name-only approval is vulnerable to path, package or endpoint substitution. OpenAI’s managed MCP policy can match exact command identity or URL and disables unlisted or mismatched servers. Managed-only hooks prevent repository or user code from replacing the policy gate.
Impact
Administrators must maintain exact identities and update policy when approved versions or endpoints change. Existing marketplace configuration also requires inventory because source restrictions do not filter every already-configured runtime item.
Default value
Users may configure extensions and MCP unless managed requirements restrict them.
Audit
- Compare the effective mcp_servers allowlist to codex mcp list and verify both name and command/arguments or URL identity.
- Confirm marketplaces.restrict_to_allowed_sources is true and every allowed source is administrator-owned; Git sources shall use an exact repository and, where feasible, a pinned ref, while local sources shall use protected absolute paths.
- Confirm allow_managed_hooks_only is true, hook directories are protected and blocking hooks fail closed under negative tests.
Remediation
- Define exact MCP identities and remove unlisted servers. Restrict marketplace sources and uninstall already-present unapproved plugins.
- Move security hooks to an administrator-owned absolute directory and deploy their hashes or signed release through endpoint management.
Ensure unattended and cloud execution is isolated and fail-closed
Description
Customer-managed codex exec, CI jobs and automations shall run on single-job disposable runners with a reviewed image, isolated workspace, task-scoped identity, restricted egress, no host sockets, no unrelated mounts and an explicit artifact-export boundary. Codex cloud shall use an approved isolated environment with cache-aware setup, maintenance, secret, environment-variable and network policies; it shall not be represented as an immediately destroyed single-use runner.
Rationale
Unattended runs cannot rely on a human approval loop. Codex cloud separates networked setup from the normally offline agent phase and removes setup secrets before the agent phase, but environment variables persist for the full chat and container state can be cached for up to 12 hours. Business and Enterprise caches can be shared by users with access to the environment. Operators remain responsible for repository secrets, scripts, cache invalidation, internet allowlists and downstream credentials.
Impact
Customer-managed pipelines require immutable images, explicit dependency preparation, artefact transfer and a dedicated identity lifecycle. Codex cloud environments require a cache-aware threat model and reset procedure rather than an unsupported promise of immediate destruction.
Default value
Isolation differs by surface. Codex cloud supplies isolated containers; CI and local exec isolation remain the operator’s responsibility.
Audit
- Inspect jobs for --dangerously-bypass-approvals-and-sandbox, danger-full-access, host networking, privileged containers, Docker sockets, broad mounts and persistent credentials.
- For customer-managed runners, confirm one-job credentials, read-only base images, ephemeral workspaces, restricted destinations and teardown after export.
- For Codex cloud, verify setup and maintenance scripts, configured secrets, full-chat environment variables, cache sharing and invalidation, agent-phase internet access and domain allowlists separately.
Remediation
- Move unattended runs to a disposable VM or container with external isolation and no route to unrelated workloads.
- For customer-managed execution, issue short-lived branch- and repository-scoped credentials, export only reviewed artefacts, and destroy the runner and credentials after completion. For Codex cloud, minimise persistent environment variables, reset caches after sensitive changes and rely on the documented cloud isolation boundary.
Ensure Codex activity is logged, monitored and tested
Description
Managed deployments shall export approved Codex OpenTelemetry logs and traces, collect workspace audit events where available, and alert on policy conflicts, denied actions, approval changes, unapproved MCP or plugin activity, repeated network blocks and bypass attempts. Raw prompts shall not be exported unless explicitly approved.
Rationale
CIS Controls 8, 13 and 17 require audit evidence, monitoring and incident response. Agent incidents are multi-step; isolated command logs are insufficient without user, device, session, repository, tool, policy and outcome context.
Impact
Telemetry creates cost and privacy obligations. Detailed prompt or tool content may contain source code, secrets or personal data and needs a separate legal and data-governance decision.
Default value
Organisation-controlled OpenTelemetry export and SIEM alerts require configuration.
Audit
- Confirm OTLP exporters use authenticated TLS and events reach the approved collector with attributable resource metadata.
- Verify otel.log_user_prompt is false unless a documented exception approves raw prompt collection.
- Run synthetic detections for a blocked outbound request, prohibited profile selection, rejected command rule and unapproved MCP identity.
Remediation
- Configure an organisation-controlled OTLP endpoint, retention, RBAC, redaction and detection rules.
- Create a Codex incident playbook covering token revocation, MCP/plugin disablement, workspace quarantine, transcript preservation and managed-policy rollback.
Validation and reassessment requirements
A secure-looking TOML file is not evidence that Codex enforced it. First parse TOML with an independent parser, then run codex doctor --json so the deployed client loads its configuration and emits a redacted diagnostic report. Neither step proves enforcement: inspect /status and effective permissions and run positive and negative tests against filesystem, network, command-rule, MCP and feature boundaries. Test every supported operating system and client because platform enforcement and feature coverage differ. For permission profiles, prove the active profile and blocked behaviour on Codex 0.138.0 or later. Codex 0.147.0 accepts --strict-config with some commands, but codex --strict-config --version can exit successfully without loading or rejecting an unknown configuration key and shall not be used as validation evidence.
codex --version
codex doctor --json > codex-doctor-redacted.json
codex features list
codex mcp list
# Repeat --rules for every active managed, user and trusted-project rule file.
# Record the expected decision; process success or matchedRules=[] is not a pass.
codex execpolicy check --pretty --rules <active.rules> -- git status
codex execpolicy check --pretty --rules <active.rules> -- git push --force
# In an interactive test workspace also capture and verify:
# /status
# /permissions
# /mcp
# a harmless write outside the workspace (must be blocked or require approval)
# an unapproved network request (must be blocked)
# selection of a non-allowlisted profile, MCP server and feature (must fail)Reassess after every Codex update, managed-policy change, new MCP server, plugin, hook, skill, app or browser capability, authentication change, cloud-environment change and at least quarterly. Beta controls—including permission profiles and the managed network proxy—require explicit version and platform regression tests. Do not suppress unstable-feature warnings as a substitute for governance.
Minimum evidence package
Retain: Codex client and version; operating system; local or cloud surface; workspace identity; user or service identity; effective config layers and requirements sources; /status, /permissions and /mcp output; permission-profile or sandbox negative tests; command-rule test output; extension inventory; CI or cloud environment definition; telemetry delivery and alert tests; open exceptions; assessor; control owner; and assessment timestamp.
The standard in one sentence
Give Codex the smallest trusted workspace, filesystem, network, identity and tool surface required for the task; enforce those boundaries outside the model; assume every external instruction can be hostile; and retain evidence that prohibited actions really fail.
