Skip to content

Commit 3a75c0f

Browse files
committed
Refactor DatabaseInput to MaD
1 parent 655470f commit 3a75c0f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

java/ql/lib/ext/java.sql.model.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,8 @@ extensions:
4545
- ["java.sql", "ResultSet", "getTimestamp", "(String)", "summary", "manual"] # taint-numeric
4646
- ["java.sql", "Timestamp", "Timestamp", "(long)", "summary", "manual"] # taint-numeric
4747
- ["java.sql", "Timestamp", "getTime", "()", "summary", "manual"] # taint-numeric
48+
- addsTo:
49+
pack: codeql/java-all
50+
extensible: sourceModel
51+
data:
52+
- ["java.sql", "ResultSet", True, "getString", "", "", "ReturnValue", "database", "manual"]

java/ql/lib/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ deprecated class DatabaseInput = DbInput;
286286
* A node with input from a database.
287287
*/
288288
private class DbInput extends LocalUserInput {
289-
DbInput() { this.asExpr().(MethodAccess).getMethod() instanceof ResultSetGetStringMethod }
289+
DbInput() { sourceNode(this, "database") }
290290

291291
override string getThreatModel() { result = "database" }
292292
}

0 commit comments

Comments
 (0)