Skip to content

Commit 93507a2

Browse files
author
Stephan Brandauer
committed
combine two implementations for database-accesses as remote flow sources
1 parent 63aaf24 commit 93507a2

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

javascript/ql/lib/semmle/javascript/heuristics/AdditionalSources.qll

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,13 @@ class RemoteServerResponse extends HeuristicSource, RemoteFlowSource {
5353
override string getSourceType() { result = "a response from a remote server" }
5454
}
5555

56-
/**
57-
* The data read from a database.
58-
*/
59-
class DatabaseAccessResultRemoteFlowSource extends HeuristicSource, RemoteFlowSource {
60-
DatabaseAccessResultRemoteFlowSource() { exists(DatabaseAccess dba | this = dba.getAResult()) }
61-
62-
override string getSourceType() { result = "Database query result" }
63-
64-
override predicate isUserControlledObject() { any() }
65-
}
66-
6756
/**
6857
* A remote flow source originating from a database access.
6958
*/
7059
private class RemoteFlowSourceFromDBAccess extends RemoteFlowSource, HeuristicSource {
7160
RemoteFlowSourceFromDBAccess() {
72-
this = ModelOutput::getASourceNode("database-access-result").getAUse()
61+
this = ModelOutput::getASourceNode("database-access-result").getAUse() or
62+
exists(DatabaseAccess dba | this = dba.getAResult())
7363
}
7464

7565
override string getSourceType() { result = "Database access" }

0 commit comments

Comments
 (0)