How They Use AI  |  Newest

<< Home  |  Work

Prevented accidental commit of API keys twice

AreaWork
AI usedGitHub Copilot
Sourcer/mcp
Posted2025-12-09

The move

Use the DiffPilot MCP server to review local code diffs and scan for secrets before pushing.

Steps

  1. Install the DiffPilot extension from the VS Code Marketplace.
  2. Open your project in VS Code and checkout your feature branch.
  3. Open Copilot Chat and type @workspace #find_secrets to scan for sensitive data.
  4. Use @workspace #review_code to get a code review of your current branch against main.

Prompt for your AI

Review my current branch changes against the main branch. Focus specifically on [security vulnerabilities and error handling].

What happened

The developer needed to review code changes without creating a GitHub PR or using cloud-based tools. They built DiffPilot, an MCP server that allows Copilot to analyze local git diffs directly in VS Code. This tool enabled them to catch API keys before committing them to the repository.

Watch out

Ensure your local environment is configured correctly to allow MCP server execution. Always double-check sensitive files manually as a secondary precaution.

Give it to your agent

Read https://howtheyuse.ai/p/prevented-accidental-commit-of-api-keys-twice.md and help me do this.

Sources



Last updated November 26, 2026.