New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeQL python scan failing #16370
Comments
Hi @infa-aksharma, we can analyze code written for Python 3.6, but to run the extractor you must use at least Python 3.7. |
Thanks @RasmusWL Is there a configuration option available to execute the scan on Python 3.6 while disabling the extractors? I'm dealing with legacy code that specifically requires Python 3.6 compatibility. I'm exploring whether there's a way to scan it without the extractors, but if not, I'll need to exclude the code from scanning altogether. |
You'll need to give a bit more context before I can help you. From what you've said so far, I assume you're not using codeql-action on GitHub Actions to run codeql, but do so manually on your own CI infrastructure? (if so, for running the codeql analysis, you will need to use an installation of Python 3.7+ to run the extractor. it's perfectly viable to have multiple python versions installed at the same time, see pyenv as an example) |
Thanks @RasmusWL
Is there any way for me to keep CodeQL to the latest version and still support python3.6? While i understand the likely answer is No. I want to double check and confirm that I'm not missing any potential solution. Thanks again for your help. |
CodeQL python scan failing
Running codelql database command fails with error below:
codeql database create . --threads=16 --mode=light --db-cluster --language=python --codescanning-config=.github/codeql/codeql-config.yml --no-run-unnecessary-builds --overwrite Initializing databases at ./codeql_databases. Running build command: [] Running command : [/opt/codeql/python/tools/autobuild.sh] [2024-05-01 00:07:42] [build-stderr] ERROR: Python 3.7 or later is required (currently running 3.6) [2024-05-01 00:07:42] [ERROR] Spawned process exited abnormally (code 1; tried to run: [/opt/codeql/python/tools/autobuild.sh]) A fatal error occurred: Exit status 1 from command: [/opt/codeql/python/tools/autobuild.sh]
CodeQL version:2.17.0
Python version 3.6
Does that mean, codeql scans aren't supported using python 3.6?
The text was updated successfully, but these errors were encountered: