---
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/test-xss-exposure/openclaw
---
# How to Test XSS Exposure with OpenClaw

OpenClaw runs penetration tests as automated, systematic security assessments that cover your entire web application attack surface in one sweep. Scan for injection flaws, authentication weaknesses, misconfigurations, and information disclosure across all your endpoints in a single session. Its automated approach is ideal for establishing regular security scanning cadences and generating consistent vulnerability reports that can be tracked over time.

## Setup

openclaw mcp add toolrouter -- npx -y toolrouter-mcp

## Steps

1. Connect ToolRouter: openclaw mcp add toolrouter -- npx -y toolrouter-mcp
2. Ask OpenClaw: "Test this application for XSS vulnerabilities"
3. OpenClaw probes inputs with XSS payloads
4. Review which fields are vulnerable
5. Fix output encoding and add CSP headers

## Example Prompt

```
Run XSS tests against https://staging.myapp.com. Check all user-facing input fields and URL parameters for script injection.
```

## Tips

- Always encode output based on the rendering context -- HTML, JavaScript, URL, or CSS each need different encoding
- Content Security Policy headers are a strong defense-in-depth measure against XSS
- Test both the initial rendering and any AJAX-loaded content for XSS
