Run the query to show all function calls with name “eval”. Check out the subsection “Available types and predicates on types” and use the ideas to explore available types and predicates in the query.
- Got to the 'Explorer' tab and create a new file in the
codeql-custom-queries-python
folder. Call the filecall-eval.ql
and copy the below query into the file.
import python
from Call c, Name name
where name.getId() = "eval" and
c.getFunc() = name and
c.getLocation().getFile().getRelativePath().regexpMatch("2/challenge-1/.*")
select c
- Right click anywhere in the writing area of the query file and choose "CodeQL: Run Query on Selected Database"