devanvil_regex_test
Tests a regex pattern against sample text and statically checks for catastrophic ReDoS risk, running matches in an isolated 250ms sandbox.
Instructions
Analyze a regular expression for catastrophic ReDoS risk statically and execute it inside an isolated 250ms node:vm sandbox.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pattern": "<pattern>",
"text": "<text>"
},
"name": "devanvil_regex_test"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Test text to run the pattern against. | |
| flags | No | Regex flags (default "g"). | |
| pattern | Yes | Regex pattern. |