Commit 065774a
MAESTRO: Fix SQL injection vulnerability in order_by parameter
SEC-001: SQL Injection via order_by Parameter (HIGH severity)
Added ALLOWED_ORDER_COLUMNS frozenset as an allowlist for permitted
column names in the ORDER BY clause. The query() method now validates
order_by against this allowlist and defaults to "timestamp" if an
invalid value is provided.
This prevents SQL injection attacks where malicious input like
'timestamp; DROP TABLE traffic_logs; --' could be injected.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent dcc0401 commit 065774a
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
307 | 314 | | |
308 | 315 | | |
309 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
310 | 321 | | |
311 | 322 | | |
312 | 323 | | |
| |||
0 commit comments