---
title: ToolRouter — Agent Use Case Guide
description: Step-by-step guide for completing a task with a specific AI agent using ToolRouter.
url: https://toolrouter.com/tools/pentest/use-cases/check-information-disclosure/copilot
---
# How to Check Information Disclosure with Copilot

Copilot integrates penetration testing directly into your development workflow, letting you scan for vulnerabilities and generate fix code without leaving your IDE. Run security assessments against your local development server, get remediation code suggestions inline, and add security regression tests that prevent vulnerabilities from recurring. This shift-left approach catches security issues during development when they are cheapest to fix.

## Setup

{"mcpServers":{"toolrouter":{"command":"npx","args":["-y","toolrouter-mcp"]}}}

## Steps

1. Add ToolRouter to Copilot MCP config
2. In Copilot Chat: "Check my app for information disclosure vulnerabilities"
3. Copilot scans for exposed information and returns findings
4. Ask: "Add proper error handling to hide internal details"
5. Apply fixes to error handlers and response serializers

## Example Prompt

```
Check http://localhost:3000 for information disclosure. Then help me set up proper error handling that hides stack traces and internal details.
```

## Tips

- Copilot can add environment-aware error handling that shows details in dev but hides them in production
- Review your .gitignore to ensure sensitive files are not being deployed
- Add API response serializers that explicitly whitelist fields instead of returning entire objects
