Skip to content

Fix auto-detection of extractors that aren't languages #3015

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

Merged
merged 3 commits into from
Aug 7, 2025

Conversation

henrymercer
Copy link
Contributor

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

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner August 7, 2025 20:15
@Copilot Copilot AI review requested due to automatic review settings August 7, 2025 20:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 KnownLanguage enum
  • 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

@henrymercer henrymercer enabled auto-merge August 7, 2025 20:25
@henrymercer henrymercer merged commit 6fe50b2 into main Aug 7, 2025
282 checks passed
@henrymercer henrymercer deleted the henrymercer/language-autodetection-workaround branch August 7, 2025 20:28
@github-actions github-actions bot mentioned this pull request Aug 8, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants