The Wayback Machine - http://web.archive.org/web/20260108063917/https://github.com/github/codeql/issues/8545
Skip to content

When I execute the following query in LGTM, I will be stuck at 61%, and the execution will fail later #8545

@ernongxizhu

Description

@ernongxizhu

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
image
image

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

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions