Commit graph

3 commits

Author SHA1 Message Date
Claude
c908fff193
test: add comprehensive tests for ToolRegistry service
Covers getServers(), getToolsForServer(), getTool() lookup,
getToolsByCategory(), searchTools(), example input management,
category extraction, schema-based example generation, and cache
clearing. Uses Mockery partial mocks to isolate YAML loading.

Fixes #4

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:09:22 +00:00
Snider
41b8568d5c test(mcp): add comprehensive SQL Query Validator tests (P2-013)
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>
2026-01-29 19:38:40 +00:00
Snider
3ac43d834b
Initial commit 2026-01-26 20:49:02 +00:00