analyzeDeleteStatement analyzes DELETE statements
(stmt *ast.DeleteStatement)
| 215 | |
| 216 | // analyzeDeleteStatement analyzes DELETE statements |
| 217 | func (a *SQLAnalyzer) analyzeDeleteStatement(stmt *ast.DeleteStatement) { |
| 218 | // Check for DELETE without WHERE clause |
| 219 | if stmt.Where == nil { |
| 220 | a.addSecurityIssue("DELETE_WITHOUT_WHERE", "CRITICAL", |
| 221 | "DELETE without WHERE clause will remove all rows from table", |
| 222 | "Always include WHERE clause in DELETE statements") |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | // analyzeJoinClause analyzes JOIN operations |
| 227 | func (a *SQLAnalyzer) analyzeJoinClause(join *ast.JoinClause) { |