-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
codeql database:Uranusboy/log4j2-test
URL:
When I execute the following query in LGTM, I will be stuck at 61%, and the execution will fail later


import java
import semmle.code.java.dataflow.FlowSources
import DataFlow::PathGraph
class Context extends RefType{
Context(){
this.hasQualifiedName("javax.naming", "Context")
or
this.hasQualifiedName("javax.naming", "InitialContext")
}
}
predicate isLookup(Expr arg) {
exists(MethodAccess ma |
ma.getMethod().getName() = "lookup"
and
ma.getMethod().getDeclaringType() instanceof Context
and
arg = ma.getArgument(0)
)
}
class TainttrackLookup extends TaintTracking::Configuration {
TainttrackLookup() {
this = "TainttrackLookup"
}
override predicate isSource(DataFlow::Node source) { none() }
override predicate isSink(DataFlow::Node sink) {
exists(Expr arg |
isLookup(arg)
and
sink.asExpr() = arg
)
}
override int explorationLimit() { result = 17 }
}
from TainttrackLookup config, DataFlow::PartialPathNode sink,DataFlow::PartialPathNode node
where
config.hasPartialFlowRev(node,sink,17)
select sink.getNode(),node.getNode()
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested

