You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Language autodetection selects a language that has no files in the checkout #4334
When the languages input is empty, init can autodetect a language that has no files in the checkout. analyze then fails for that language.
Steps to reproduce
Use a repository with only one Python file, plus code in another language.
Run github/codeql-action/init without the languages input.
Delete the Python file, or open a pull request that deletes it.
Expected behavior
The Action analyzes only languages that have source files in the checkout.
Actual behavior
init logs Autodetected languages: python, ..., and analyze fails with exit code 32:
CodeQL detected code written in ..., but not any written in Python.
Cause
getRawLanguagesInRepo in src/config-utils.ts uses only the GET /repos/{owner}/{repo}/languages API. That API reports the default branch's languages and updates in the background, so it does not describe the checked-out commit. #2609 describes the same Linguist behavior.
Activity
jketema commentedon Nov 20, 2026
Hi @therealsamyak,
Thanks for the report. This is a known limitation, and as you're figuring out on your proposed PR, this is non-trivial to fix.