github / github/codeql

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

Aberta
#21,048 4 comentários 0 reações 0 responsáveis Ver no GitHub
question
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

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. https://github.com/github/codeql/blob/c4d23d16edfde2566c4986e4dd7b7a177940886d/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java#L493

In the autobuild for JavaScript I do see a bunch of filetypes being added, but they are not detected in the extract phase. https://github.com/github/codeql/blob/c4d23d16edfde2566c4986e4dd7b7a177940886d/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java#L388

In the fileextractor for JavaScript I do see a bunch of extensions being added for HTML. Which is misleading.
https://github.com/github/codeql/blob/d709343d38f921d5beccf530dc0a0b30a6680a12/javascript/extractor/src/com/semmle/js/extractor/FileExtractor.java#L106

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.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.