(t *testing.T)
| 206 | } |
| 207 | |
| 208 | func TestScan_DangerousFunction_LoadFile(t *testing.T) { |
| 209 | scanner := NewScanner() |
| 210 | |
| 211 | // Create AST with LOAD_FILE function call |
| 212 | selectStmt := &ast.SelectStatement{ |
| 213 | Columns: []ast.Expression{ |
| 214 | &ast.FunctionCall{ |
| 215 | Name: "LOAD_FILE", |
| 216 | Arguments: []ast.Expression{&ast.LiteralValue{Value: "/etc/passwd", Type: "STRING"}}, |
| 217 | }, |
| 218 | }, |
| 219 | } |
| 220 | |
| 221 | tree := &ast.AST{Statements: []ast.Statement{selectStmt}} |
| 222 | result := scanner.Scan(tree) |
| 223 | |
| 224 | if result.CriticalCount == 0 { |
| 225 | t.Error("expected at least one critical finding for LOAD_FILE function") |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | func TestScan_UnionWithNulls(t *testing.T) { |
| 230 | scanner := NewScanner() |
nothing calls this directly
no test coverage detected