You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello everyone! I want to use CodeQL to implement the following functions:
Given a package name, class name, and method name, I want to use this method as the Sink point (the Sink point is the method itself, not a parameter of the method), find all the source points of this method (the source is also a method, but I don't know the package name, class name, and method name of the method), and the corresponding path (the path is composed of methods). My current solution is to use the following template:
/**
* This is an automatically generated file
* @name Hello world
* @kind problem
* @problem.severity warning
* @id java/example/hello-world
*/
import java
from MethodCall mc
where mc.getCallee().hasQualifiedName("{package}", "{className}", "{methodName}")
select mc, "targetMethod"
I use Python to replace {package}, {className}, {Method} with my method, and then execute this ql file using Python to obtain the corresponding result. Finally, I replace {package}, {className}, {Method} with the result and execute this. ql file again until the result is empty.
But this method consumes a bit more time (on average, each project takes about 6 hours), and I need to analyze nearly 300 projects like this. Is there any way to reduce time consumption
Or can I use multithreading? However, due to the existence of locks , it seems that CodeQL does not support multithreading.
The text was updated successfully, but these errors were encountered:
This sort of question gets asked routinely and you can find quite a few issues about this with answers for them on this repository. For example, #17457 is a recent one with a number of answers.
hello everyone! I want to use CodeQL to implement the following functions:
Given a package name, class name, and method name, I want to use this method as the Sink point (the Sink point is the method itself, not a parameter of the method), find all the source points of this method (the source is also a method, but I don't know the package name, class name, and method name of the method), and the corresponding path (the path is composed of methods). My current solution is to use the following template:
I use Python to replace {package}, {className}, {Method} with my method, and then execute this ql file using Python to obtain the corresponding result. Finally, I replace {package}, {className}, {Method} with the result and execute this. ql file again until the result is empty.
But this method consumes a bit more time (on average, each project takes about 6 hours), and I need to analyze nearly 300 projects like this. Is there any way to reduce time consumption
Or can I use multithreading? However, due to the existence of locks , it seems that CodeQL does not support multithreading.
The text was updated successfully, but these errors were encountered: