Vercel、AI エージェント実行環境のネットワーク境界不足を指摘
本文の状態
日本語全文を表示中
詳細モードで約13分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Vercel Blog
Vercel は、AI エージェントの進化に伴い、計算資源の隔離だけでは不十分であり、ネットワーク境界による出向制御が不可欠であると指摘し、完全なサンドボックスには両者の統合が必要だと論じる。
Continue in AI NEW LAB
このニュースを、実務の判断につなげる
AI NEW LABで、試したことや先に確認したい条件を共有できます。まずはログインなしで読めます。
AI NEW LABで論点を見るAI深層分析を開く2026年8月11日 06:46
AI深層分析
キーポイント
計算隔離とネットワーク境界の役割分担
計算資源の隔離はホストへのアクセスを防ぐが、ネットワークを介したデータ漏洩や内部サービス攻撃は防げないため、両者の併用が必要である。
ネットワーク経由でのサンドボックス脱出リスク
VM 境界を越えなくても、DNS リゾルバの残存や誤ったホワイトリスト設定などを通じて、不正コードが外部へ通信しデータを漏洩する事例が増加している。
包括的なセキュリティ境界の定義
実際のセキュリティ境界には、DNS、プロキシ、アイデンティティサービス、内部ネットワークなど、許可されたすべての経路を含める必要があるとされる。
最小限の接続権限付与
有用なサンドボックスはワークロードに必要な接続のみを許可する必要がある。例えば、AIプロバイダーへのアクセスのみを許容し、他のパブリック宛先へのアクセスを制限できる。
ドメインとCIDRの併用
IPアドレスが変動する現代サービスにはドメインポリシーを、固定インフラやプライベートネットワークにはCIDRポリシーを用いることで効果的な制御が可能となる。
重要な引用
Isolation without egress control contains the process, not its consequences.
Without a network boundary, it is only half a sandbox.
A complete sandbox therefore needs both compute isolation and control over the authority available through its network.
A useful sandbox should grant only the connectivity a workload requires
編集コメントを表示
編集コメント
本稿は、AI エージェントの普及に伴う新たな脅威に対して、従来の「隔離」概念だけでは不十分であることを鋭く指摘している。開発者は単に VM を設定するだけでなく、DNS やプロキシを含む通信経路全体をセキュリティ境界として再定義する必要がある。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
信頼できないコードを安全に実行するには、単にホストから隔離するだけでは不十分です。そのコードが到達できる範囲も制御する必要があります。
AI エージェントがファイルの読み込み、コマンドの実行、パッケージのインストール、さらには独自のプログラム生成といった能力を獲得するにつれ、この重要性は増しています。マイクロVM(microVM)を使えば、コードがホストや他のワークロードにアクセスすることを防げます。しかし、それだけではデータの外持ち、内部サービスのプロービング、インターネット上の他システムへの攻撃、あるいは環境内に存在する認証情報の悪用を阻止することはできません。
エグレス制御を伴わない隔離は、プロセスそのものは封じ込めても、その結果まで防ぐことはできないのです。
したがって、完全なサンドボックスには、計算リソースの隔離と、ネットワークを通じて利用可能な権限への制御の両方が必要です。具体的には、コードが接続できる先、使用できる認証情報、そしてワークロードのライフサイクル全体を通じてこれらの権限がどのように変化するかを管理する必要があります。これらの制御は、後から付け加える保護機能ではなく、セキュリティ境界そのものの一部なのです。
サンドボックスには複数の境界が存在します
計算リソースの隔離は、「このプログラムは実行中のマシン上で何にアクセスできるか」という重要な問いに答えます。一方、ネットワークの隔離は、「ネットワークを通じて何にアクセスでき、何を攻撃できるか」という別の問いに答えるものです。
リポジトリを読み込んで生成されたコードを実行するエージェントを想像してください。課題、ログエントリ、依存関係、あるいはソースファイルに隠されたプロンプトインジェクションが、プライベートデータをアップロードするよう指示する可能性があります。生成されたプログラムはマイクロVMから脱出する必要さえありません。外部への通信制限がなければ、読み取れるあらゆるデータを外部サーバーへ送信するだけで済みます。
同じアクセス権限を使って内部ネットワークのスキャンやデータ・認証情報の窃取、あるいは認証済みAPIの呼び出しも可能です。攻撃者の視点では、VM境界を越える必要すらないのです。ネットワーク境界がない場合、それは半分のサンドボックスに過ぎません。
ネットワークバイパスはサンドボックスエスケープになり得る
最近のセキュリティ研究で明らかになった一つの傾向があります。信頼できないコードがコンテナから脱出するために、必ずしもVM境界を越える必要はないということです。重要なのは、セキュリティモデルが想定しなかったネットワーク経路が一つでも存在することです。
その経路とは、切断された環境に残されたDNSレスolver、空のホワイトリストによる開放失敗(fail-open)、ポリシーエンジンとプロキシで異なる解釈を受けるホスト名、あるいはリレーとして悪用される信頼できるパッケージサービスなどです。これらいずれかが、信頼できないコードに対してデータ窃取や指示受信、より機密性の高いインフラへの接近のためのチャネルを提供し得ます。
これは計算リソースの脱出(compute escape)とは異なります。カーネル、仮想マシン、コンテナの境界は設計通りに機能し続けても、隔離自体が失敗している可能性があります。実務的なセキュリティ境界には、DNS、プロキシ、アイデンティティサービス、内部ネットワーク、そして意図的に許可されたすべての宛先が含まれます。
結果を脱出と呼ぼうとも迂回(bypass)と呼ぼうとも、求められる要件は同じです。サンドボックスは、信頼できないコードが通信できるあらゆる経路を網羅して設計されなければなりません。
有用なサンドボックスには、接続性を制限する仕組みが必要です。
完全にネットワークを切断すれば通信経路は遮断できますが、多くのワークロードを実行できなくなります。エージェントはリポジトリのクローン作成や依存関係のインストール、AI モデルへの呼び出し、データベースへの問い合わせ、結果のアップロードなどを必要とする場合があります。
unrestricted internet access(無制限なインターネットアクセス)が唯一の選択肢ではありません。有用なサンドボックスは、ワークロードが必要とする接続性だけを許可すべきです:
- AI プロバイダーへのアクセスを許可し、その他のパブリック宛先へのアクセスは禁止する。
- 整个クラウドネットワークではなく、特定のオブジェクトストレージバケットのみへのアクセスを許可する。
- プライベートサービスには到達可能にしつつ、プライベートアドレス空間の残りはブロックする。
- 信頼できるセットアップ時に依存関係をインストールし、生成されたコードの実行前にレジストリへのアクセス権限を取り除く。
- API キーをサンドボックス内部に配置することなく、API リクエストの認証を行う。
実用的なポリシーモデルは、完全な開放アクセス、完全なネットワーク分離、そして一致しないトラフィックをデフォルトで拒否する細粒度のポリシーをサポートする必要があります。これらのポリシーでは、ドメインルールと許可・拒否アドレス範囲を組み合わせて適用できることが求められます。
ドメインと CIDR は異なる課題を解決するものです。ドメインポリシーは、IP アドレスが変動したり、複数の無関係なホスト名を扱う現代のサービスに対して十分な精度を持ちます。一方、CIDR ポリシーはプロトコルを超えて機能し、固定インフラやプライベートネットワークに対する制御を提供します。
接続は一時的であるべきです。ワークフローはパッケージレジストリへのアクセスから始まり、信頼できない実行の前にはアクセスを制限し、出力先を一時的に許可した上で、最終的には外部へのアクセスを完全に遮断します。これらはすべて、ワークロードの再起動なしで実現可能です。
Vercel におけるネットワーク境界の実装方法
Vercel のサンドボックスファイアウォールはマイクロ VM の外側、ホスト上で動作しており、サンドボックス内のコードがこれを改変したり無効化したりすることはできません。
Linux のネットワーキング機能により、外部への TCP 接続と DNS クエリは自動的にファイアウォール経由に転送されます。ワークロード側でプロキシの設定を行う必要はなく、ファイアウォールは各接続の元の宛先情報を保持します。
ドメイン制限付きの接続の場合、ファイアウォールは TLS ハンドシェークの冒頭を検査し、Server Name Indication(SNI)を抽出します。これにより、ファイアウォールが上流への接続を開く前に要求されたホスト名を特定できます。その後、そのホスト名がサンドボックスのドメインポリシーに合致するか、また宛先アドレスが CIDR ポリシーに合致するかが検証されます。
通常の許可された TLS 接続は復号化されずに通過します。ファイアウォールはポリシー適用に必要な暗号化されていないハンドシェーク情報のみを参照し、ワークロードを直接宛先に接続します。
HTTP リクエストそのものを検査・変更する必要があるポリシーも存在します。対象ドメインに限定し、サンドボックス固有の認証局(CA)を用いて TLS を選択的に終端させることで、ヘッダーの注入やリクエスト転送が可能になります。これにより、ファイアウォールはホスト名、パス、メソッド、クエリ、またはヘッダーに基づいてリクエストをマッチングさせ、認証情報の追加や信頼できるエンドポイントへの転送を制御できます。
DNS トラフィックも同様のドメインポリシーでフィルタリングされます。これらの層が組み合わさることで、サンドボックスが接続できる先と、特定の接続に対して付与される権限の両方を厳密に管理します。
認証情報を信頼できない計算リソースから隔離する
エージェントは認証が必要なサービスへの呼び出しを頻繁に行いますが、環境変数やファイルに格納された認証情報は、転送可能なベアークレデンシャル(Bearer Credential)となってしまうリスクがあります。サンドボックス内のすべてのプログラムがこれを読み取ることができ、悪意のあるコードが第三者のサービスへコピーして保存すれば、サンドボックスが終了した後も長期間にわたり不正利用される可能性があります。
Vercel Sandbox では、認証情報をホストネットワーク境界で注入します。ファイアウォールはサンドボックスのためにその場で専用の認証局(CA)を作成し、これをサンドボックスの信頼済み証明書リストに登録します。設定された宛先に対して TLS を選択的に終端させ、認証ヘッダーを追加または置換した上で、アップストリームサービスとの新しい TLS 接続を確立します。
認証情報はマイクロ VM の内部に入ることもなく、ホスト上では暗号化された状態で保持されます。また、この認証局はサンドボックス固有のものであり、サンドボックスが停止すると即座に廃棄されます。
インジェクション機能は、認証情報の利用範囲も制限します。ファイアウォールはこの情報を設定された宛先のみへ送信するため、サンドボックスのファイルや環境を別のサービスにアップロードしても、その権限が移転されることはありません。マッチャーを使えば、パス、メソッド、クエリ、リクエストヘッダーなどに基づいてさらに制限をかけることも可能です。生成されたコードには、あるエンドポイントへ結果を送信する権限は与えられても、同じ API の他のリソースを読み取る権限までは付与されないように設計できます。
インジェクションされる認証情報も、「最小特権の原則」に従うべきです。アクセス権限は、ワークロードが実際に必要な特定の操作に限定する必要があります。
独自のポリシーをパスに実装する
静的な許可リストでは、すべてのセキュリティ要件を満たすことはできません。一部のワークロードでは、ペイロードの検査やビジネスルールの強制、監査証跡の記録、あるいはあなただけが持つコンテキストに基づいた認可判断が必要になる場合があります。
リクエスト転送機能を使えば、選択した HTTPS リクエストをあなたが管理するプロキシを経由して送信できます。このプロキシは、元のリクエストとともに、そのリクエストを発信したチーム、プロジェクト、サンドボックスを識別する Vercel 発行の OIDC トークンを受け取ります。
このプロキシが、プログラム可能なポリシー層として機能します。具体的には以下のようなことが可能です:
- リクエストが環境から送信される前に、機密フィールドを削除(Redact)する
- ユーザー別またはサンドボックス別の認可を強制する
- パッケージのダウンロードをサプライチェーンスキャン経由でルーティングし、組織ポリシーに適合しないアーティファクトをブロックする
- コンプライアンスワークフローのためにリクエストとレスポンスを記録する
- サンドボックスのアイデンティティを、限定的な権限を持つ認証情報へ交換する
組織のポリシーに合致しない操作は拒否します。
コードがマイクロVM内で完全なルートアクセスを持っていたとしても、その管理対象となるコードやその秘密情報はサンドボックスの外側に置かれます。リクエストのプロキシ化については、Sandbox のドキュメントで詳しく解説しています。
セキュリティは製品の基本機能として備えるべきものです
私たちは、信頼できないコードを安全に処理する際に、支払い方法の登録を前提とするべきではないと考えています。
すべての Vercel Sandbox には、計算リソースの分離と、内部のコードがどこと通信できるかを定義するための完全なファイアウォールが含まれています。
目指しているのは、すべてのサンドボックスを完全にオフラインにすることではありません。重要なのは、権限を明確にすることです。
- このサンドボックスはどの宛先にアクセスできますか?
- どのプライベートアドレス範囲への接続が禁止されていますか?
- どのリクエストで認証情報を使用できますか?
- どの操作には追加のポリシー承認が必要ですか?
- いつすべての通信を停止すべきですか?
これらは、ワークロードが本番環境に到達した後に追加するセキュリティ制御ではなく、実行環境そのものの基本的な性質です。この考え方に強く確信を持っているため、私たちはすべての Sandbox に対して完全な出口(egress)ファイアウォールの機能を開放しています。
はじめに
以下のポリシーでは、1 つの API へのアウトバウンド接続を許可し、特定の操作に対してのみ認証情報を注入します。他の宛先はデフォルトで拒否され、認証情報はサンドボックスの外側に保持されます。
同じポリシーは、サンドボックスが実行されている間にも置き換えることができます:
サンドボックスは、コードが実行される場所だけで定義されるわけではありません。重要なのは、そのコードが到達できる範囲、付与される権限、そしてコード自体が悪意あるものであってもなお維持される境界線です。
ネットワークもまた、サンドボックスの一部です。
関連記事
Vercel Sandbox ファイアウォールのドキュメント
Vercel サンドボックスの仕組みを理解する
エージェントアーキテクチャにおけるセキュリティ境界
さらに読む
原文を表示
Running untrusted code safely requires more than separating it from the host. You also have to control what that code can reach.
This matters more as AI agents gain the ability to read files, execute commands, install packages, and generate programs of their own. A microVM can prevent that code from accessing the host or another workload. By itself, it cannot stop the code from exfiltrating data, probing internal services, attacking systems elsewhere on the internet, or using credentials available inside the environment.
Isolation without egress control contains the process, not its consequences.
A complete sandbox therefore needs both compute isolation and control over the authority available through its network: where code can connect, which credentials it can use, and how those permissions change throughout the workload’s lifecycle. These controls are part of the security boundary, not protections to bolt on later.
A sandbox has more than one boundary
Compute isolation answers one important question: what can this program access on the machine where it runs? Network isolation answers another: what can it access, or attack, through the network?
Consider an agent that reads a repository and runs generated code. A prompt injection hidden in an issue, log entry, dependency, or source file might instruct it to upload private data. The generated program does not need to escape its microVM. With unrestricted outbound traffic, it can simply send anything it can read to an external server.
The same access can be used to scan internal networks, exfiltrate data and credentials, or call an authenticated API. From the attacker’s perspective, crossing the VM boundary may be unnecessary. Without a network boundary, it is only half a sandbox.
A network bypass can be a sandbox escape
Recent security research has made one pattern clear: untrusted code does not need to cross a VM boundary to escape containment. It only needs one network path that the security model failed to account for.
That path might be a DNS resolver left available in an otherwise disconnected environment, an empty allowlist that fails open, a hostname interpreted differently by a policy engine and a proxy, or a trusted package service turned into a relay. Any one of them can give untrusted code a channel to exfiltrate data, receive instructions, or move toward more sensitive infrastructure.
These are not compute escapes. The kernel, VM, or container boundary may continue working exactly as designed while containment still fails. The practical security boundary also includes DNS, proxies, identity services, internal networks, and every intentionally permitted destination.
Whether we call the result an escape or a bypass, the requirement is the same: a sandbox must account for every path by which untrusted code can communicate.
Useful sandboxes need selective connectivity
Completely disconnecting a sandbox closes the network path, but it also makes many workloads impractical. An agent may need to clone a repository, install a dependency, call an AI model, query a database, or upload its result.
Unrestricted internet access is not the only alternative. A useful sandbox should grant only the connectivity a workload requires:
Allow an AI provider, but no other public destination.
Allow one object storage bucket, rather than an entire cloud network.
Reach a private service, while blocking the rest of the private address space.
Install dependencies during trusted setup, then remove registry access before generated code runs.
Authenticate an API request without placing the API key inside the sandbox.
A practical policy model should support fully open access, complete network isolation, and granular policies that deny unmatched traffic by default. Those policies should be able to combine domain rules with allowed and denied address ranges.
Domains and CIDRs solve different problems. Domain policies are precise enough for modern services whose IP addresses change or serve many unrelated hostnames. CIDR policies work across protocols and provide control over fixed infrastructure and private networks.
Connectivity should also be temporary. A workflow can begin with access to a package registry, narrow access before untrusted execution, briefly permit an output destination, and finish with no outbound access, all without restarting the workload.
How Vercel enforces the network boundary
The Vercel Sandbox firewall runs on the host, outside the microVM, where code inside the sandbox cannot modify or disable it.
Linux networking transparently redirects outbound TCP connections and DNS queries through the firewall. Workloads do not need to configure a proxy, and the firewall retains each connection’s original destination.
For domain-restricted connections, the firewall inspects the beginning of the TLS handshake and extracts the Server Name Indication, or SNI. This identifies the requested hostname before the firewall opens an upstream connection. It checks that hostname against the sandbox’s domain policy and also checks the destination address against its CIDR policy.
Ordinary allowed TLS connections pass through without decryption. The firewall reads only the unencrypted handshake information required to enforce the policy, then connects the workload directly to its destination.
Some policies need to inspect or modify the HTTP request itself. For those configured domains only, header injection and request forwarding selectively terminate TLS using a certificate authority unique to the sandbox. The firewall can then match requests by hostname, path, method, query, or headers before injecting a credential or forwarding the request to an endpoint that you trust.
DNS traffic is filtered using the same domain policy. Together, these layers control both where a sandbox can connect and what authority a particular connection receives.
Keep credentials outside untrusted compute
An agent often needs to call an authenticated service, but a credential stored in an environment variable or file is a transferable bearer credential. Every program inside the sandbox can read it. Malicious code can copy it to a third-party service, where it can be retained and used long after the sandbox stops.
Vercel Sandbox instead injects credentials at the host network boundary. The firewall creates a dedicated certificate authority just in time for the sandbox and adds it to the sandbox’s trusted certificates. For a configured destination, it selectively terminates TLS, adds or replaces the authentication header, then establishes a new TLS connection to the upstream service.
The credential never enters the microVM. It never leaves the host unencrypted. The certificate authority is unique to the sandbox and is disposed when the sandbox stops.
Injection also limits where the credential can be used. The firewall sends it only to its configured destination, so uploading the sandbox’s files or environment to another service does not transfer that authority. Matchers can restrict it further by path, method, query, or request headers. Generated code might receive permission to submit results to one endpoint without receiving permission to read other resources from the same API.
Injected credentials should still follow the principle of least privilege, with access limited to the specific operations the workload requires.
Put your own policy in the path
Static allowlists cannot express every security requirement. Some workloads need to inspect payloads, enforce business rules, record an audit trail, or make an authorization decision using context only you have.
Request forwarding sends selected HTTPS requests through a proxy that you control. The proxy receives the original request along with a Vercel-issued OIDC token identifying the team, project, and sandbox that originated it.
That proxy becomes a programmable policy layer. It can:
Redact sensitive fields before a request leaves the environment.
Enforce per-user or per-sandbox authorization.
Route package downloads through supply-chain scanning and block artifacts that fail organizational policy.
Record requests and responses for compliance workflows.
Exchange a sandbox identity for a narrowly scoped credential.
Reject an operation that does not match organizational policy.
The policy and its secrets remain outside the sandbox, even when the code being governed has full root access inside its microVM. You can read more about request proxying in the Sandbox documentation.
Security belongs in the baseline product
We believe a sandbox should not require a payment method before it can safely handle untrusted code.
Every Vercel Sandbox includes both compute isolation and a complete firewall for defining what code inside it can communicate with.
The goal is not to make every sandbox completely offline. It is to make authority explicit:
Which destinations can this sandbox reach?
Which private address ranges are unavailable?
Which requests can use credentials?
Which operations must pass through additional policy?
When should all communication stop?
These are fundamental properties of the execution environment, not security controls to add after a workload reaches production. We believe so strongly in this that we have made our full egress firewall capabilities available to all Sandboxes.
Getting started
The following policy allows outbound connections to one API and injects a credential only for one operation. Other destinations are denied by default, and the credential remains outside the sandbox.
The same policy can be replaced while the sandbox runs:
A sandbox is not defined only by where its code runs. It is defined by what that code can reach, what authority it receives, and which boundaries still hold when the code itself is hostile.
The network is part of the sandbox.
Further reading
Vercel Sandbox firewall documentation
Understanding Vercel Sandboxes
Security boundaries in agentic architectures
Read more
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み