Loading…
Loading…
Main had a single `findById` using a parameterized query — a textbook example. A teammate opens a PR adding `searchUsers` and `deleteUserByName` for a new admin panel. You are the security champion. Walk the diff and find every injection.
SQL injection happens when user input ends up inside a SQL query as **code** instead of as a **parameter value**. Any string concatenation + SQL = potential injection. Red flags in code: - Template literals with `${...}` inside SQL - `.replace`, `+` used to build queries - Any user input that reaches SQL without going through `$1/$2/?` Walk the code and find every place where user data lands in a SQL string.