Replies: 3 comments 1 reply
-
@github/codeql-python Can you help here, please? |
Beta Was this translation helpful? Give feedback.
-
Hi @Faycal572 👋🏼 Apologies for the delayed response here. I have a few follow-up questions for you:
Running: import python
from Attribute t, FunctionValue f
select t.getName(), f.getName(), f.getScope().getLocation() as functionLocation Finds both |
Beta Was this translation helpful? Give feedback.
-
Hi @sidshank @RasmusWL 👋🏼 Thank you for your detailed response! I’m currently using CodeQL version 2.18.4. Your query works for me as well and captures both get and json. However, my main goal is to identify which specific json function is being called by pinpointing its exact location in the code, especially when there are multiple functions named json. Additionally, I tried the following query:
This query successfully returned that fetch_data calls json, but I haven't managed to generalize it to capture all functions at once. Thank you again for your response and assistance! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying to write a CodeQL query to analyze function calls in Python code, specifically the json() method from the requests library. Here's a simplified example of the code I want to analyze:
I downloaded the requests library locally, and I'm using the following queries to retrieve function and attribute information:
First query: codeql
Second query: codeql
I am able to retrieve most function calls, but for some reason, the call to response.json() is not being detected.
Any guidance would be greatly appreciated!
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions