mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Java: Exclude qualifier argument for existing models
Excludes candadites for `Argument[this]` where we already have a model that covers a different argument of the containing call.
This commit is contained in:
@@ -329,9 +329,10 @@ private class OtherArgumentToModeledMethodCharacteristic extends Characteristics
|
||||
|
||||
override predicate appliesToEndpoint(Endpoint e) {
|
||||
not ApplicationCandidatesImpl::isSink(e, _) and
|
||||
exists(DataFlow::Node otherSink |
|
||||
exists(DataFlow::Node otherSink, Call c |
|
||||
ApplicationCandidatesImpl::isSink(otherSink, _) and
|
||||
e.asExpr() = otherSink.asExpr().(Argument).getCall().getAnArgument() and
|
||||
c = otherSink.asExpr().(Argument).getCall() and
|
||||
e.asExpr() in [c.getQualifier(), c.getAnArgument()] and
|
||||
e != otherSink
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user