Skip to main content
We publish frequent updates to our documentation, and translation of this page may still be in progress. For the most current information, please visit the English documentation.

This version of GitHub Enterprise was discontinued on 2023-03-15. 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 CodeQL CLI."

If you have a GitHub Advanced Security license, you can use CodeQL for automated analysis, continuous integration, and continuous delivery. 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.