CodeQL CLI reference

Find detailed information about the CodeQL commands, as well the files you can use or generate when executing CodeQL processes.

  • About QL packs: QL packs are used to organize the files used in CodeQL analysis. They contain queries, library files, query suites, and important metadata.
  • Query reference files: A query reference file is text file that defines the location of one query to test.
  • SARIF output: CodeQL supports SARIF as an output format for sharing static analysis results.
  • Specifying command options in a CodeQL configuration file: You can save default or frequently used options for your commands in a per-user configuration file.
  • Exit codes: The CodeQL CLI reports the status of each command it runs as an exit code. This exit code provides information for subsequent commands or for other tools that rely on the CodeQL CLI.