Skip to content

JavaScript extractor ignores html files although docs (and code) say it may also be analyzed #21048

@avwolferen

Description

@avwolferen

Given the fact that I specify the languages to scan manually, for specific reasons.
Since 2.23.8 finalizing the javascript database now fails because it did not find any suitable file to extract from.

If I take a look at the documentation available at https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/#id9 I see that for the language JavaScript it should also be able to analyze html files (they might contain JavaScript). Given that I should be able to perform code scanning on javascript based on the presence of html files in my sources.

Because in version 2.23.8 the implementation has been changed, it now fails to finalize the javascript database.

if (!seenFiles || !hasSeenCode() && !EnvironmentVariables.isActionsExtractor()) {

In the autobuild for JavaScript I do see a bunch of filetypes being added, but they are not detected in the extract phase.

// but include HTML, JavaScript, YAML and (optionally) TypeScript

In the fileextractor for JavaScript I do see a bunch of extensions being added for HTML. Which is misleading.

HTML(".htm", ".html", ".xhtm", ".xhtml", ".vue", ".hbs", ".ejs", ".njk", ".erb", ".jsp", ".dot") {

Can you please clarify this?

note:
In the default setup of code scanning the detected languages on the repository are used. If you only happen to have html files in your repository it will not "detect" the JavaScript language, code scanning will simply ignore them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions