Code scanning with CodeQL supports Java 21
Summary
The CodeQL analysis engine for GitHub code scanning will be able to analyze projects built with Java 21.
Intended Outcome
Currently, CodeQL supports Java language features up to Java 20. Java version 21 is due to be released before the end of 2023. Adding support to CodeQL will allow users of Java 21 to benefit from CodeQL's comprehensive security analysis.
How will it work?
If a project contains code that uses Java 21 language features, CodeQL will be able to scan the code. As soon as the analysis is finished, the CodeQL results will become visible to you in the "Security" tab and on pull requests. Java 21 support will also be available through the CodeQL CLI and CodeQL VS Code extension.
🚢 This has shipped: https://github.blog/changelog/2023-12-13-codeql-2-15-4-performance-improvements-and-updated-language-support/.
Leaving open to track GHES release.
🚢 This has shipped with GHES 3.12: https://docs.github.com/en/[email protected]/admin/release-notes