規制対応エンジニアリングチーム向けエージェントの出自証明を提示する「Compliance-first AI」
本文の状態
日本語全文を表示中
詳細モードで約13分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Sourcegraph Blog
規制されたエンジニアリングチームは、AI エージェントが変更を提出する前に参照したファイルの証明が必要であり、スコープ付き検索による監査証跡の確立が企業導入の鍵となる。
AI深層分析を開く2026年8月4日 08:17
AI深層分析
キーポイント
監査における文脈の重要性
CISO や CTO が懸念するのはモデルの能力ではなく、エージェントが適切な情報に基づいて行動したことの証明であり、単なる記録ではなくプロセスそのものの検証が必要となる。
人間とエージェントの監査ギャップ
人間のエンジニアには Pull Request のレビューや説明責任が存在するが、AI エージェントはセッション終了後に文脈が消えるため、変更理由を再構築するには多大な手作業が必要となる。
スコープ付き検索による監査証跡
エージェントがどのファイルを読み、なぜその判断を下したかを透明な記録として残すことで、監査人がロジックを逆算し、正確性と完全性の主張を検証可能にする。
エージェントの追跡可能性(プロベナンス)が規制環境でのスケーリングの障壁
セッション終了時に消滅する変更の文脈を記録しない限り、認証フローやデータ処理の変更に対する説明責任を果たせない。この欠落した記録こそが、モデルの能力制限以上に規制された環境でのAIのスケーリングを阻んでいる要因である。
エージェントの行動は容易だが、説明責任のある行動は困難
リポジトリやツールへのアクセス権限を持つことでエージェントによるコーディングが実用的になったが、その結果として生じる出力の正確性と完全性を検証するには、エージェントが参照した文脈を可視化する必要がある。
重要な引用
For a CISO or CTO, one of the many questions that stalls enterprise AI adoption isn't whether an agent can write the code. It's whether the agent looked at the right things to make the right change, and whether you can prove it after the fact.
When an auditor tests your change-management controls, an exception doesn't mean one file looked wrong; it means the process broke down, a change went out without the review, approval, or testing the control promised.
A transparent record of exactly which files an agent read, and why, lets an auditor reverse-engineer the agent's logic and confirm both assertions: the agent acted on the complete set of requirements, using only relevant, authorized code context.
That gap, more than any model limitation, is what keeps AI from scaling in regulated environments.
編集コメントを表示
編集コメント
この記事は、生成 AI の実用化において技術的な性能よりもガバナンスと透明性が優先されるべきという現実を浮き彫りにしている。Sourcegraph が提唱するスコープ付き検索の概念は、AI エージェントがブラックボックス化するリスクを軽減し、信頼できるインフラ基盤としての地位を確立するための重要なステップとなる。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
2026 年 7 月 27 日
規制の厳しいエンジニアリングチームは、変更をリリースする前に AI エージェントがどのファイルを読み込んだかを証明する必要があります。スコープ付きの検索(retrieval)が、エージェントのコンテキストを検証可能な監査証跡へと変える仕組みです。
CISO や CTO にとって、エンタープライズにおける AI の導入を停滞させる要因の一つは、「エージェントがコードを書けるか」ではありません。「正しい変更を行うために適切な情報にアクセスしたのか」、そして「事後にそれを証明できるか」という点です。単にクリーンな監査証跡があるだけでは不十分です。エージェントが論理を完璧に記録していても、症状に対する応急処置を行ってしまい、根本的な脆弱性への対応が遅れる可能性があります。重要なのは、行動を起こす前に正しい文脈(コンテキスト)を持っていたこと、そしてそれを検証できることです。
この区別こそが、現在多くの経営層の会話で焦点となっている点です。銀行、医療、大規模ソフトウェア企業などにおけるエンジニアリングおよびセキュリティリーダーに話を聞くと、エージェント開発への躊躇はモデルの能力不足によるものではありません。彼らが口にするのは「証明」の問題です。監査人が変更管理統制をテストする際、例外が発生することは単一のファイルが間違っていたことを意味するのではなく、プロセスが崩壊したことを意味します。つまり、統制で約束されたレビュー、承認、またはテストを経ずに変更がリリースされてしまったのです。
監査において、2 つの基本的な管理主張である「正確性」と「完全性」は、証拠を信頼できるかどうかを決定し、背後にあるプロセスをストレステストすることで検証されます。AI エージェントの場合、このプロセスとは情報検索(Retrieval)のことです。エージェントがどのファイルを、なぜ参照したのかという透明な記録があれば、監査人はエージェントの論理を逆算して、以下の 2 つの主張を確認できます。「エージェントは完全な要件セットに基づいて行動し、関連性のある許可されたコードコンテキストのみを使用していた」という事実です。
人間のエンジニアが変更をリリースする際、通常はプルリクエスト(PR)の記録で十分です。承認履歴、レビューコメント、CI チェックの結果などが含まれます。そして後から疑問が生じても、「どこを、なぜ触れたのか」を説明できるエンジニアが存在します。人が参照したファイルの一覧をすべて要求されることはありえません。SOC 2 のレビューでは、監査人は個々の PR を抽出して、約束されたスキャンや承認が実際に実行されたことを確認します。より詳細なファイルレベルでの精査は、顧客環境に適用される Terraform などの、影響範囲が大きいアーティファクトに対してのみ行われるのが一般的です。
「エンジニア」がエージェントに置き換わった瞬間、その隙間が顕在化します。プルリクエストには差分と承認履歴が残りますが、「なぜそのように変更されたのか」と問える人間がいなくなります。認証フローの改修やデータ処理ルーチンの変更、既知の CVE を持つ依存関係への対応などを行う際、セッション終了と同時にその変更を導いた文脈が消えてしまうのです。それを記録しない限り、現在の多くのチームが再構築するには膨大な手作業が必要になります。
この欠落した記録こそが「エージェントのプロベナンス(由来)」です。つまり、エージェントが何を変更する前にどのファイルを読み、なぜそれらを読んだのかという証拠のことです。モデルの能力不足よりも、この文脈の欠如こそが、規制環境下で AI がスケーリングできない最大の要因となっています。
機能面は決して難関ではなかった
初期のコード支援ツールは、開いているファイルの上での自動補完に過ぎませんでした。利用可能な関数やそのパラメータを提示し、定型文を埋めることはできても、その視野は現在のファイルと限られたコンテキストウィンドウ内にとどまり、それ以外の情報は静的なトレーニングデータからのみ得られていました。広範なコードベースに対する認識はなく、開発者と並行して動作するだけでした。
解決策として、モデルにリポジトリ、ツール、ドキュメントへのライブアクセスを与えることが求められました。これが Model Context Protocol (MCP) や、一連のエージェント型ツールの登場によって形式化されたものです。これこそが、エージェントによるコーディングを実用的なものにした要因です。
しかし同時に、一つの事実に気づかされました。エージェントに行動させることは次第に容易くなっています。一方で、責任を持って行動させることははるかに難しいのです。
広く情報を取得し、リポジトリ全体を引き込み、文脈を推測して必要な情報が見つからないと幻覚を起こすようなエージェントが出力する結果は、誰も保証できません。その出力がセキュリティ上重要な変更である場合、「モデルが決めた」ではコンプライアンス審査に耐えられません。技術的な能力は備わっていますが、問題は依然として、エンジニアが最終的には CISO や CTO がエージェントの生成物について正確性と完全性を検証しなければならない点にあります。しかし、それにはエージェントが参照した文脈を確認できなければ不可能です。
その文脈を可視化すれば、2 つの重要な効果が得られます。まず、レビュー担当者は出力結果を参照した具体的なソースと照合して確認できるようになります。次に、チームはガードレールを設定し、エージェントが一貫性のある検索パターンに従うように制御できます。監査のタイミングで初めて問題が表面化するといった不測の事態はもう起きません。
焦点を絞った検索は管理手段となる
エンジニアリングコミュニティでは 特定の方向へ収束しています:まず問題を範囲限定し、その後に推論を行うというパターンです。狭く意図的な検索はトークンコストを抑えますが、企業にとってより重要な利点は、エージェントの行動を人間が理解できる形にすることにあります。
正確で範囲限定された文脈に基づいたエージェントは、その行動の痕跡を残します。何が求められ、何が見つかり、何が参照されたのかを確認できます。この痕跡こそが、監査担当者に提示できる AI ワークフローと、規制対象システムからこっそり排除しなければならないワークフローとの決定的な違いです。
監査対応可能なエージェントワークフローの現状
Sourcegraph の Deep Search は、回答ごとに明確なソースリストを提示します。これは、どのような検索を実行し、どのファイルを読み込んで結論に至ったかを記録したものです。このソースリストは単なるデバッグ用の機能ではありません。証拠の足跡なのです。
エージェントの推論が問われた際、どこを参照したのかを具体的に示すことができます。
その背後にある Sourcegraph MCP サーバー は、「何かやって」といったブラックボックスなインターフェースではなく、ファイルの読み込みやキーワード検索、定義へのジャンプといった個別に名前がついた操作を公開しています。エージェントが行うすべてのアクションは、可視化され、個別的に観測可能なイベントです。
アクセス権限は リポジトリの権限設定 とスコープ付きトークンによって管理されます。エージェントが読み取れるのは、ユーザー自身が既に閲覧を許可されているリポジトリのみです。処理はすべて自社のインスタンス内で行われ、外部との通信はモデル自体への呼び出しのみです。
これらを合わせると、単なる情報検索ではありません。エージェントが何に触れたかを示す、権限管理された観測可能な記録なのです。
監査担当者が求めるのは、タイムスタンプ付きで追跡可能な回答です。これは実際のコードや設定変更に基づいたものでなければなりません。「何が」「どのように」変わったのかだけでなく、「なぜ」変わったのかも必要です。
「この行を修正しました」という説明と、「監査で見落としが見つかったため、このエンドポイントに JWT クレームの強制適用を追加し、そのギャップを埋めるための正確な変更はこれです」という説明の違いのようなものです。
これが Deep Search の価値です。コミット履歴、ファイルパス、コードの文脈を引用し、それぞれの変更がなぜ行われたのかという理由と結びつけます。誰かの記憶や古くなった Confluence ドキュメントに頼るわけではありません。記録は具体的な成果物であり、すべての会話は PDF としてエクスポート できます。監査担当者に代理の言葉を信じるよう求めるのではなく、実際に手渡すことが可能です。
これは単なるコンプライアンス要件を満たすだけでなく、監査期間を短縮します。監査担当者が環境をくまなく調べ、変更の根拠となった情報を組み立てる必要はありません。ソースと文脈が追跡可能な形で既に整理されているからです。
*Deep Search の会話を PDF としてエクスポート*
監査担当者が問う質問に Deep Search で答える
変更管理 / アクセス制御
- 「直近の監査期間中に認証サービスに触れたすべてのコミットを表示してください。」

*Deep Search は、認証サービスに関わるすべてのコミットをテーマごとにグループ化し、各コミットの SHA、日付、著者を表示します*
- 「『忘れられる権利』の実装やユーザーデータ削除エンドポイントはいつ行いましたか?」
- 「保管データの暗号化はどこで実施されており、その暗号化機能はいつ追加されましたか?」
- 「同意確認を行わずに IP アドレスをログ記録または保存するコードが存在しますか?

*Sourcegraph MCP サーバー:Claude Code で実行された Deep Search ツール。対象はパブリックリポジトリ
gitlab-org/gitlab*
セキュリティコントロール(SOC 2 / ISO 27001)
- 「管理画面のログインフローに MFA 強制が適用されたのはいつか?」
- 「アクセストークンの有効期限をどこで検証しており、その期限はどの程度か?」
- 「シークレットや API キーがコード内にハードコードされていないか、バットから取得されているかを確認したい」
PCI-DSS(決済データ)
- 「決済処理モジュールの最終変更日はいつで、誰が承認したのか?」
- 「クレジットカードデータがコードベースにどのように流入し、保存前にトークン化されているか?」

*Deep Search はパブリックリポジトリ
gitlab-org/gitlab内で、クレジットカードデータがどこから流入し、どこで保存されるかを追跡。関連ファイルとハッシュ化されたフィールド名を特定する*
SOX(財務統制)
- 「収益認識ロジックはどこに実装されており、最終変更日はいつか?」
HIPAA(医療データ)
「PHI(個人医療情報)へのアクセスはいつ、どこでログ記録されているのか?監査ログ機能はいつ導入されたのか?」
「PHI フィールドに対するロールベースのアクセス制御(RBAC)が適用されており、その導入時期はいつか?」
*主要な参照元:SOC 2、ISO/IEC 27001、PCI-DSS、GDPR 第 17 条、HIPAA 45 CFR 164.312、SOX セクション 404。
生産性ツールから記録システムへ
文脈エンジン(コンテキスト・エンジン)を、単なる開発者の生産性向上ツールとして評価する傾向があります。検索が速くなり、回答の質が高まり、リポジトリを探す時間が減る——確かにその効果は実証されています。しかし、企業における AI 導入に最終承認を与える人々にとって、最も重要なのはそれだけではありません。
セキュリティ責任者やプラットフォームリーダーにとって、この文脈層はエージェント開発における監査・コンプライアンスの基盤でもあります。ここが「エージェントのプロベナンス(行動の由来)」を記録するシステムとして機能し、規制当局やリスク管理チームが実際に問うべき答えを提供します。「エージェントは何を読み、なぜそのように行動したのか」——その問いに答えるのがこの層の役割です。
組織がエージェントの試行段階から、実用上の依存へと移行した瞬間、その証明はもはや任意のものではなくなります。リスクの高い領域で AI を活用する許可を得られるのは、それを確かな形で提示できるチームだけです。
これは、単一のリポジトリ内での検知と、実際のセキュリティ体制の違いと同じです。1 つのリポジトリ内の検知がセキュリティ体制ではないという指摘にあるように、その能力の真価は、コードベース全体でいかに実証できるかにかかっています。
エージェントが何を参照しているのか証明する準備はできていますか?デモを予約してください。
*本ブログ記事への貢献に対し、アンドレ・エレウテリオ、ドーラ・ノイマイヤー、ジェイミー・リンゼイ、マッケナ・フリアフ、マット・タナー、ステファニー・ジャーマックに感謝します。*
原文を表示
July 27, 2026
Regulated engineering teams must prove which files an AI agent read before it shipped a change. How scoped retrieval turns agent context into an audit trail.
For a CISO or CTO, one of the many questions that stalls enterprise AI adoption isn't whether an agent can write the code. It's whether the agent looked at the right things to make the right change, and whether you can prove it after the fact. A clean audit trail still isn't enough: an agent can document its reasoning perfectly and still patch the symptom instead of the vulnerability. What matters is that it had the right context before it acted, and that you can verify it did.
That distinction is where a lot of executive conversations are landing right now. We talk to engineering and security leaders across banking, healthcare, and large software organizations and the hesitation about agentic development rarely comes down to model capability. What we are told is it comes down to proof. When an auditor tests your change-management controls, an exception doesn't mean one file looked wrong; it means the process broke down, a change went out without the review, approval, or testing the control promised.
In auditing, two foundational management assertions, accuracy and completeness, determine whether you can rely on evidence at all, and they're verified by stress-testing the process behind it. With AI agents, the process is the retrieval. A transparent record of exactly which files an agent read, and why, lets an auditor reverse-engineer the agent's logic and confirm both assertions: the agent acted on the complete set of requirements, using only relevant, authorized code context.
When a human engineer ships a change, the Pull Request (PR) record is usually enough: approvals, review comments, CI checks. And when questions come up later, there's an engineer who can explain what they touched and why. Nobody expects a list of every file a person reads. In a SOC 2 review, auditors may pull individual PRs to confirm the promised scans and approvals actually ran, and deeper, file-level scrutiny tends to be reserved for high-blast-radius artifacts like the Terraform applied to customer environments.
The gap appears when the "engineer" is an agent. The PR still shows the diff and the approval, but there's no one to ask why the change was made the way it was. When an agent modifies an authentication flow, a data-handling routine, or a dependency with a known CVE, the context that informed the change disappears the moment the session ends unless it's captured. For most teams today, reconstructing it means a lot of manual work. That missing record is agent provenance: the evidence of which files an agent read, and why, before it changed anything. That gap, more than any model limitation, is what keeps AI from scaling in regulated environments.
Capability was never the hard part
Early code assistants were autocomplete on top of the file you had open. They could surface available functions and their parameters and fill in boilerplate, but their view was limited to the current file and a small context window; everything else came from static training data. They had no awareness of your wider codebase, and they worked strictly side-by-side with a developer. The fix was giving models live access to repositories, tools, and documentation, which is what the Model Context Protocol (MCP) and the wave of agentic tooling formalized. That's what made agentic coding practical. It also made one thing very clear: getting an agent to act is increasingly easy. Getting it to act accountably is much harder.
An agent that retrieves broadly, pulling in whole repositories, guessing at context, and hallucinating when it can't find what it needs, produces output no one can vouch for. When that output is a security-critical change, "the model decided" is not an answer that survives a compliance review. The capability is there; the problem is that engineers, and ultimately the CISO and CTO, still have to verify the accuracy and completeness of what agents produce, and they can't do that without seeing the context the agent used. Make that visible and two things follow: reviewers can check output against the exact sources consulted, and teams can set guardrails so agents follow the same retrieval patterns consistently. No more surprises turning up for the first time at audit time.
Focused retrieval is a control
The engineering community has been converging on a pattern: scope the problem first, then reason. Narrow, deliberate retrieval keeps token costs down, but the more important benefit for the enterprise is that it makes an agent's behavior legible.
An agent grounded in precise, scoped context leaves a trail. You can see what it asked, what it found, and what it read. That trail is the difference between an AI workflow you can put in front of an auditor and one you have to quietly keep out of regulated systems.
What an audit-ready agentic workflow looks like today
Sourcegraph's Deep Search returns an explicit list of sources with every answer: a record of which searches it ran and which files it read to reach its conclusion. That source list isn't a debugging nicety; it's an evidence trail. When an agent's reasoning is questioned, you can point to exactly what it consulted.
Underneath that, the Sourcegraph MCP server exposes discrete, named operations (read a file, search by keyword, jump to a definition) rather than an opaque "do the thing" interface. Every action an agent takes is a legible, individually observable event. Access is governed by repository permissions and scoped tokens: agents can only read the repositories a user is already permitted to see. Processing happens inside your own instance; the only external call is to the model itself. Put together, that's not just retrieval. It's a permissioned, observable record of what your agents touched.
Auditors want a timestamped, traceable answer grounded in real code and config changes: not just what changed and how, but why. It's the difference between "we modified this line" and "we added JWT claim enforcement on this endpoint because your audit found it missing, and here's the exact change that closed the gap."
That's Deep Search's value. It cites commit history, file paths, and code context, then ties them back to the reasoning behind each change, instead of relying on someone's memory or a stale Confluence doc. And the record is a concrete artifact: every conversation exports as a PDF you can hand to an auditor instead of asking them to take the agent's word for it. That does more than satisfy the control; it shortens the audit. The auditor doesn't have to poke around your environment piecing together what informed a change, because the sources and context are already laid out in a traceable line.
Exporting a Deep Search conversation as a PDF
Ask Deep Search the questions your auditors ask you
Change management / access control
- "Show me all commits touching the authentication service in the last audit period."

Deep Search groups every commit touching the authentication service by theme, with SHA, date, and author for each one
- "When did we implement the 'right to be forgotten' / user data deletion endpoint?"
- "Where is PII encrypted at rest, and when was that encryption added?"
- "Do we have code that logs or stores IP addresses without consent checks?"

Sourcegraph MCP server: the Deep Search tool in Claude Code, run against the public gitlab-org/gitlab repository
Security controls (SOC 2 / ISO 27001)
- "When was MFA enforcement added to the admin login flow?"
- "Where do we validate that access tokens expire, and what's the expiration window?"
- "Show me all places where secrets/API keys might be hardcoded instead of pulled from a vault."
PCI-DSS (payment data)
- "When was the last change to the payment processing module, and who approved it?"
- "Where does credit card data touch our codebase, and is it tokenized before storage?"

Deep Search traces credit card data from entry point to storage in the public gitlab-org/gitlab repository, naming the files and the fields that get hashed
SOX (financial controls)
- "Where is revenue recognition logic implemented, and when did it last change?"
HIPAA (healthcare)
- "Where is PHI access logged, and when was audit logging added?"
- "Do we have role-based access control gating PHI fields, and when was it introduced?"
Primary sources: SOC 2, ISO/IEC 27001, PCI-DSS, GDPR Article 17, HIPAA 45 CFR 164.312, SOX Section 404.
From productivity tool to system of record
The instinct is to evaluate a context engine as a developer-productivity tool: faster search, better answers, less time hunting through repos. That's real, but it undersells what matters most to the people signing off on enterprise AI.
For a security or platform leader, the context layer is also the audit and compliance layer for agentic development. It serves as the system of record for agent provenance, answering the questions regulators and risk teams actually ask: what did the agent read, and why did it act the way it did.
Once your organization shifts from experimenting with agents to depending on them, that answer stops being optional. The teams that can produce it are the ones that get cleared to use AI where the stakes are highest. It is the same shift that separates detection in one repo from an actual security posture: the capability is only worth what you can demonstrate across the whole codebase.
Ready to prove what your agents read? Book a demo.
*A special thanks to André Eleuterio, Dora Neumeier, Jamie Lindsay, Makenna Freauf, Matt Tanner, and Stephanie Jarmak for their contributions to this blog post.*
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み