---
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-sql-injection/copilot
---
# How to Check SQL Injection 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: "Test my app for SQL injection vulnerabilities" and provide the URL
3. Copilot runs injection tests and returns vulnerable endpoints
4. Ask: "Rewrite these vulnerable queries as parameterized statements"
5. Apply the safe query patterns directly in your code

## Example Prompt

```
Test http://localhost:3000 for SQL injection. Then show me how to fix any vulnerable queries in my Express/Postgres codebase.
```

## Tips

- Copilot can refactor vulnerable raw SQL to parameterized queries in place
- Add SQL injection test cases to your test suite to prevent regressions
- Review all raw SQL strings in your codebase for potential injection points
