My vulnerability scanner flagged this Java method as SQL injection: String id = request.getParameter("id"); // user input if (!id.matches("[0-9]+")) { // digits only, or throw throw new IllegalArgumentException("id must be numeric"); } String sql = "DELETE FROM products WHERE id = " + id; stmt.executeUpdate(sql); // flagged as SQL injection Look... Weiterlesen
Don't Let the AI Find Your Bugs. Let It Judge Them.
myDraft AI Intelligence Summary
My vulnerability scanner flagged this Java method as SQL injection: String id = request.getParameter("id"); // user input if (!id.matches("[0-9]+")) { // digits only, or throw throw new IllegalArgumentException("id must be numeric"); } String sql = "DELETE FROM products WHERE id = &qu...