codeql-action: CodeQL analyze error with exit code 2: running specific queries using a query suite
Hi CodeQL team,
I found this error occur just about a week ago. I don’t change anything in the codebase (because I set this workflow to run on master branch and master branch the last update is a week ago).
Right now this error is raised when my CodeQL run when the schedule time arrive
Error: Error running analysis for go: Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20210308/x64/codeql/codeql' failed with exit code 2
CodeQLAnalysisError: Error running analysis for go: Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20210308/x64/codeql/codeql' failed with exit code 2
at runQueries (/home/runner/work/_actions/github/codeql-action/v1/lib/analyze.js:113:19)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
name: 'CodeQLAnalysisError',
queriesStatusReport: {
analyze_builtin_queries_go_duration_ms: 92593,
analyze_failure_language: 'go'
}
}
I still have no idea why does this happens. If you need any additional information, feel free to provide me what you want. Thank you guys in advance.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (11 by maintainers)
Exactly the information I needed, thank you @ArielSAdamsNASA. Try the following in your
jpl.qls
query suite file:Each query’s ID can be found in the query metadata section at the top of the query file, starting with
@id
.To help you with future query suite writing:
@ArielSAdamsNASA thanks for asking. Could you please try changing your
jpl.qls
file toThe name expected in the
from
field is thename
of the query pack, which is defined in https://github.com/github/codeql/blob/main/cpp/ql/src/qlpack.yml.codeql-cpp
should also work in place ofcodeql/cpp-queries
, much like the examples earlier in this thread. That is the old name, and CodeQL handles both.