# waf_run_self_tests

运行内置 SQLi/XSS/命令注入/路径遍历样例，用于快速验证引擎是否检出攻击。

Agent View of the PolicyLayer registry record for `waf_run_self_tests`. HTML page: https://policylayer.com/tools/12211725-star-hospital-waf-mcp/waf-run-self-tests

## Facts

- Tool: `waf_run_self_tests`
- Server: Hospital WAF MCP (`12211725-star/hospital-waf-mcp`) — https://policylayer.com/tools/12211725-star-hospital-waf-mcp.md
- Homepage: https://github.com/12211725-star/hospital-waf-mcp
- Risk category: Execute (High risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "waf_run_self_tests",
    "arguments": {}
  }
}
```

## Why waf_run_self_tests is rated High

This tool executes pre-defined security test payloads against the WAF engine. While the payloads are curated samples rather than arbitrary code, the tool triggers execution of attack vectors (SQL injection, XSS, command injection, path traversal) through the system.

From the tool's own definition: "Tool description states it 'runs built-in SQLi/XSS/command injection/path traversal samples' (translated from Chinese: '运行内置 SQLi/XSS/命令注入/路径遍历样例'). The term '运行' (run) and the reference to executing test payloads indicates code/command execution."

## Use case

AI agents invoke waf_run_self_tests to trigger actions in Hospital WAF MCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Hospital WAF MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "waf_run_self_tests": {
      "limits": [
        {
          "counter": "waf_run_self_tests_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Hospital WAF MCP (3)

- `waf_check_request` — Read — https://policylayer.com/tools/12211725-star-hospital-waf-mcp/waf-check-request.md
- `waf_reload_rules` — Read — https://policylayer.com/tools/12211725-star-hospital-waf-mcp/waf-reload-rules.md
- `waf_rule_stats` — Read — https://policylayer.com/tools/12211725-star-hospital-waf-mcp/waf-rule-stats.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=12211725-star-hospital-waf-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/12211725-star-hospital-waf-mcp
