This version of GitHub Enterprise was discontinued on 2023-07-06. 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.
Using the CodeQL CLI
You can use the CodeQL CLI to locally develop, test and run CodeQL queries on software projects.
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."
About the CodeQL CLI
You can use the CodeQL CLI to run CodeQL processes locally on software projects.
Getting started with the CodeQL CLI
To get started with the CodeQL CLI, you need to set up the CLI so that it can access the tools and libraries required to create and analyze databases.
Creating CodeQL databases
You can build a CodeQL database containing the data needed to query your code.
Extractor options
You can use the CodeQL CLI to run CodeQL processes locally on software projects.
Analyzing databases with the CodeQL CLI
You can run queries against a CodeQL database extracted from a codebase.
Using custom queries with the CodeQL CLI
You can write your own CodeQL queries to find specific vulnerabilities and errors.
Creating CodeQL query suites
You can create query suites for queries you frequently use in your CodeQL analyses.
Testing query help files
You can use the CodeQL CLI to preview your query help files as Markdown and ensure they are valid.
Specifying command options in a CodeQL configuration file
You can save default command options in a CodeQL configuration file.