OpenAI が Codex を安全に運用する方法について(6 分読了)
OpenAI は、コーディングエージェント「Codex」の安全な運用のために、サンドボックス化、承認ポリシー、自動レビュー機能、厳格なネットワーク制御を実装した具体的なアーキテクチャを公開しました。
キーポイント
境界内での生産性とリスク管理の両立
Codex は技術的な境界(サンドボックス)内で動作し、低リスクな日常タスクは摩擦なく実行できる一方、高リスクなアクションには明示的な承認を要求する設計です。
自動レビュー機能による効率化
「Auto-review mode」により、低リスクなリクエストをサブエージェントが自動的に承認し、ユーザーの作業中断を防ぎつつ、意図しない結果を伴う高リスクアクションは停止します。
厳格なネットワークおよび認証制御
外向きアクセスは制限され、既知のドメインのみが許可される一方、不明なドメインへの接続には承認が必要であり、認証情報は安全な OS キーリングに保存されます。
監査可能なテレメトリの維持
エージェント固有のログを保持することで、組織は Codex の行動を追跡・監査可能にし、コンプライアンスプラットフォームを通じて企業レベルの制御を維持します。
影響分析・編集コメントを表示
影響分析
この記事は、AI エージェントが自律的にコードを実行・管理する時代において、セキュリティチームが直面する最大の課題である「制御」と「生産性」のバランスをどう取るかという実用的な解答を提供しています。OpenAI が自社の運用で成功させた具体的なアーキテクチャ(サンドボックス、自動承認、ネットワーク制限)を公開することで、業界全体におけるエージェントベース AI の安全な導入基準を示す重要な指針となります。
編集コメント
エージェントが自律的に行動する際のセキュリティリスクは避けられない課題ですが、この記事で示された「境界内での自由」と「高リスク時の停止」のバランス設計は、実務導入における極めて参考になるベストプラクティスです。
AI システムの能力が高まるにつれ、それらはますますユーザーに代わって行動するようになります。コーディングエージェントは、リポジトリの自動レビューやコマンドの実行、開発ツールとの対話を自律的に行うことができます。これらは以前は人間の直接実行を必要としていたタスクです。
Codex においては、組織が安全に導入するために必要な制御機能とともにこれらの能力を設計しました。セキュリティチームには、エージェントの動作を管理する方法が必要です:アクセス可能な範囲、人間による承認が必要なタイミング、対話可能なシステム、およびその行動を説明するテレメトリ(監視データ)です。
OpenAI においては、Codex を以下の明確な目標をもって展開しています:エージェントを明確な技術的境界内に留めること、低リスクのアクションについては開発者が迅速に進められるようにすること、そして高リスクのアクションは明示的な承認を得ることです。また、エージェントが何を行ったかを理解し監査できるよう、ネイティブなテレメトリ(監視データ)も維持しています。具体的には、管理された設定、実行の制限、ネットワークポリシー、およびエージェント固有のログを適用しています。
Codex の動作制御
Codex を展開する際の基本的な原則は、限定された環境内で生産性を発揮し、日常的な低リスクのアクションは摩擦なく行い、高リスクのアクションについてはレビューのために停止させることです。
承認とサンドボックスは連携して機能します。サンドボックスは、Codex が書き込みを行える場所やネットワークにアクセスできるかどうか、どのパスが保護されるかなど、技術的な実行の境界を定義します。一方、承認ポリシーは、Codex がアクションを実行する際にユーザーに確認を求めるべきタイミング(例えば、サンドボックス外の作業が必要な場合など)を決定します。ユーザーは特定のアクションを一度だけ承認することも、そのセッション中に同種のアクションを一律で承認することも可能です。
日常的な承認リクエストについては、「自動レビューモード」を採用しています。この機能をオンにすると、特定の種類のリクエストが自動的に承認されるため、Codex のアクションに対してユーザーが停止して承認を行う頻度を減らすことができます。Codex は計画されたアクションと直近の文脈を自動承認サブエージェントへ送信し、低リスクのアクションについてはユーザーへの中断を避けて自動的に承認します。これにより、Codex は日常的な作業を継続しつつ、高リスクや予期せぬ結果を伴うアクションに対しては停止する仕組みとなっています。
Codex を実行する際、開放的な外部接続アクセスは行いません。管理されたネットワークポリシーでは、期待される宛先のみを許可し、Codex へ到達させたくない宛先をブロックするとともに、未知のドメインに対するアクセスには承認を要求します。これにより、Codex は一般的な既知のワークフローを完了できるようになりますが、広範なネットワークアクセス権限は付与されません。
また、Codex の認証方法も管理しています。CLI および MCP の OAuth 資格情報は、安全な OS キーリングに保存され、ログインは ChatGPT を経由して強制され、アクセスは当社の ChatGPT エンタープライズワークスペースに固定されます。これにより、Codex の利用がワークスペースレベルの制御と紐付けられ、エンタープライズワークスペースにおける Codex の活動が ChatGPT コンプライアンスログプラットフォームで確認可能になります。
Codex がすべてのシェルコマンドを同様に安全とはみなさないよう、ルールを設定しています。エンジニアが日常の開発で使用する一般的な無害なコマンドは、サンドボックス外でも承認なしに実行可能ですが、特定の危険なコマンドはブロックするか、承認を必須とします。これにより、Codex は通常のエンジニアリングタスクでは迅速に進めつつ、サンドボックス外で実行したくないパターンについてはレビューを強制したりブロックしたりすることが可能になります。
このポリシーは、クラウド管理による要件、macOS 管理設定(managed preferences)、およびローカル要件ファイルの組み合わせを通じて適用されます。要件とは、ユーザーが上書きできない管理者によって強制される制御です。macOS の管理設定とローカルの要件ファイルを使用することで、チーム、ユーザーグループ、または環境ごとに異なる構成をテストしつつ、一貫したベースラインを維持できます。これらの構成は、デスクトップアプリ、CLI、IDE 拡張機能を含むローカル Codex のすべてのインターフェースに適用されます。
エージェントネイティブなテレメトリと監査証跡
制御は仕事の半分です。エージェントが展開された後、セキュリティチームにはこれらのエージェントが何をしているのか、そしてなぜそうしているのかを可視化する必要があります。従来のセキュリティログは Codex によるアクションを確認する際に依然として有用ですが、主に「何が起きたか」——プロセスの開始、ファイルの変更、ネットワーク接続の試行など——に答えるものです。なぜ Codex がその行動をとったのか、あるいはユーザーの意図は何だったのかを防御側が自ら推測しなければならない状況が残されています。
Codex はセキュリティチームに対して、よりエージェントを意識した視点を提供できます。Codex は、ユーザーのプロンプト、ツールの承認決定、ツールの実行結果、MCP サーバーの使用状況、ネットワークプロキシによる許可または拒否イベントなど、さまざまな Codex イベントに対する OpenTelemetry ログエクスポートをサポートしています。また、Enterprise および Edu カスタマー向けには、OpenAI コンプライアンスプラットフォームを通じて Codex のアクティビティログも利用可能です。
OpenAI では、Codex ログを AI 駆動のセキュリティトライアージエージェントと共に使用しています。エンドポイントアラートで Codex が不審な行動をとったと示された場合、エンドポイントセキュリティツールは疑わしいイベントが発生したことを通知します。その後、Codex ログがユーザーおよびエージェントによる周囲の意図を説明する手助けをします。当社の AI セキュリティトライアージエージェントは、元の要求、ツールのアクティビティ、承認決定、ツールの結果、関連するネットワークポリシーの決定またはブロックなどを含めて Codex ログを検査します。この分析結果はセキュリティチームに提示され、期待されるエージェントの動作、悪意のないミスタイク、そして真にエスカレーションを要する活動を見分けるためのレビューが行われます。
私たちは、運用面でも同じテレメトリ操作を利用しています。これらのログを用いて、内部での採用状況の変化、使用されているツールや MCP サーバーの種類、ネットワークサンドボックスがブロックまたはプロンプトを表示する頻度、そしてまだ調整が必要な展開箇所の特定を行っています。これらの OpenTelemetry ログは、SIEM やコンプライアンス記録システムに集約して管理することが可能です。
今後の展望
Codex などのコーディングエージェントが開発ワークフローに統合されるにつれ、セキュリティチームにはこの変化を管理するために特別に設計されたツールが必要です。Codex は、安全な導入を保証するために必要な制御面、設定管理、サンドボックス機能、そして詳細なエージェント認識型のテレメトリを提供します。これらの機能を整えることで、セキュリティチームは開発者の生産性と、エンタープライズセキュリティに必要な可視性および制御のバランスを取りながら、より高い自信を持って Codex の利用を許可できるようになります。
Codex の設定に関する詳細情報は こちら(新しいウィンドウで開く)にて、Compliance API については こちら(新しいウィンドウで開く)でご確認ください。
原文を表示
As AI systems become more capable, they increasingly act on behalf of users. Coding agents can autonomously review repositories, run commands, and interact with development tools. These are tasks that previously required direct human execution.
With Codex, we’ve designed these capabilities alongside the controls organizations need for safe deployment. Security teams need ways to govern how agents operate: what they can access, when human approval is required, which systems they can interact with, and what telemetry exists to explain their behavior.
At OpenAI, we deploy Codex with a few clear goals: keep the agent inside clear technical boundaries, let developers move quickly on low-risk actions, and make higher-risk actions explicit. We also preserve agent-native telemetry so we can understand and audit what the agent did. In practice, that means managed configuration, constrained execution, network policies, and agent-native logs.
Controlling how Codex operates
We deploy Codex with a simple principle that it should be productive inside a bounded environment, low-risk everyday actions should be frictionless, and higher-risk actions should stop for review.
Approvals and sandboxing work together. The sandbox defines the technical execution boundary, including where Codex can write, whether it can reach the network, and which paths remain protected. Approval policy determines when Codex must ask to perform an action, such as when it needs to do something outside of the sandbox. Users can approve the action once, or approve that type of action for that session.
For routine approval requests, we are using Auto-review mode, which is a feature that, when turned on, auto-approves certain kinds of requests to reduce how often users have to stop and approve Codex actions. Codex sends the planned action and recent context to the auto-approval subagent, which can automatically approve low-risk actions instead of interrupting the user. That keeps Codex moving on routine work while still stopping on higher-risk or actions with unintended consequences.
We do not run Codex with open-ended outbound access. Our managed network policy allows expected destinations, blocks destinations we do not want Codex reaching, and requires approval for unfamiliar domains. That lets Codex complete common, known-good workflows without giving it broad network access.
We also manage how Codex authenticates. CLI and MCP OAuth credentials are stored in the secure OS keyring, login is forced through ChatGPT, and access is pinned to our ChatGPT enterprise workspace. That keeps Codex usage tied to our workspace-level controls and makes Codex activity available in the ChatGPT Compliance Logs Platform for our enterprise workspace.
We use rules so Codex does not treat every shell command as equally safe. Common benign commands that engineers use in day-to-day development are allowed without approval outside of the sandbox and specific dangerous commands can be blocked or require approval. That lets Codex move quickly through ordinary engineering tasks while still forcing review or blocking patterns we do not want to run outside the sandbox.
We apply this posture through a combination of cloud-managed requirements, macOS managed preferences, and local requirements files. Requirements are admin-enforced controls that users cannot override. The macOS managed preferences and local requirements files allow us to keep a consistent baseline while still testing different configurations by team, user group, or environment. These configurations apply across local Codex surfaces, including the desktop app, CLI, and IDE extension.
Agent-native telemetry and audit trails
Control is only half the job. Once agents are deployed, security teams need visibility into what these agents are doing and why. Traditional security logs are still useful when looking at actions taken by Codex, but they mostly answer what happened: a process started, a file changed, a network connection was attempted. Defenders are still left to figure out why Codex did something, or the user's intent.
Codex can give security teams a more agent-aware view. Codex supports OpenTelemetry log export for various Codex events such as user prompts, tool approval decisions, tool execution results, MCP server usage, and network proxy allow or deny events. Codex activity logs are also available through the OpenAI Compliance Platform for Enterprise and Edu customers.
At OpenAI, we use Codex logs alongside our AI-powered security triage agent. When an endpoint alert says Codex did something unusual, the endpoint security tool tells us that a suspicious event occurred. Codex logs then help explain the surrounding intent by the user and agent. Our AI security triage agent uses Codex logs to inspect the original request, tool activity, approval decisions, tool results, and any relevant network policy decision or block. The AI security triage agent surfaces its analysis to our security team for review to distinguish between expected agent behavior, benign mistakes, and activity that truly warrants escalation.
We also use the same telemetry operationally. We use these logs to understand how internal adoption is changing, which tools and MCP servers are being used, how often the network sandbox is blocking or prompting, and where the rollout still needs tuning. These OpenTelemetry logs can be centralized in SIEM and compliance logging systems.
Looking ahead
As coding agents like Codex become integrated into development workflows, security teams need tools specifically designed for managing this shift. Codex provides the control surfaces, configuration management, sandboxing, and detailed agent-aware telemetry needed to ensure safe adoption. With those capabilities in place, security teams can enable Codex with greater confidence, balancing developer productivity with the visibility and control required for enterprise security. More information on configuring Codex can be found here(opens in a new window), and the Compliance API here(opens in a new window).
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み