forked from core/php-mcp
Add Pest tests for SqlQueryValidator covering: - Allowed SELECT statements with WHERE, ORDER BY, LIMIT - Blocked data modification (INSERT, UPDATE, DELETE, TRUNCATE) - Blocked schema changes (DROP, ALTER, CREATE, RENAME) - Blocked permissions/admin (GRANT, REVOKE, FLUSH, KILL, SET) - Blocked execution (EXECUTE, PREPARE, CALL, DEALLOCATE) - Blocked file operations (INTO OUTFILE/DUMPFILE, LOAD_FILE/DATA) - SQL injection prevention: UNION attacks, stacked queries, time-based (SLEEP/BENCHMARK), encoding (hex/CHAR), subqueries, system table access, comment obfuscation - Query structure validation and whitelist configuration - Exception details and edge cases Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| SqlQueryValidatorTest.php | ||