I followed the instructions in Configuring code scanning - GitHub Docs to set up code scanning for my public repo. I used CodeQL with GitHub Actions. At first it didn’t work, saying that auto build failed to detect how to build my code. I suspected this was because I was using a mono repo. I moved my code to a new repo where it was at the top level. But now CodeQL says it can’t build it with an error message that looks like it can’t build it because it’s Java 17:
Error: 0-17 06:57:28] [autobuild] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project apache-openwhisk-runtime-java-17: Fatal error compiling: error: invalid target release: 17 -> [Help 1]
Exit code 1 and error was: Picked up JAVA_TOOL_OPTIONS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false CommandInvocationError: Failure invoking /opt/hostedtoolcache/CodeQL/0.0.0-20211005/x64/codeql/java/tools/autobuild.sh with arguments . Exit code 1 and error was: Picked up JAVA_TOOL_OPTIONS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false at runTool (/home/runner/work/_actions/github/codeql-action/v1/lib/codeql.js:722:15) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Object.runAutobuild (/home/runner/work/_actions/github/codeql-action/v1/lib/codeql.js:460:13) at async runAutobuild (/home/runner/work/_actions/github/codeql-action/v1/lib/autobuild.js:29:5) at async run (/home/runner/work/_actions/github/codeql-action/v1/lib/autobuild-action.js:57:13) at async runWrapper (/home/runner/work/_actions/github/codeql-action/v1/lib/autobuild-action.js:70:9)
I wasn’t able to find a list of supported versions of programming languages in the documentation. Where can I find this information?
Also, I’m confused about why CodeQL needs my Java code to be compiled. I was under the impression it worked by looking for patterns in source code. Why would my source code need to be compiled? What use would it have for the compiled class files?