Skip to content

Commit 8d22fd2

Browse files
committed
Suggestions from code review
1 parent 4a13829 commit 8d22fd2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

javascript/ql/experimental/adaptivethreatmodeling/lib/experimental/adaptivethreatmodeling/EndpointCharacteristics.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,8 +552,7 @@ private class InIrrelevantFileCharacteristic extends StandardEndpointFilterChara
552552

553553
override predicate getEndpoints(DataFlow::Node n) {
554554
// Ignore candidate sinks within externs, generated, library, and test code
555-
ClassifyFiles::classify(n.getFile(), category) and
556-
this = "in " + category + " file"
555+
ClassifyFiles::classify(n.getFile(), category)
557556
}
558557
}
559558

@@ -575,10 +574,9 @@ private class DatabaseAccessCallHeuristicCharacteristic extends NosqlInjectionSi
575574
DatabaseAccessCallHeuristicCharacteristic() { this = "matches database access call heuristic" }
576575

577576
override predicate getEndpoints(DataFlow::Node n) {
578-
exists(DataFlow::CallNode call | n = call.getAnArgument() |
577+
exists(DataFlow::MethodCallNode call | n = call.getAnArgument() |
579578
// additional databases accesses that aren't modeled yet
580-
call.(DataFlow::MethodCallNode).getMethodName() =
581-
["create", "createCollection", "createIndexes"]
579+
call.getMethodName() = ["create", "createCollection", "createIndexes"]
582580
)
583581
}
584582
}

0 commit comments

Comments
 (0)