{
"event": "PreToolUse",
"tool_name": "Bash",
"tool_input": {
"command": "php -r \"\n\\$pattern = '\/https?:\\\\\/\\\\\/[^:]+:[^@]+@\/i';\n\n\\$test_urls = [\n \\\"https:\/\/api.anthropic.com\/v1\\\",\n \\\"http:\/\/localhost:11434\\\",\n \\\"http:\/\/localhost:6333\\\",\n \\\"http:\/\/user:password@example.com\\\", \/\/ This SHOULD match\n];\n\nforeach (\\$test_urls as \\$url) {\n \\$matches = preg_match(\\$pattern, \\$url);\n echo \\\"\\$url => \\\" . (\\$matches ? 'MATCH' : 'NO MATCH') . \\\"\\\\n\\\";\n}\n\"",
"description": "Test URL regex pattern"
}
}
{
"tool_response": {
"stdout": "https:\/\/api.anthropic.com\/v1 => NO MATCH\nhttp:\/\/localhost:11434 => NO MATCH\nhttp:\/\/localhost:6333 => NO MATCH\nhttp:\/\/user:password@example.com => MATCH",
"stderr": "",
"interrupted": false,
"isImage": false
}
}