Commit 4b4fb79
committed
fix: Add table name whitelist to prevent SQL injection in project deletion
The DELETE query loop in Project.delete() interpolated table names directly into an f-string. Added an explicit whitelist with a validation check before each query to prevent SQL injection if table names ever become user-controlled. Flagged by Bandit (B608) and Semgrep.1 parent 468b85b commit 4b4fb79
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
929 | 933 | | |
930 | 934 | | |
931 | | - | |
932 | 935 | | |
| 936 | + | |
| 937 | + | |
933 | 938 | | |
934 | 939 | | |
935 | 940 | | |
| |||
0 commit comments