mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
feat(three-stage-scan): add split-sink fixtures the regex scan misses
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package example;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.sql.Connection;
|
||||
|
||||
class SplitSinkServlet {
|
||||
void search(HttpServletRequest request, Connection connection) throws Exception {
|
||||
String term = request.getParameter("q");
|
||||
String sql = String.format("select * from items where title like '%%%s%%'", term);
|
||||
connection.createStatement().executeQuery(sql); // CWE-89 split-sink: sql built on prior line (regex blind spot)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user