Fix auto-detection of extractors that aren't languages #3015
Merged
henrymercer merged 3 commits intomainfrom Aug 7, 2025
Merged
Fix auto-detection of extractors that aren't languages #3015henrymercer merged 3 commits intomainfrom
henrymercer merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where the CodeQL Action was incorrectly auto-detecting extractors that aren't supported languages (like HTML, CSV, XML, etc.) when using codeql resolve languages. The fix reverts to using a hardcoded set of known languages as a temporary workaround.
- Adds a filter to only include extractors that are defined in the
KnownLanguageenum - Adds "actions" as a new known language and reorders the enum alphabetically
- Includes comprehensive test coverage for both specified and auto-detected unsupported extractors
Reviewed Changes
Copilot reviewed 8 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/languages.ts | Adds "actions" language and reorders KnownLanguage enum alphabetically |
| src/config-utils.ts | Adds filtering logic to exclude extractors that aren't in KnownLanguage enum |
| src/config-utils.test.ts | Adds test cases for HTML extractor filtering in both specified and auto-detected scenarios |
| package.json | Version bump to 3.29.8 |
| lib/ files | Compiled JavaScript output corresponding to TypeScript changes |
| CHANGELOG.md | Documents the bug fix for autodetection of unsupported languages |
mbg
approved these changes
Aug 7, 2025
cklin
approved these changes
Aug 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We tried to determine languages using
codeql resolve languages, but that actually gives us extractors, and not all extractors are supported languages. We probably want to change our definition to something like "a -queries pack exists" when doing autodetection, but to get this fixed quickly, this PR reverts back to a hardcoded set.Merge / deployment checklist