You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
language to the GitHub code scanning API. For more information about this use case,
64
68
see `Configuring CodeQL CLI in your CI system <https://docs.github.com/en/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system>`__ in the GitHub documentation.
65
69
66
-
- ``--sarif-add-query-help``: (supported in version 2.7.1 onwards) adds any custom query help written
67
-
in markdown to SARIF files (v2.1.0 or later) generated by the analysis. Query help stored in ``.qhelp`` files must be
68
-
converted to ``.md`` before running the analysis. For further information,
70
+
- ``--sarif-add-query-help``: (supported in version 2.7.1 onwards) adds any custom query help written
71
+
in markdown to SARIF files (v2.1.0 or later) generated by the analysis. Query help stored in ``.qhelp`` files must be
72
+
converted to ``.md`` before running the analysis. For further information,
69
73
see ":ref:`Including query help for custom CodeQL queries in SARIF files <including-query-help-for-custom-codeql-queries-in-sarif-files>`."
70
74
75
+
- ``--download``: a boolean flag that will allow the CLI to download any referenced CodeQL packages that are not available locally.
76
+
If this flag is missing and a referenced CodeQL package is not available locally, the command will fail.
The ``analyze`` command above runs the default suite from ``microsoft/coding-standards v1.0.0`` and the latest version of ``scope/other-pack`` on the specified database.
134
+
The ``analyze`` command above runs the default suite from ``microsoft/coding-standards v1.0.0`` and the latest version of ``github/secutiry-queries`` on the specified database.
131
135
For further information about default suites, see ":ref:`Publishing and using CodeQL packs <publishing-and-using-codeql-packs>`".
132
136
137
+
For more information about CodeQL packs, see :doc:`About CodeQL Packs <about-codeql-packs>`.
138
+
133
139
Running query suites
134
140
~~~~~~~~~~~~~~~~~~~~
135
141
@@ -176,7 +182,7 @@ Integrating a CodeQL pack into a code scanning workflow in GitHub
You can use CodeQL query packs in your Code Scanning setup. This allows you to select query packs published by various sources and use them to analyze your code.
185
+
You can use CodeQL query packs in your Code Scanning setup. This allows you to select query packs published by various sources and use them to analyze your code.
180
186
For more information, see "`Using CodeQL query packs in the CodeQL action <https://docs.github.com/en/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-codeql-query-packs/>`_" or "`Downloading and using CodeQL query packs in your CI system <https://docs.github.com/en/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#downloading-and-using-codeql-query-packs>`_."
181
187
182
188
@@ -206,28 +212,28 @@ A SARIF results file is generated. Specifying ``--format=sarif-latest`` ensures
206
212
that the results are formatted according to the most recent SARIF specification
If you use the CodeQL CLI to to run code scanning analyses on third party CI/CD systems,
215
221
you can include the query help for your custom queries in SARIF files generated during an analysis.
216
-
After uploading the SARIF file to GitHub, the query help is shown in the code scanning UI for any
217
-
alerts generated by the custom queries.
222
+
After uploading the SARIF file to GitHub, the query help is shown in the code scanning UI for any
223
+
alerts generated by the custom queries.
218
224
219
-
From CodeQL CLI 2.7.1 onwards, you can include markdown-rendered query help in SARIF files
225
+
From CodeQL CLI 2.7.1 onwards, you can include markdown-rendered query help in SARIF files
220
226
by providing the ``--sarif-add-query-help`` option when running
221
-
``codeql database analyze``.
227
+
``codeql database analyze``.
222
228
For more information, see `Configuring CodeQL CLI in your CI system <https://docs.github.com/en/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system#analyzing-a-codeql-database>`__
223
229
in the GitHub documentation.
224
230
225
231
You can write query help for custom queries directly in a markdown file and save it alongside the
226
-
corresponding query. Alternatively, for consistency with the standard CodeQL queries,
227
-
you can write query help in the ``.qhelp`` format. Query help written in ``.qhelp``
232
+
corresponding query. Alternatively, for consistency with the standard CodeQL queries,
233
+
you can write query help in the ``.qhelp`` format. Query help written in ``.qhelp``
228
234
files can't be included in SARIF files, and they can't be processed by code
229
-
scanning so must be converted to markdown before running
230
-
the analysis. For more information, see ":ref:`Query help files <query-help-files>`"
235
+
scanning so must be converted to markdown before running
236
+
the analysis. For more information, see ":ref:`Query help files <query-help-files>`"
231
237
and ":doc:`Testing query help files <testing-query-help-files>`."
0 commit comments