Skip to main content

This version of GitHub Enterprise was discontinued on 2023-01-18. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

CodeQL CLI reference

You can learn how to use CodeQL workspaces and CodeQL packs and how to understand the output of CodeQL commands.

GitHub CodeQL is licensed on a per-user basis upon installation. You can use CodeQL only for certain tasks under the license restrictions. For more information, see "About the GitHub CodeQL license."

If you have a GitHub Enterprise account and GitHub Advanced Security license, you can use CodeQL for automated analysis, continuous integration and continuous delivery. You can create an enterprise account by contacting the sales team. For more information, see "About GitHub Advanced Security."

  • Query reference files

    You can use query reference files to define the location of a query you want to run in tests.

  • CodeQL CLI SARIF output

    You can output SARIF from the CodeQL CLI and share static analysis results with other systems.

  • Exit codes

    Exit codes signify the status of a command after the CodeQL CLI runs it.