By · Last updated 2026-04-05

ブログに戻るAIセキュリティ

CursorとClaudeを使用してコードベースを漏らさずに開発するためのガイド

Cursorはデフォルトで.envファイルをAIコンテキストに読み込みます。ある金融サービス企業は、独自の取引アルゴリズムがAIアシスタントに送信された結果、1200万ドルを失いました。2025年第4四半期にMCPの採用が340%急増しました — 開発者AIを安全にするアーキテクチャはこちらです。

April 5, 20269 分で読めます
Cursor AI securitydeveloper credential leakMCP Server protectionClaude Code securitycodebase privacy

CursorがAIコンテキストに読み込むもの

CursorはデフォルトでJSONおよびYAML設定ファイルをAIコンテキストに読み込みます。これらのファイルには、クラウドトークン、データベースパスワード、デプロイ設定が含まれることが多くあります。

リスクは不注意な使用から生じるのではありません。デフォルト設定から生じます。設定ファイルに触れるAI支援コーディングセッションはすべて、それらのファイルをAnthropicまたはOpenAIのサーバーに送信する可能性があります。

開発者の意図は正当です。AIにデータベースクエリを最適化するよう依頼します。クエリには接続文字列があります。AIはそれを見ます。これが漏洩です。通常の作業の副作用です。ポリシーのルールだけでは確実に防ぐことはできません。

だからこそ、Model Context Protocolツールの採用は2025年Q4に企業環境で340%急増しました。チームには技術的な解決策が必要です。新しいポリシー文書では不十分です。

1,200万ドルの代償

ある金融サービス会社が独自の取引アルゴリズムのコントロールを失いました。アルゴリズムはコードレビューセッション中にAIアシスタントのサーバーに送信されました。

推定コスト:1,200万USD(IBM Cost of Data Breach 2025、従業員数10,000人超の組織)。同社は情報漏洩を取り消すことができませんでした。送信されたすべてのファイルを監査する必要がありました。営業秘密リスクについて法律顧問を雇いました。競合上の損害評価を実施しました。

これは最悪のケースです。一般的なケースはより小規模ですが、急速に積み重なります。APIキーはAIチャットログに出現した後にローテーションされます。データベースパスワードはツール履歴に表示された後に変更されます。OAuthトークンは画面録画で捕捉された後に取り消されます。各ステップにはスタッフの時間がかかります。コストは実在し、ほとんど追跡されません。

匿名化レイヤーの仕組み

Model Context Protocol(MCP)はAIクライアントとAIモデルAPIの間にレイヤーを追加します。すべてのリクエストはモデルに到達する前に匿名化エンジンを通過します。

保護なし: 開発者がマイグレーションスクリプトを書きます。接続文字列があります:postgres://admin:password@host:5432/db。AIモデルはその文字列をそのまま受け取ります。

匿名化レイヤーあり: エンジンがその文字列を検出します。トークン — [DB_CONN_1] に置き換えます。モデルはスクリプトの構造とロジックを見ます。認証情報はローカルに残ります。

可逆暗号化オプションはさらに進みます。顧客IDと製品コードが暗号化され、決定論的なトークンに置き換えられます。AIはそれらのトークンを使用したレスポンスを返します。サーバーはレスポンスを復号化し、実際の値にトークンを戻します。開発者は実際の識別子を読みます。AIモデルはそれを見ませんでした。

セットアップと開発者エクスペリエンス

開発チームにとって、セットアップは一度きりの作業です。CursorとClaude Codeはローカルプロキシサーバーを経由するように設定されます。サーバー設定により、インターセプトするエンティティタイプを定義します:

  • APIキー
  • データベース接続文字列
  • 認証トークン
  • AWS、Azure、GCP認証情報
  • 秘密鍵ヘッダー

チームは内部サービス名や独自の識別子形式に合わせたカスタムパターンを追加できます。

開発者側では何も変わりません。オートコンプリート、コードレビュー、デバッグ支援、ドキュメント生成はすべて以前と同様に機能します。プロキシはバックグラウンドで静かに動作します。

Checkpoint Researchの2025年の分析は、開発者認証情報の漏洩をAIコーディングツール展開における最も影響の大きいリスクとして特定しました。これがまさにこのアーキテクチャが解決する問題です。技術的な解決策であり、ポリシーのリマインダーではありません。

詳細はセキュリティ概要コンプライアンスドキュメントをご覧ください。インターセプトされるデータタイプの完全なリストについては、エンティティ検出ガイドもご参照ください。

出典

データを保護する準備はできましたか?

48言語で285以上のエンティティタイプを使用してPIIを匿名化し始めましょう。

About this page

We update this page when our platform or the law changes.

Read our founder note for how we work.

Each change shows up in the timestamp at the top.

Related reading

We follow these rules

  • GDPR (EU 2016/679).
  • ISO/IEC 27001:2022.
  • NIS2 (EU 2022/2555).
  • HIPAA safe harbor under 45 CFR § 164.514(b)(2).

Our promise

We do not sell your data.

We do not train models on your text.

We store your files in Germany.

You can delete your account at any time.

You own your work.

Where we run

Our servers live in Falkenstein, Germany.

We use Hetzner. They hold ISO 27001 certification.

All data stays in the EU.

Backups run every day.

Need help?

Email support@anonym.legal.

We reply within one business day.

How we test

We run a full check suite on every release.

Each surface gets its own sweep script and report.

Human reviewers spot-check the output each week.

We track recall and precision on a labelled set.

Bad runs block the deploy.

What we never do

  • We never sell your information to third parties.
  • We never train models on what you upload.
  • We never keep your work after you delete it.
  • We never share keys with any outside firm.
  • We never run ads inside the product.

Plans in plain words

We sell credits, not seats.

One credit covers one short job.

Long jobs use a few credits each.

You can top up at any time.

Unused credits roll over each month.

Read the plans page for current rates.

Who built this

A small team of engineers and lawyers built this.

We ship from Europe and work in the open.

Our founder note spells out why we started.

Where to start

How the parts fit

A browser add-on cleans text inside Chrome.

A Word plug-in handles drafts in Office.

A small desktop tool works on whole folders.

An agent protocol link feeds large models safely.

All four share one core engine and one rule set.

Words from our team

We started this work after a lunch about cookies.

One friend kept getting odd ads on her phone.

We asked why a court file leaked through a draft.

We sketched the first build on a napkin that week.

By month three we had a tiny demo for a friend.

She used it on her first case the next day.

Common questions we hear

Can the tool read scanned PDFs? Yes, with OCR.

Does it work on long files? Yes, in small chunks.

Can I roll my own rule set? Yes, save it as a preset.

Does it run offline? The desktop build runs offline.

Do you keep my files? No, the cloud build wipes after each run.

Will it learn from my work? No, we never train on inputs.

A short tour of the workflow

Upload a file or paste a snippet of prose.

Pick the entities you want gone from the draft.

Choose a method: replace, mask, hash, encrypt, or redact.

Press run and watch the side panel show each hit.

Skim the result and tweak any rule that misfired.

Save the cleaned file or send it to a teammate.