Skip to content

Commit 714525a

Browse files
sophiethekingCopilotisaacmbrown
authored
[EDI] Setting up the CodeQL CLI (#59263)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
1 parent f1eda4a commit 714525a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

content/code-security/how-tos/scan-code-for-vulnerabilities/scan-from-the-command-line/setting-up-the-codeql-cli.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@ contentType: how-tos
2525

2626
{% data reusables.code-scanning.codeql-cli-version-ghes %}
2727

28-
To run {% data variables.product.prodname_codeql %} commands, you need to set up the CLI so that it can access
29-
the tools, queries, and libraries required to create and analyze databases.
28+
To run {% data variables.product.prodname_codeql %} commands, you need to set up the {% data variables.product.prodname_codeql_cli %} so that it can access the tools, queries, and libraries required to create and analyze databases.
3029

31-
The {% data variables.product.prodname_codeql_cli %} can be set up to support many different use cases and directory structures. To get started quickly, we recommend adopting a relatively simple setup, as outlined in the steps below.
30+
The {% data variables.product.prodname_codeql_cli %} supports a range of use cases and directory structures. This article walks through a simple setup that works for most users and environments.
3231

33-
If you plan to use the {% data variables.product.prodname_codeql_cli %} for security research or to test or contribute queries, you may want a more advanced setup of {% data variables.product.prodname_codeql_cli %}. For more information, see [AUTOTITLE](/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/advanced-setup-of-the-codeql-cli).
32+
If you plan to use the {% data variables.product.prodname_codeql_cli %} for security research or to test or contribute queries, you may need a more advanced setup. For more information, see [AUTOTITLE](/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/advanced-setup-of-the-codeql-cli).
3433

35-
If you are setting up the {% data variables.product.prodname_codeql_cli %} in your CI system, you need to make the full contents of the {% data variables.product.prodname_codeql_cli %} bundle available to every CI server that you want to run {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} analysis on. For example, you might configure each server to copy the bundle from a central, internal location and extract it. Alternatively, you could use the REST API to get the bundle directly from {% data variables.product.prodname_dotcom %}, ensuring that you benefit from the latest improvements to queries. For more information, see [AUTOTITLE](/rest/releases) in the REST API documentation.
34+
### Before you begin
3635

3736
If you are using macOS on Apple Silicon (for example, Apple M1), ensure that the [Xcode command-line developer
38-
tools](https://developer.apple.com/downloads/index.action) and [Rosetta 2](https://support.apple.com/en-us/HT211861) are installed.
37+
tools](https://developer.apple.com/library/archive/technotes/tn2339/_index.html) and [Rosetta 2](https://support.apple.com/en-us/HT211861) are installed.
3938

4039
> [!NOTE]
4140
> The {% data variables.product.prodname_codeql_cli %} is currently not compatible with non-glibc Linux distributions such as (muslc-based) Alpine Linux.
@@ -48,6 +47,15 @@ tools](https://developer.apple.com/downloads/index.action) and [Rosetta 2](https
4847

4948
Extract the {% data variables.product.prodname_codeql_cli %} tar archive to a directory of your choosing.
5049

50+
### Optional: Make the {% data variables.product.prodname_codeql_cli %} available in your CI system
51+
52+
If you plan to run {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} analysis in a CI system, ensure that the full contents of the {% data variables.product.prodname_codeql_cli %} bundle are available to every CI server that will run analysis.
53+
54+
For example, you can:
55+
56+
* Copy the bundle from a central internal location and extract it on each server, or
57+
* Use the REST API to download the bundle directly from {% data variables.product.prodname_dotcom %}, ensuring that you receive the latest improvements to queries. For more information, see [AUTOTITLE](/rest/releases).
58+
5159
### 3. Launch `codeql`
5260

5361
{% data reusables.codeql-cli.launch-codeql %}

0 commit comments

Comments
 (0)