Skip to main content

Using the advanced functionality of the CodeQL CLI

You can use the CodeQL CLI to locally develop, test and run CodeQL queries on software projects.

Who can use this feature?

CodeQL is available for the following repository types:

Creating CodeQL query suites

You can create query suites for queries you frequently use in your CodeQL analyses.

Testing custom queries

You can set up tests for your CodeQL queries to ensure that they continue to return the expected results with new releases of the CodeQL CLI.

Creating and working with CodeQL packs

You can use CodeQL packs to create, share, depend on, and run CodeQL queries and libraries.

Publishing and using CodeQL packs

You can publish your own CodeQL packs and use packs published by other people.

CodeQL CLI SARIF output

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

CodeQL CLI CSV output

You can output results from the CodeQL CLI in CSV format to share with other systems.

Extractor options

You can use the CodeQL CLI to run CodeQL processes locally on software projects.

Exit codes

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