(t *testing.T)
| 194 | } |
| 195 | |
| 196 | func TestProtocol_CallTool_SecurityScan(t *testing.T) { |
| 197 | c := newInProcessClient(t) |
| 198 | ctx := context.Background() |
| 199 | |
| 200 | req := mcpmcp.CallToolRequest{} |
| 201 | req.Params.Name = "security_scan" |
| 202 | req.Params.Arguments = map[string]any{"sql": "SELECT * FROM users WHERE 1=1 OR ''=''"} |
| 203 | |
| 204 | result, err := c.CallTool(ctx, req) |
| 205 | if err != nil { |
| 206 | t.Fatalf("CallTool security_scan: %v", err) |
| 207 | } |
| 208 | |
| 209 | data := extractProtocolResult(t, result) |
| 210 | if data["is_clean"] == true { |
| 211 | t.Error("expected injection detection for tautology pattern") |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | func TestProtocol_CallTool_LintSQL(t *testing.T) { |
| 216 | c := newInProcessClient(t) |
nothing calls this directly
no test coverage detected