Skip to content

Ignore HTML-only files in CodeQL scan - #41

Merged
vpaturet merged 1 commit into
masterfrom
fix/codeql-ignore-html
Oct 12, 2026
Merged

vpaturet merged 1 commit into
masterfrom
fix/codeql-ignore-html

Conversation

@vpaturet

@vpaturet vpaturet commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Code Scan / codeql-analysis (javascript-typescript) job fails on every PR and on the weekly scheduled run on master (failing since April 2026):

ERROR: CodeQL detected code written in Java/Kotlin, GitHub Actions and HTML, but not any written in JavaScript/TypeScript.

The shared entur/gha-security code-scan workflow derives the CodeQL language matrix from file extensions and maps .htm/.html to javascript-typescript. This repository only contains the two bundled SIRI example files src/main/resources/siri-2.0/examples/index.htm and src/main/resources/siri-2.1/examples/index.htm, with no JavaScript or TypeScript. Since CodeQL 2.23.5 the JavaScript extractor refuses to finalize a database with no JS/TS source (github/codeql#21048).

Fix

Pass ignore_language: "html" to the shared workflow, as documented in its README. The language detector then drops the javascript-typescript matrix entry when the scan would be HTML-only. The java and actions scans are unchanged.

Example of a failing run: https://github.com/entur/siri-java-model/actions/runs/38245521102

@vpaturet vpaturet changed the title ci: ignore HTML-only files in CodeQL scan Ignore HTML-only files in CodeQL scan Oct 12, 2026
The shared entur/gha-security code-scan workflow maps .htm/.html files to the
javascript-typescript CodeQL language. This repository only has the two bundled
SIRI example index.htm files and no JavaScript or TypeScript, so since CodeQL
2.23.5 the javascript-typescript job fails with "CodeQL detected code written
in Java/Kotlin, GitHub Actions and HTML, but not any written in
JavaScript/TypeScript" (github/codeql#21048). The weekly master scan has
failed this way since April 2026 and it also fails on every PR.

Setting ignore_language to html makes the shared workflow drop the
javascript-typescript matrix entry when the scan would be HTML-only, as
documented in gha-security README-code-scan.md. The java and actions scans
are unchanged.
@vpaturet
vpaturet force-pushed the fix/codeql-ignore-html branch from d7d21f3 to da3a7ea Compare October 12, 2026 12:27
@vpaturet
vpaturet merged commit c5bbf31 into master Oct 12, 2026
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.

1 participant