Skip to content

Does codeql database creation depend on where codeql is invocated? (interpreted languages) #488

Answered by tausbn
Naman-ntc asked this question in Q&A
Discussion options

You must be logged in to vote

During extraction, we follow import statements using the machinery that Python provides. This means that changes to sys.path may not be detected, depending on where and how they are applied.

As a rule of thumb, the extractor mostly concerns itself with making sure that all the relevant files have been extracted. Assigning a meaning to the things that have been extracted is mostly done in the CodeQL libraries. For instance, if a Python file starts with a #! /usr/bin/python line, then we treat it as if it is an entry point, and modify things like module names accordingly. In some cases this may result in a module having multiple distinct names, depending on which entry point is used during …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@Naman-ntc
Comment options

@tausbn
Comment options

tausbn Nov 22, 2021
Collaborator

Answer selected by Naman-ntc
Comment options

You must be logged in to vote
1 reply
@tausbn
Comment options

tausbn Nov 23, 2021
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants