Replies: 3 comments
-
Hi @timh1975 👋🏻 It would be good to know what you have tried so far and have a bit more information about what you are trying to accomplish? In any case, you may find the documentation about API graphs useful. E.g. the following should find you calls to import python
import semmle.python.ApiGraphs
select API::builtin("insert").getACall() |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick response. The example I included isnt in a function. I've tried your example and I am getting no responses back from the query. These are the libaries that I have in .lock.yml file lockVersion: 1.0.0 I'm am also using custom build queries. I've a;readu tried a basic function that looks for a function called hello that works. /**
import python from Function f thanks again in advance |
Beta Was this translation helpful? Give feedback.
-
I've managed to figure out a way of doing this /**
import semmle.python.dataflow.new.internal.DataFlowPublic from MethodCallNode insertCall, File file |
Beta Was this translation helpful? Give feedback.
-
Hello!
I'm trying to write a custom CodeQL query for Python that finds and outputs that the method x.insert is found. X refers to an array.
a = []
for x in range(1, 1000000):
random_number = random.randint(0,255)
a.insert(x,random_number)
However, I'm not able to find out how do this.
Beta Was this translation helpful? Give feedback.
All reactions