27 of 41 checked automatically

How to use it

  • Once at setup, work through sections A to H.
  • Fix every P1 item before doing any work on company code. P2 items close important gaps; P3 items are good practice.
  • Items with an audit check ID are verified automatically by the Codex Security Audit. Re-run it monthly and after every Codex upgrade. Items without one are confirmed by hand.
  • Keep the completed checklist with your saved audit report as your assessment record.

A. Installation and identity

#CheckPriorityAudit check
A1The Codex CLI is 0.146.0 or later (the Plugin4Shell fix), and the desktop app and IDE extension are current.P1I01
A2Work code runs under a ChatGPT work sign-in; organisations pin it with forced_login_method and forced_chatgpt_workspace_id.P1manual
A3Codex and MCP credentials are stored in the OS keyring (cli_auth_credentials_store and mcp_oauth_credentials_store set to "keyring").P2C07
A4Advanced Account Security is on where eligible, with a backup key stored safely.P3manual
A5No config, profile or script sets the retired approval_policy = "untrusted".P1C03

B. Sandbox and approvals

#CheckPriorityAudit check
B1A permission profile that extends :workspace or :read-only is the default; full access is never the default.P1C02
B2approval_policy = "on-request"; never "never" on a machine with credentials.P1C03
B3--yolo and --dangerously-bypass-approvals-and-sandbox are used only in disposable containers, and no alias adds them.P1S01
B4Auto-review is not treated as a security boundary for sensitive work.P2C09
B5allow_login_shell = false, so commands don't load shell startup files and their secrets.P3C08
B6Native Windows uses the Windows sandbox in "elevated" mode.P2manual

C. Secrets and network

#CheckPriorityAudit check
C1The permission profile denies **/.env*, ~/.ssh, ~/.aws and other credential folders.P1C06
C2Command network access is off by default; when needed, network_proxy is on with an allow list and no wildcards, paste or webhook sites.P1C04
C3web_search is "cached" or "disabled", never "live" for routine work.P2C05
C4On native Windows, web_search = "disabled".P1C05
C5No secrets in MCP env blocks; env_vars or bearer_token_env_var pass them instead.P2C14
C6No production credentials in the environment Codex runs in.P1manual

D. Command rules and hooks

#CheckPriorityAudit check
D1~/.codex/rules/default.rules asks before git push and forbids recursive deletes, tested with codex execpolicy check.P2R01
D2No allow rules for shells, rm, sudo, network or infrastructure tools; every rule states its decision.P1R02
D3Every hook and notify command was reviewed before trusting it, none downloads remote code, and --dangerously-bypass-hook-trust is never used.P1C12, C13

E. Extensions: MCP servers, plugins and skills

#CheckPriorityAudit check
E1Every MCP server is approved, pinned to a version, and limited with enabled_tools.P1M01, M03
E2Servers that read content outsiders write (errors, tickets, chat, email) have read-only scopes and default_tools_approval_mode = "prompt".P2M02
E3skill_mcp_dependency_install = false, so skills can't install MCP servers on their own.P2C10
E4[memories] disable_on_external_context = true.P3C11

F. Repositories

#CheckPriorityAudit check
F1Before trusting a project: .codex/config.toml, .codex/hooks.json, .codex/rules/ and AGENTS.md are reviewed.P1P01, P02, P03, P05, P06, P07
F2The project .env sets no CODEX_* variables.P1P04
F3Repositories that arrive with their own .git/config (archives, shared folders) are checked for core.hooksPath, core.fsmonitor and filter drivers.P2P12
F4Symlinks are listed and none points at .codex/, AGENTS.md or a dotfile.P1P11
F5Untrusted code is opened only in a container or Codex cloud.P1manual
F6.env files are gitignored.P2P10

G. Codex cloud and integrations

#CheckPriorityAudit check
G1Cloud environments keep agent internet access off, or limited to package managers or named domains; never "All (unrestricted)".P1manual
G2Setup scripts are reviewed and environments hold only the secrets the task needs.P2manual
G3The GitHub connection covers only the repositories Codex needs, and branch protection stops it merging.P1manual
G4Code review and task triggers run only on repositories and channels without untrusted contributors.P2manual
G5Connectors that bring in outside content (email, files, web) are enabled only where the task needs them.P2manual

H. Working habits and endpoint

#CheckPriorityAudit check
H1Instruction-like text in issues, pull requests, web pages and tool output is read by a person before Codex acts on it.P1manual
H2One workspace per session, and git worktrees for parallel or background work.P2manual
H3AGENTS.md states security rules: secrets from environment variables, no eval, ask before external calls.P3P09
H4Secret scanning, SAST and SCA run on every pull request, and a person reviews every AI-authored change.P1manual
H5On Windows, C:\ProgramData\OpenAI\Codex exists and only administrators can write it.P1W01
H6Suspicious agent behaviour is reported to the security team the same day.P2manual

Sources

Informational only, with no guarantee of a vulnerability-free setup, so test every configuration in your own environment. AISecurityLabs.org is independent and not affiliated with OpenAI. Setting names change as Codex evolves, so check them against the configuration reference for your version.