Suggestions from code review

This commit is contained in:
tiferet
2022-11-18 15:57:46 -08:00
parent 4a1382925e
commit 8d22fd25f1

View File

@@ -552,8 +552,7 @@ private class InIrrelevantFileCharacteristic extends StandardEndpointFilterChara
override predicate getEndpoints(DataFlow::Node n) {
// Ignore candidate sinks within externs, generated, library, and test code
ClassifyFiles::classify(n.getFile(), category) and
this = "in " + category + " file"
ClassifyFiles::classify(n.getFile(), category)
}
}
@@ -575,10 +574,9 @@ private class DatabaseAccessCallHeuristicCharacteristic extends NosqlInjectionSi
DatabaseAccessCallHeuristicCharacteristic() { this = "matches database access call heuristic" }
override predicate getEndpoints(DataFlow::Node n) {
exists(DataFlow::CallNode call | n = call.getAnArgument() |
exists(DataFlow::MethodCallNode call | n = call.getAnArgument() |
// additional databases accesses that aren't modeled yet
call.(DataFlow::MethodCallNode).getMethodName() =
["create", "createCollection", "createIndexes"]
call.getMethodName() = ["create", "createCollection", "createIndexes"]
)
}
}