GitHub MCPサーバーによるAIコーディングエージェントでのシークレットスキャン
GitHubはMCP Serverを通じてAIコーディングエージェントがコード変更をコミット前に秘密情報スキャンできる機能をパブリックプレビューで提供開始し、クレデンシャル漏洩防止を強化した。
キーポイント
AIコーディングエージェント向け秘密情報スキャン機能の提供開始
GitHub MCP ServerがAIコーディングエージェント向けにコード変更の秘密情報スキャンを可能にし、コミット前やプルリクエスト作成前にクレデンシャル漏洩を防止する機能をパブリックプレビューで提供開始した。
MCP互換IDEとAIコーディングエージェントでの統合動作
MCP対応環境では、AIコーディングエージェントがユーザーのプロンプトに基づいて秘密情報スキャンを実行でき、GitHub秘密情報スキャンエンジンにコードを送信して構造化された結果を受け取ることができる。
GitHub Copilot CLIとVS Codeでの具体的な実装方法
GitHub Copilot CLIではcopilot --add-github-mcp-tool run_secret_scanningコマンド、Visual Studio Codeでは/secret-scanningプロンプトを使用して秘密情報スキャンを開始できる。
GitHub Secret Protection対応リポジトリ限定での提供
この機能は現在、GitHub Secret Protectionが有効なリポジトリでのみパブリックプレビューとして利用可能で、より高度なスキャン体験のためにGitHub Advanced Securityプラグインのインストールが推奨されている。
影響分析・編集コメントを表示
影響分析
この機能は、AI支援開発の普及に伴う新たなセキュリティリスクに対処する重要な進展であり、開発者がAIツールを使用しながらもセキュリティベストプラクティスを維持できる環境を提供する。MCPプロトコルを活用した標準化されたAIエージェント連携の実用例として、エコシステム全体の成熟度向上にも寄与する可能性がある。
編集コメント
AIコーディングツールの実用化が進む中、セキュリティ面での統合ソリューションが提供された点は業界の成熟を示す重要なマイルストーン。特にMCPプロトコルを介した標準化された連携は、今後のAI開発ツールエコシステムの方向性を示唆している。
GitHub MCP Serverを使用すると、コミットやプルリクエスト作成前に、コード変更をスキャンして公開されたシークレットを検出できるようになりました。MCP互換のIDEやAIコーディングエージェントでコーディング中にシークレットを検出することで、認証情報の漏洩を防止できます。この機能は、GitHub Secret Protectionが有効なリポジトリにおいて、現在パブリックプレビュー段階にあります。
仕組み
MCPが有効な環境では、AIコーディングエージェントは、ユーザーのプロンプトや指示に基づいてシークレットスキャンを実行できます。AIコーディングエージェントにシークレットをチェックするよう依頼すると、GitHub MCP Server上のシークレットスキャンツールが呼び出されます。AIコーディングエージェントはコードをGitHubのシークレットスキャンエンジンに送信し、応答には検出されたシークレットの位置と詳細を含む構造化された結果が返されます。
始め方
開発環境でGitHub MCP Serverをセットアップします。
(オプション)より特化したシークレットスキャンを体験するには、GitHub Advanced Securityプラグインをインストールします。例:
GitHub Copilot CLIでは、/plugin install advanced-security@copilot-plugins を実行します。
Visual Studio Codeでは、advanced-securityエージェントプラグインをインストールした後、Copilot Chatで /secret-scanning を使用してプロンプトを開始します。
コミット前に、エージェントに対して現在の変更点をスキャンし、公開されたシークレットをチェックするよう依頼してください。以下の点にご注意ください:
GitHub Copilot CLIでは、copilot --add-github-mcp-tool run_secret_scanning を使用して新規ツールを有効にします。
Visual Studio Codeでは、Copilot Chatで /secret-scanning に続けてプロンプトを入力することで開始できます。
以下は使用可能なプロンプトの例です:コミット前に現在の変更点をスキャンして公開されたシークレットを検出し、更新が必要なファイルと行を表示してください。
詳細情報
GitHubシークレットスキャン。
GitHub MCP Server。
GitHub MCP Serverのセットアップ。
GitHub Copilot CLIでのプラグインの検索とインストール。
Visual Studio Codeでのエージェントプラグインのインストール。
この投稿「GitHub MCP Serverを介したAIコーディングエージェントでのシークレットスキャン」は、The GitHub Blogで最初に公開されました。
原文を表示
The GitHub MCP Server can now scan your code changes for exposed secrets before you commit or open a pull request. This helps you prevent credential leaks by detecting secrets while you write code with MCP-compatible IDEs and AI coding agents. This feature is now in public preview for repositories with GitHub Secret Protection enabled.
How it works
In MCP-enabled environments, your AI coding agent can run secret scanning based on your prompts and instructions. When you ask your AI coding agent to check for secrets, it invokes the secret scanning tools on the GitHub MCP Server. Your AI coding agents send the code to the GitHub secret scanning engine, and the response includes structured results with the locations of and details on any secrets found.
Get started
Set up the GitHub MCP Server in your developer environment.
(Optional) Install the GitHub Advanced Security plugin for a more tailored secret scanning experience. For example:
In GitHub Copilot CLI, run /plugin install advanced-security@copilot-plugins.
In Visual Studio Code, install the advanced-security agent plugin, then use /secret-scanning in Copilot Chat to start your prompt.
Ask your agent to scan your current changes for exposed secrets before you commit. Note the following:
In GitHub Copilot CLI, use copilot --add-github-mcp-tool run_secret_scanning to enable the new tool.
In Visual Studio Code, you can use /secret-scanning followed by your prompt in Copilot Chat to start your prompt.
Here’s an example prompt you can use: Scan my current changes for exposed secrets and show me the files and lines I should update before I commit.
Learn more
GitHub secret scanning.
GitHub MCP Server.
Set up the GitHub MCP Server.
Find and install plugins in GitHub Copilot CLI.
Install agent plugins in Visual Studio Code.
The post Secret scanning in AI coding agents via the GitHub MCP Server appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み