OpenAIOpenAI NewsMay 8, 2026, 12:30 PM

Running Codex safely at OpenAI

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Running Codex safely at OpenAI

Key Points

  • Sandboxing + approval gating with Auto-review
  • Managed network proxy and domain allow/deny lists
  • OpenTelemetry agent logs for auditing and triage

Summary

This post describes how OpenAI deploys Codex with engineering-friendly controls to keep coding agents productive while minimizing risk. The approach combines sandboxed execution, approval policies (including an Auto-review mode), managed network policies, enforced identity/credential handling, configurable command rules, centrally managed configurations, and agent-native telemetry (OpenTelemetry) to enable auditing and AI-assisted security triage.

Key Points

  • Sandboxing + approvals: define writable/readonly workspace roots and sandbox modes (read-only, workspace-write); require explicit approvals for actions outside the sandbox. Use auto_review to auto-approve routine, low-risk requests.
  • Network policies: use a managed proxy to allow expected destinations, block known bad domains, require approval for unfamiliar hosts, and restrict web fetches to cached content where appropriate.
  • Identity & credentials: store CLI and MCP OAuth credentials in the secure OS keyring, force login via ChatGPT, and pin usage to a specific enterprise ChatGPT workspace so actions are tied to workspace-level controls and compliance logs.
  • Command rules: implement prefix_rule-style policies to allow common, benign commands (e.g., read-only GitHub or kubectl inspection) while blocking or requiring approval for dangerous patterns.
  • Managed configs: enforce admin-controlled requirements across desktop, CLI, and IDE integrations; combine cloud-managed requirements, macOS managed preferences, and local requirement files for consistent baselines and phased rollouts.
  • Agent-native telemetry & audit trails: export user prompts, approval decisions, tool executions, MCP usage, and network allow/deny events via OpenTelemetry. Route logs to SIEM/compliance platforms and feed them into AI security triage for intent analysis and escalation.

Practical checklist for engineers

  • Define and enforce sandbox modes and writable roots for development workspaces.
  • Configure approval policy and enable auto_review for low-risk operations to reduce friction.
  • Deploy a managed network proxy: set allowed_domains, denied_domains, and restrict web fetches to cached modes where needed.
  • Pin authentication: store creds in OS keyring and require forced_chatgpt_workspace_id for enterprise auditing.
  • Create rule sets for common CLIs to allow safe inspection commands and require approval for destructive or networked commands.
  • Enable OpenTelemetry logs (log_user_prompt = true) and export to your SIEM for audit, monitoring, and integration with security triage agents.

Outcome

When combined, these controls let teams run Codex inside clear technical boundaries, move quickly on low-risk developer flows, and force explicit review on higher-risk actions—while preserving agent-aware telemetry for audit and incident investigation.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

OpenAIでCodexを安全に運用する

OpenAIでCodexを安全に運用する

Codexを実運用に組み込む際に、OpenAIが採用しているコントロール、境界、テレメトリの概要を示します。

AIシステムがより高機能になるにつれ、ユーザーに代わって動作するケースが増えています。コーディングエージェントはリポジトリの自律的なレビュー、コマンド実行、開発ツールとのやり取りを行えるようになり、これまで人間が直接行っていた作業を代替します。Codexでは、こうした機能を、安全に導入するために組織が必要とする管理手段と並行して設計しました。

セキュリティチームは、エージェントの動作を管理する方法、つまり何にアクセスできるか、人間の承認がいつ必要か、どのシステムとやり取りできるか、動作を説明するためのテレメトリがどのように存在するかを必要とします。

OpenAIでは、Codexを次の明確な目標のもとにデプロイしています:

  • エージェントを明確な技術的境界内に収める
  • 低リスクな操作は開発者が迅速に実行できるようにする
  • 高リスクな操作は明示的に停止させる

また、エージェントネイティブなテレメトリを保持して、エージェントが何をしたかを理解し、監査できるようにしています。実践的には、マネージドな設定、制約された実行、ネットワークポリシー、エージェントネイティブなログを意味します。

Codexの動作を制御する

Codexをデプロイする際のシンプルな原則は、境界内で生産的に動作させ、日常的・低リスクの操作は摩擦なく実行させ、高リスクの操作では人の確認を求める、というものです。

サンドボックスと承認

サンドボックスと承認は連携して動作します。サンドボックスは技術的な実行境界を定義します(どこに書き込み可能か、ネットワークに到達できるか、保護されたパスはどれか等)。承認ポリシーは、サンドボックスの外で何かを行う必要がある場合など、いつCodexが実行前に許可を求めるべきかを定めます。ユーザーは個別のアクションを1回だけ承認するか、そのセッションでその種類のアクションを承認するようにできます。

ルーチンの承認要求に対しては、Auto-reviewモードを使っています。これはオンにすると、ユーザーが中断して承認する頻度を減らすために、ある種のリクエストを自動承認する機能です。Codexは実行予定のアクションと最近のコンテキストをauto-approvalサブエージェントに送信し、低リスクのアクションはユーザーを中断する代わりに自動承認できます。これにより日常的な作業は進めつつ、高リスクまたは意図しない結果があり得るアクションは停止させます。

# config.toml

# Turn on auto_review
approvals_reviewer = "auto_review"
# Add known development directories to the sandbox automatically
sandbox_workspace_write.writable_roots = ["~/development"]

# requirements.toml

# Require Codex to operate inside the sandbox
allowed_sandbox_modes = ["read-only", "workspace-write"]

ネットワークアクセス

Codexに対して無制限のアウトバウンドアクセスを与えてはいません。マネージドされたネットワークポリシーは、想定される宛先を許可し、Codexに触れてほしくない宛先をブロックし、不慣れなドメインには承認を要求します。これにより、Codexは一般的で既知の正しいワークフローを完了できる一方で、広範なネットワークアクセスを与えずに済みます。

# requirements.toml

# Ensure web fetch only comes from OpenAI's cache
allowed_web_search_modes = ["cached"]

[experimental_network]
# Turn on Network Proxy
enabled = true
# Allow Codex to interact with localhost
allow_local_binding = true
# Block all requests to this domain
denied_domains = ["pastebin.com"]
# Auto-allow requests to these domains
allowed_domains = ["login.microsoftonline.com", "*.openai.com"]

アイデンティティと認証情報

Codexの認証方法も管理しています。CLIやMCPのOAuth認証情報はOSのセキュアなキーリングに格納され、ログインはChatGPT経由に強制され、アクセスはChatGPTのエンタープライズワークスペースに紐づけられます。これにより、Codexの利用はワークスペースレベルのコントロールに結びつき、Codexの活動はChatGPT Compliance Logs Platformで参照できるようになります。

# config.toml

# Store CLI Auth Creds in OS Keychain
cli_auth_credentials_store = "keyring"
# Store MCP Creds in OS Keychain
mcp_oauth_credentials_store = "keyring"
# Require Auth via ChatGPT
forced_login_method = "chatgpt"
# Require Auth to Specific ChatGPT Workspace
forced_chatgpt_workspace_id = "<workspace-uuid>"

ルール

すべてのシェルコマンドを同等に安全扱いしないように、ルールを使用しています。日常的に使われる一般的で無害なコマンドはサンドボックス外でも承認なしで許可し、特定の危険なコマンドはブロックするか承認を要求できます。これにより、通常のエンジニアリング作業は迅速に進められ、サンドボックス外で実行してほしくないパターンはレビューを強制したりブロックしたりできます。

# default.rules

prefix_rule(
  pattern = ["gh", "pr", ["view", "list"]],
  decision = "allow",
  justification = "Allows read-only GitHub PR inspection via gh CLI.",
)
prefix_rule(
  pattern = ["kubectl", ["get", "describe", "logs"]],
  decision = "allow",
  justification = "Allows Kubernetes resource inspection for debugging.",
)

マネージド構成

この姿勢(posture)は、クラウド管理されたrequirements、macOSのマネージドプリファレンス、ローカルのrequirementsファイルの組み合わせで適用しています。Requirementsは管理者によって強制され、ユーザーはオーバーライドできません。macOSのマネージドプリファレンスとローカルのrequirementsファイルを使うことで、チームやユーザーグループ、環境ごとに異なる構成を試しつつ、一貫したベースラインを維持できます。これらの構成はデスクトップアプリ、CLI、IDE拡張などローカルのCodexサーフェス全体に適用されます。

エージェントネイティブなテレメトリと監査トレイル

コントロールは仕事の半分にすぎません。エージェントをデプロイしたあとは、セキュリティチームはこれらのエージェントが何を、なぜ行っているのかを可視化する必要があります。従来のセキュリティログはCodexがとったアクション(プロセスの起動、ファイルの変更、ネットワーク接続の試行など)を示すには有用ですが、なぜCodexがそれをしたのか、ユーザーの意図が何だったのかを説明するには不十分なことが多いです。

Codexはセキュリティチームによりエージェントに即した視点を提供できます。Codexはユーザープロンプト、ツール承認決定、ツールの実行結果、MCPサーバーの使用状況、ネットワークプロキシの許可/拒否イベントなど、さまざまなCodexイベントのOpenTelemetryログエクスポートをサポートします。Codexのアクティビティログは、OpenAI Compliance Platform(EnterpriseおよびEduの顧客向け)からも利用可能です。

# config.toml

[otel]
log_user_prompt = true
environment = "prod"

[otel.exporter.otlp-http]
endpoint = "http://localhost:14318/v1/logs"
protocol = "binary"

OpenAIでは、CodexログをAIによるセキュリティトリアージエージェントと併用しています。エンドポイントのアラートでCodexが異常な動作をしたと示された場合、エンドポイントセキュリティツールは疑わしいイベントが発生したことを知らせます。続いてCodexログが、ユーザーやエージェントの周辺の意図を説明する手がかりになります。

AIセキュリティトリアージエージェントは、オリジナルのリクエスト、ツール活動、承認決定、ツール結果、および関連するネットワークポリシーの決定やブロックを検査するためにCodexログを使用します。AIはその分析をセキュリティチームに提示し、期待されるエージェント動作、無害なミス、または本当にエスカレーションを要する活動を区別するのに役立ちます。

運用面でも同じテレメトリを利用しています。これらのログを用いて、社内の採用状況の変化、どのツールやMCPサーバーが使われているか、ネットワークサンドボックスがどれだけブロックやプロンプトを発しているか、どの部分でロールアウトの調整が必要かを把握します。これらのOpenTelemetryログはSIEMやコンプライアンス向けロギングシステムに集約可能です。

今後の展望

Codexのようなコーディングエージェントが開発ワークフローに統合されるにつれて、セキュリティチームはこの変化を管理するために専用のツールを必要とします。Codexは、コントロールサーフェス、構成管理、サンドボックス、詳細なエージェント対応テレメトリを提供し、安全な導入を支援します。これらの機能が整っていれば、セキュリティチームは開発者の生産性とエンタープライズセキュリティに必要な可視性・制御を両立させつつ、より自信を持ってCodexを有効化できます。

詳細なCodexの設定方法は「More information on configuring Codex」(新しいウィンドウで開く)で、Compliance APIについては「the Compliance API」(新しいウィンドウで開く)に情報があります。


2026 Codex — Author: OpenAI