NVIDIA、AI エージェントのより安全な導入方法を4 つ提案
本文の状態
日本語全文を表示中
詳細モードで約17分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
NVIDIA Developer Blog
NVIDIA AI Red Team は、AI エージェントの導入における主要な脆弱性を特定し、アクセス制御の実装やコード実行制限など、敵対的圧力下で機能する具体的な対策を提示した。
AI深層分析を開く2026年7月31日 22:23
AI深層分析
キーポイント
AI エージェントの主要な脆弱性
NVIDIA AI Red Team の調査により、アクセス制御の欠如、任意コード実行の許容、ネットワーク出口制限の不在、秘密情報の平文露出という 4 つの共通する失敗モードが特定された。
エージェントへのアクセス制御の実装
強力なアクセス制御を最初の防御ラインとし、各エージェントを明示的に許可されたユーザーに制限し、最小権限の原則に従って権限をマッチさせることが推奨される。
コード実行の制限と管理
Bash シェルやコマンド実行ツールは汎用性が高いが、プロンプトインジェクションによる出力操作を防ぐために、モデル出力によるコマンド実行を厳しく制限する必要がある。
敵対的圧力下での対策の有効性
記事は、チャット接続型エージェントに焦点を当てているが、これらのパターンはあらゆる種類のエージェントに一般化され、敵対的な状況下でも機能する制御策を示している。
コマンド実行とファイル書き込みによるコード実行リスク
モデル出力の制御権限が攻撃者に握られると、コマンド実行やシステムファイルへの書き込みを通じて任意のコード実行や特権昇格が可能となる。
重要な引用
Agents that function as 'digital coworkers' offer clear benefits.
The most common failure mode in current AI deployments is a lack of access control to the agent.
Restrict each agent to explicitly authorized users; agents that did not respond to unauthorized users were significantly harder to test.
An attacker who can write content to system files such as ~/.bashrc or ~/.zshrc, or configuration files such as ~/.gitconfig, hooks.json, MCP.json, or skills files, can achieve code execution when a different process executes the relevant file, even if command-line execution is not directly available.
編集コメントを表示
編集コメント
本記事は、AI エージェントの普及に伴うセキュリティリスクを具体的な事例と対策で示しており、実務レベルでの重要性が高い。特に、プロンプトインジェクションや権限管理といった技術的課題に対する明確な指針が得られるため、開発現場における参考価値は極めて大きい。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
知識労働者たちは、AI エージェントをワークフローに統合するケースが増えています。"デジタルな同僚"として機能するエージェントには明確なメリットがあります。例えば、バグレポートのレビューから修正の実装・テスト、パッチのプッシュ、そして人間による確認のための通知までを一貫して処理できます。定型業務を代行することで、エージェントは大きな生産性向上をもたらす可能性があります。
一方で、大規模言語モデル(LLM)に生きたツールや企業データを接続する「エージェントハネス」を利用することは、有用なアシスタントが、攻撃対象領域の理解が不十分な特権的なソフトウェアへと変化するリスクを伴います。
過去6か月にわたり、NVIDIA のAI レッドチームは、単純な対話型コーディングツールから常時稼働する自律型のデジタルアシスタントに至るまで、複数の AI エージェントを評価してきました。エージェントに脆弱性が見つかった場合、使用されたフレームワークやハネスの種類に関わらず、私たちは一貫して以下の主要な失敗モードを目撃しています。
- エージェントに対するアクセス制御の欠如
- 任意のコード実行を可能にしてしまうエージェントツールの存在
- ネットワーク外部への通信(イグレス)を制限する仕組みがないこと
- シークレット情報が平文でエージェントに露出している状態
本稿では、これらの失敗モードを検証し、敵対的な圧力下でも機能する制御策について解説します。例として取り上げるのはチャット接続型エージェントが中心ですが(評価で見かけたものの大多数がこのタイプです)、ここで示すパターンはあらゆる種類のエージェントに一般化して適用可能です。
エージェントのアクセス制御を実装する
現在、AI エージェントの導入で最も頻繁に発生する失敗は、アクセス制御の不備です。調査では、個人ユーザーの認証情報を保持し、社内ネットワーク内のすべての承認済みユーザーが利用可能なエージェントが複数見つかりました。
これにより、エージェントの正当な認証情報が悪用されるリスクが生じるだけでなく、後続の事例で示すように、これらの認証情報を収集して本来の用途以外で使用することも容易になってしまいます。
推奨事項:
- 敵対的活動に対する最初の防御線として、強力なアクセス制御を採用する。
- 各エージェントの利用者を明示的に制限する。未承認ユーザーからの要求に応じないエージェントは、テスト自体が格段に困難になることが確認されています。
- エージェントの権限は、それを呼び出すユーザーの権限と一致させるべきです。「最小権限の原則」に従ってください。
コード実行を制限する
多くのハーン(検証環境)では、Bash シェルやコマンド実行ツールが公開されています。これらは汎用性の高さからよく利用されますが、特定の機能ごとに別々のツールを用意する必要がなく、幅広い日常タスクに対応できるためです。
しかし、モデルの出力がコマンド実行を制御する状況では、攻撃者が直接入力や間接的なプロンプトインジェクションを通じてその出力に影響を与えることができれば、実行環境内で任意のコマンドを実行できてしまいます。これにより、データ窃取やホスト上での悪意ある動作の恒久化といった、危険な結果を招く恐れがあります。
任意のコマンド実行のリスクに対する一般的な対策には、LLM をジャッジとして用いたレビューエージェントで有害または悪意のあるコマンドの実行をブロックする方法や、許可されたコマンドのみを許容するホワイトリストの活用、あるいはモデルが「正しい判断をする」という信頼に頼る方法などがあります。しかし、これらは敵対的な操作に対する防御としては限定的です。
多くの一般的なエージェント型コマンドラインタスクは、共通の開発ワークフローやテスト駆動開発(TDD)をサポートしています。つまり、pytest や npm install といったコマンドの実行能力が一般的に必要とされるため、LLM をジャッジとするパターンでは、これらのコマンド実行を無条件で受け入れがちです。しかし、攻撃者が操作した入力によって影響を受けた場合、これらは一見安全なコマンドであっても任意のコマンド実行と同義となります。
場合によっては、エージェントに対して Python スクリプトの作成と実行やリモートパッケージのインストールを依頼するだけで、逆シェル付きの完全なリモートコード実行(RCE)が実現できてしまいます。この手法の詳細は、当社の以前のブログ記事 From Assistant to Adversary: Exploiting Agentic AI Developer Tools で紹介しています。
コマンドラインツールを使わなくても、エージェントが動作する環境に対してファイルの読み書きを行う機能を通じてアクセスできる場合、予期せぬコード実行や権限昇格への経路が開かれることがよくあります。
システムファイル(~/.bashrc や ~/.zshrc など)や設定ファイル(~/.gitconfig、hooks.json、MCP.json、スキルファイルなど)への書き込み権限を持つ攻撃者は、別のプロセスがそのファイルを呼び出すタイミングでコード実行を達成できます。これは、コマンドラインからの直接実行が可能かどうかに関わらずです。
エージェントが書き込み可能な場所やファイルは厳格に制御し、実行不可能な領域に限定する必要があります。
推奨事項:
- アクセス可能なエージェントにおける任意のコード実行は、最も重大なリスクとして扱うべきです。
- 可能であればコマンドラインツールの使用を避けてください。
- OS レベルで、非実行ワークスペース外への書き込みをブロックしてください。
- コマンドライン実行ツールが必要な場合は、実行可能なコマメントの厳格な最小権限ホワイトリストを使用し、強力なネットワーク出口制御を持つ隔離された実行環境でツールを実行してください(次項で詳しく説明します)。
- コマンドライン経由でファイル名、ドキュメントタイトル、その他の外部データなどの引数や文字列を処理する際は注意が必要です。パスのTraversal やコマンドインジェクションを防ぐため、使用前に必ずサニタイズと正規化を行ってください。
デフォルトではネットワーク出口を拒否する
外部ネットワークへの接続は、データ窃取やリバースシェル、SOCKS などの直接接続を可能にし、攻撃者がエージェントのランタイム環境に直接アクセスする経路となります。ネットワーク出口制御を適用し、最小限の権限で制限した結果、すべての操作をエージェントプロセス経由で行う必要が生じ、実行速度が低下し、影響の確実性も損なわれました。さらに、エージェントの状態と整合性の維持、出力フィルターの回避、リクエスト拒否後のセッション再起動や操作など、運用上の負担が増大しました。
推奨事項:
- デフォルトで deny(拒否)するネットワーク出口ポリシーを適用し、エージェントが実行すべきタスクに必要最小限のエンドポイントのみを対象とした、権限制限されたホワイトリストを設定してください。
- エージェントがアクセスするすべてのネットワーク境界において、エージェントからは操作できない環境制御を用いてこれらの制限を強制してください。
シークレットをエージェントの到達範囲から遠ざける
エージェントは、その機能を果たすためにプラットフォームトークン、API キー、バージョン管理システム(VCS)へのアクセストークン、場合によっては OAuth リフレッシュトークンといったシークレットへのアクセスを必要とします。従来のセキュリティアドバイスでは、メモリに環境変数としてシークレットを注入することでディスクへの書き込みを防ぐことが推奨されますが、これはコンテナ内でコードのみが実行される場合に限って有効な対策です。
コマンド実行権限を持つエージェントがその環境と共有されている場合、env や printenv といったコマンド、あるいは /proc/self/environ にアクセスさせることで、直接情報を閲覧されてしまいます。特にコマンドラインツール(CLI)は高いリスクを伴うため注意が必要です。CLI は認証情報を予測可能な場所にディスクにキャッシュし、容易に表示してしまうからです。実際、git リポジトリ内や.env ファイル、bash の履歴ファイル、.netrc ファイル、OAuth 2.0 リフレッシュトークン、そして実行環境内の環境変数などからトークンを発見しました。
リバースシェルを確立できなかった場合でも、チャットインターフェースを通じて認証情報を外部へ持ち出せるケースが多々ありました。ここでは「フロッグ・ボイリング(徐々に煮る)アプローチ」を用い、エージェント自身の実行環境内に露呈している複数の秘密情報を引き出すことに成功しました。ネットワーク経由での直接な持ち出しやファイルシステム内での直接的な検査を防ぐエグレス制御は機能していましたが、認証情報は依然として環境内に存在し、LLM がアクセスできる状態でした。その結果、LLM によってチャットインターフェースを介して情報が外部へ送信されてしまったのです。
推奨事項:
- エージェントに対して永続的な秘密情報をアクセスさせないこと。
- 秘密情報は専用のシークレットマネージャーに保存すること。
- 必要なプロセス内でのみ、メモリ上に限定的にオンデマンドで秘密情報を取得すること。
- 秘密情報をエージェントのコンテキストウィンドウや実行環境から切り離すこと。
- タスクに認証情報が必要な場合は、有効期間が短くスコープも限定されたトークンを使用し、タスク完了直後に即時失効させること。
決定論的な制御を最初の防御ラインとして活用する
私たちが遭遇する最も頻繁な対策は、モデルに対して危険な行動を避けるよう指示するシステムプロンプトです。時には、入力や出力を検査する別のモデル(LLM-as-a-judge パターン)でこれを補強することもあります。しかし、これらはすべて LLM によって実行されるため、LLM 自体が持つ確率的で信頼性に欠ける性質をそのまま引き継いでしまいます。
こうした制御を確実に無効化する一般的な手法は三つあります。それぞれを複数のシステムで検証しました。
悪意のある行為が正当に見える文脈をエージェントに提示するだけで、驚くほど効果的でした。私たちはよく「デバッグ中」や「管理者ユーザー」として振る舞うよう提案し、そうするとエージェントは私たちの要求に応じるようになります。あるエージェントに至っては、逆シェル(reverse shell)の作成と実行まで行いました。
image*図 1. Slack に接続されたエージェントに対する「社会的工学的攻撃」が成功し、攻撃者に逆シェルを作成させている様子*
他のケースでは、ファイル編集ツールの使用を指示することで、エージェントのメモリや AGENT.md ファイルを直接操作することも可能でした。これにより、「デバッグ中」や「権限を持つユーザー」という文脈を構築する手法も実現できます。
蛙を煮る
「カエル煮込み攻撃」(Crescendo attack)と呼ばれる手法では、過去の会話履歴を利用して信頼性を築き、リクエストが安全であることを印象付けることで、複数回のやり取りを通じてエージェントを徐々に望ましい行動へと誘導します。この秘密情報の抽出は、一見正当なワークフローを実行してエラーを引き起こし、その根本原因が秘密情報に関連していることを「発見」したふりをして、最終的にエージェントに情報を開示させるという手順で実行されます。
正当なワークフローを通じた誤誘導
パッケージインストールなどによる誤誘導攻撃(2025年のBlack Hatで初公開された「From Prompts to Pwns」)は依然として極めて有効です。一見無害な行動を実行させることでコード実行を副作用として引き起こせば、エージェントの防御を突破するのは通常容易です。
コーディングエージェントはライブラリのインストールを日常的に行います。この投稿で説明されているような悪意のあるライブラリを作成し、pip install git+https://…という形でインストールを依頼すれば、これは標準的なリクエストに見えますが、攻撃用のパッケージはインストールプロセス中に任意のコード実行を引き起こします。
推奨される対策
LLM と同じ制御平面内にある防御策、特にプロンプトベースの防御は、日常的に迂回されるという一貫した知見があります。そのため、モデルの制御平面の外側で制御を強制する必要があります。
重要度の高い順に推奨される対策は以下の通りです。
- エージェントに対してアクセス制御を実装する。特定の認証済みユーザーのみがエージェントと対話できるように制限します。
- 任意のコマンド実行は、Docker や NVIDIA OpenShell、仮想マシンなどのサンドボックス環境でのみ実行してください。その環境は脱出を防ぐために適切にハードリングされている必要があります。また、環境やエージェントの設定ファイルを書き換えたり編集したりして、自らを構成できないようにする必要があります。
- エージェントが触れるすべての境界において、タスクに必要な特定のネットワークリソースのみを許可する最小権限のホワイトリストに基づき、デフォルトでネットワーク外部への通信(egress)を拒否します。
- 保存時や環境内でのシークレットの露出は禁止してください。非エージェント型アプリケーションでは環境変数としてシークレットを注入するのが一般的ですが、任意のコードを実行するワークロードにおいては不安全です。シークレットはシークレットマネージャーに格納し、必要なプロセスのみがオンデマンドでアクセスできるように制限すべきです。可能であれば、最小権限と一時性のトークンを提供するトークンブローカーを使用してください。
- パッケージのインストールは、検証済みのパッケージリポジトリからのみ許可します。デフォルトでは、任意の URL や VCS ベースのインストールをブロックします。
「最小権限」のツール、MCP(Model Context Protocol)、スキルなどを活用し、タスクに必要不可欠なツールのみを許可します。特に実行、書き込み、ネットワークへのアクセスを行う機能については厳格に審査してください。
永続ストレージにおいても「最小権限」を徹底し、ボリュームマウントは避けてください。やむを得ない場合は範囲を狭く絞り込み、後で実行パスとして使用される場所に書き込み可能なものをマウントすることは絶対に禁止します。
最新または最先端のモデルを採用してください。特に LLM-as-a-judge(LLM を評価者とする手法)においては、敵対的な操作に対する耐性が高いため有効です。
結論
当社の AI レッドチームによる経験は、AI エージェントを防御する上で、依然として決定論的な「ハード」な制御が必要であることを浮き彫りにしました。企業資格情報を保有する完全自律型システムには本質的なリスクが伴うため、慎重なセキュリティ対策が不可欠です。最先端モデルの登場により敵対的な操作は困難になりましたが、十分な時間と専門知識があれば、ほぼすべてのモデルを乗っ取られる可能性があります。
私たちが観察した一般的な欠陥としては、アクセス制御の甘さ(誰でもエージェントにアクセスできてしまう)、RCE(リモートコード実行)の機会を生む実行ツールやファイル書き込み機能、データ漏洩やリバースシェルを許容する不十分なネットワーク出口制御、そしてエージェントが実行環境内で平文で入手可能なシークレット情報の存在などが挙げられます。
プロンプトベースのガードレール、LLM-as-a-judge パターンを含めても、これらのギャップを埋めることはできません。重要なのはアーキテクチャレベルでの制御です。具体的には、エージェントへのアクセス制御、エンタープライズデータに対して最小権限でアクセスできる堅牢なサンドボックス、デフォルトで拒否するネットワーク外部接続制限、そしてシークレット情報をエージェントの到達範囲から遠ざける管理などがあります。
これらを適切に設定し、厳格に適用すれば、AI エージェントに対する敵対的な悪用を大幅に減らすことが可能です。
「エンタープライズ AI ファクトリーにおける自律型エージェントのガバナンス方法」技術ブログでは、ファーストプリンシプルからセキュアなエージェントを設計する方法について詳しく解説しています。このガイドは、NVIDIA の「Secure Agent Workspace Reference Design(セキュア・エージェント・ワークスペース参照アーキテクチャ)」の実装に向けた最初のステップを案内するものです。
エージェントセキュリティに関する詳細については、Black Hat USA での NVIDIA プレゼンテーション「Cost-Effective, Private, Frontier-Grade: AI Agent Exploitation with a Fine-Tuned OSS Model」をお見逃しなく。
NVIDIA AI Red Team の他の記事もぜひご覧ください。
原文を表示
Knowledge workers are increasingly integrating AI agents into their workflows. Agents that function as “digital coworkers” offer clear benefits. For example, they can review a bug report, implement and test a fix, push a patch, and ping a human for review. By handling routine tasks, agents have the potential to deliver large productivity gains. On the other hand, connecting a large language model (LLM) to live tools and corporate data through an agentic harness risks turning a helpful assistant into privileged software with a poorly understood attack surface.
Over the past six months, the NVIDIA AI Red Team has assessed multiple AI agents—from simple interactive coding tools to always-on autonomous digital assistants. When an agent proved exploitable, we typically saw the same key failure modes, regardless of the framework or harness used, including:
- Lack of access control to the agent.
- Agent tools that enable arbitrary code execution.
- No network egress controls.
- Secrets exposed to the agent in plaintext.
In this post, we examine these failure modes and describe the controls that succeed under adversarial pressure. While our examples focus on chat-connected agents—the majority of those we encountered in our evaluations—the patterns generalize to any agent.
Implement agent access control
The most common failure mode in current AI deployments is a lack of access control to the agent. We discovered multiple agents that held credentials for individual users and were accessible to any authorized user within the internal network. While this opened the door to misuse of the agents’ legitimate credentials, it also often enabled us to collect those credentials and use them outside of the intended context of the agent, as shown in later examples.
Recommendations:
- Use strong access controls as the first line of defense against adversarial activity.
- Restrict each agent to explicitly authorized users; agents that did not respond to unauthorized users were significantly harder to test.
- Match the agent’s permissions to those of the user invoking it, following the principle of least privilege.
Limit code execution
Many harnesses expose a Bash shell or command-execution tool. These are often used because of their generality. They support a wide range of routine tasks, without requiring a separate tool per function. However, when model output controls command execution, an attacker who can influence that output—through direct input, or indirect prompt injection—may be able to run commands in the execution environment. This can enable them to achieve malicious outcomes such as data exfiltration or execution persistence on the host.
Common mitigations to this risk of arbitrary command execution often involve using LLM-as-a-judge review agents to block harmful or malicious commands from running, the use of allowlists for acceptable commands, or simply trusting that the model “knows better.” All provide limited defense to adversarial manipulation.
Many common agentic command-line tasks support common development workflows and test-driven development. This means they generally require the ability to execute commands such as pytest or npm install, meaning LLM-as-a-judge patterns are often predisposed to accept the execution of these commands. When influenced by attacker-controlled input, however, these commands are equivalent to arbitrary command execution.
In some cases, obtaining full remote code execution (RCE) with a reverse shell is as simple as asking the agent to write and execute a Python script or install a remote package, as shown in our previous blog post on this topic.
Even without a command-line tool, the ability to interact with the environment in which the agent is running through file read and write tools also often exposes unexpected paths to code execution and privilege escalation.
An attacker who can write content to system files such as ~/.bashrc or ~/.zshrc, or configuration files such as ~/.gitconfig, hooks.json, MCP.json, or skills files, can achieve code execution when a different process executes the relevant file, even if command-line execution is not directly available. The locations and files that agents can write to should be strictly controlled and be limited to non-executable locations.
Recommendations:
- Treat arbitrary code execution as the single highest-impact risk in an accessible agent.
- Avoid command-line tools wherever possible.
- Block writes outside a non-executable workspace at the OS level.
- If a command-line execution tool is required, use a strict least-privilege allowlist of executable commands, and run the tool in an isolated execution environment with strong network egress controls, as we will detail next.
- Exercise caution when processing arguments or strings such as filenames, document titles, and other external data via the command line. Ensure that they are sanitized and normalized before use to prevent issues such as path traversal or command injection.
Deny network egress by default
Outbound network connections permit data exfiltration and the creation of direct connections, such as reverse shells and SOCKS, through which attackers can interact directly with the agent’s runtime environment. When network egress controls were enforced and appropriately least-privileged, we ran all of our interactions through the agent process, slowing down our pace of execution and making impact less reliable. Maintaining the agent’s state and alignment, navigating output filters, and restarting and manipulating sessions after the agent began refusing requests all added operational burden.
Recommendations:
- Apply a default-deny network-egress policy, with a least-privilege allowlist of endpoints scoped to the minimal set required for tasks that the agent is expected to perform.
- Enforce these restrictions at every network boundary the agent touches using environmental controls that are not accessible to the agent.
Keep secrets out of the agent’s reach
Agents often require access to secrets to perform their intended function: platform tokens, API keys, version control system (VCS) access tokens, and in some cases even OAuth refresh tokens. While conventional security advice suggests injecting secrets as environment variables in memory to prevent them from being written to disk, this is reasonable when only your code runs in a container.
When an agent with command execution shares that environment, inducing it to run env, printenv, or /proc/self/environ enables direct inspection of them. Command-line tools are worth highlighting as particularly high-risk. CLIs cache credentials on disk in predictable places and print them back readily. We observed tokens in git repositories, .env files, bash history, .netrc files, OAuth 2.0 refresh tokens, and environment variables in the execution environment.
Even when we could not establish a reverse shell, we could often exfiltrate credentials through the chat interface. Using a “frog-boiling” approach (see below), we led agents into surfacing several secrets exposed inside their own execution environments. Egress control prevented direct exfiltration over the network or direct examination in the file system, but the credentials were still exposed within the environment and reachable by the LLM, which delivered them to us via the chat interface.
Recommendations:
- Never make persistent secrets accessible to an agent.
- Store secrets in a dedicated secrets manager.
- Retrieve secrets on demand only within the memory of processes that require them.
- Keep secrets out of the agent’s context window and execution environment.
- When a task requires a credential, use a short-lived, narrowly scoped token, and revoke the token as soon as the task is complete.
Use deterministic controls as your first line of defense
The most frequent attempt at mitigation we encounter is a system prompt telling the model to avoid risky or dangerous behaviors, sometimes reinforced by a second model judging inputs or outputs (the LLM-as-a-judge pattern). These are all enforced by an LLM, and inherit the same probabilistic, unreliable behavior as the LLM itself.
Three general techniques reliably defeat these sorts of controls. We show each on multiple systems.
Simply presenting the agent with a context in which malicious activities appear legitimate was remarkably effective. We often suggested to the agent that we were “debugging” or “admin users,” after which it would regularly comply with our requests. One agent even went so far as to write and execute a reverse shell for us:

In other cases, it was possible to directly manipulate agent memory and AGENT.md files by instructing the agent to use file editing tools, which also allowed the construction of “debugging” and “authorized user” frames.
Boiling the frog
“Frog-boiling” (sometimes called a Crescendo attack) progressively nudges the agent into desired behavior across multiple interactions, using previous conversation history to establish credibility and the benign nature of requests. The secret extraction proceeded by attempting to execute legitimate-looking workflows in a way that induces errors, and then finally “discovering” that the underlying cause of the errors was related to secrets, convincing the agent to reveal them to us.
Misdirection through legitimate workflows
Misdirection attacks such as package installation (first described in From Prompts to Pwns at Black Hat 2025) remain extremely effective. By inducing an agent to take an apparently benign action which has code execution as a side effect, it is typically straightforward to bypass any agent resistance.
Coding agents routinely install libraries. Creating a malicious library as described in this post and then asking the agent to install it via pip install git+https://… appears to be a standard request; however, the weaponized package creates arbitrary code execution during the installation process.
Recommended controls
A consistent finding is that defenses in the same control plane as the LLM, particularly prompt-based defenses, are routinely subverted. Controls must be enforced outside of the model’s control plane.
Recommended controls, in rough order of importance, are:
- Use access control on the agent. Only specific, authenticated users should be able to interact with the agent.
- Run arbitrary command execution only in a sandbox environment such as Docker, NVIDIA OpenShell, or a virtual machine. The environment must be properly hardened against escape. The environment must not be able to configure itself by writing or editing environment or agent configuration files.
- Default-deny network egress with a least-privilege allowlist of specific network resources required by the task, at every boundary the agent touches.
- Do not expose secrets at rest or to the environment. While injecting secrets as environment variables is standard in non-agentic applications, this is insecure for workloads that execute arbitrary code. Secrets should be stored in a secret manager, accessed on-demand, and limited to the process that requires them. Where possible, a token broker that provides least-privilege, ephemeral tokens should be used.
- Permit package installation only from validated package repositories. Block arbitrary URL and VCS-based installs by default.
- Least-privilege tools, MCPs, skills, etc. Only the tools the job requires; scrutinize anything that executes, writes, or reaches the network.
- Least-privilege persistent storage. Avoid volume mounts; where you can’t, scope them tightly and never mount anything writable into a path that is later executed.
- Use recent/frontier models, particularly for LLM-as-a-judge patterns, which can be more robust to adversarial manipulation.
まとめ
Our AI Red Team’s experience in securing AI agents highlights the continued requirement for deterministic “hard” controls in defending AI agents. Fully autonomous systems with enterprise credentials are inherently risky and must be carefully secured. While frontier models make adversarial manipulation more difficult, with sufficient time and expertise, nearly all of them can still be subverted.
Common flaws we observed include: weak access control (permitting any user to access the agent), execution and file-write tools that create opportunities for RCE, insufficient network egress controls permitting data exfiltration and reverse shells, and secrets in plaintext inside the execution environment accessible by the agent.
Prompt-based guardrails, including the LLM-as-a-judge pattern, do not close any of these gaps. Architectural controls do: access control to the agent, hardened sandboxes with least-privilege access to enterprise data, default-deny network egress controls, and secrets kept out of the agent’s reach. When properly configured and enforced, these controls are highly effective in reducing adversarial abuse of AI agents.
*To learn more about designing secure agents from first principles, see the *“How to Govern Autonomous Agents in Enterprise AI Factories” Technical Blog*, which guides you through the first steps of implementing our *Secure Agent Workspace Reference Design*.*
*To learn more about agent security, don’t miss the NVIDIA presentation at Black Hat USA: *Cost-Effective, Private, Frontier-Grade: AI Agent Exploitation with a Fine-Tuned OSS Model
*To read more from the *NVIDIA AI Red Team*, see our other posts*.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み