@@ -66,7 +66,7 @@ You can also specify:
66
66
- ``--sarif-add-query-help ``: (supported in version 2.7.1 onwards) adds any custom query help written
67
67
in markdown to SARIF files (v2.1.0 or later) generated by the analysis. Query help stored in ``.qhelp `` files must be
68
68
converted to ``.md `` before running the analysis. For further information,
69
- see ":doc : `Including query help for custom CodeQL queries in SARIF files <testing -query-help-files >`."
69
+ see ":ref : `Including query help for custom CodeQL queries in SARIF files <including -query-help-for-custom-codeql-queries-in-sarif -files >`."
70
70
71
71
- .. include:: ../reusables/threads-query-execution.rst
72
72
@@ -211,15 +211,21 @@ supported by CodeQL.
211
211
Including query help for custom CodeQL queries in SARIF files
212
212
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
213
213
214
- Code scanning does not process ``.qhelp `` files for custom CodeQL queries, so to show
215
- query help for custom queries in the code scanning UI you must include markdown-rendered query help
216
- in SARIF files generated during an analysis.
214
+ If you use the CodeQL CLI to to run code scanning analyses on third party CI/CD systems,
215
+ 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.
217
218
218
- For CodeQL CLI 2.7.1 onwards, you can include markdown-rendered query help in SARIF files
219
+ From CodeQL CLI 2.7.1 onwards, you can include markdown-rendered query help in SARIF files
219
220
by providing the ``--sarif-add-query-help `` option when running
220
- ``codeql database analyze ``. Query help written in ``.qhelp `` files cannot be include in SARIF files,
221
- so must be converted to markdown before running the analysis. For more information, see
222
- ":ref: `Testing query help files <testing-query-help-files >`."
221
+ ``codeql database analyze ``.
222
+
223
+ You can write query help for custom queries directly in markdown file and save it alongside the
224
+ corresponding query. Alternatively, for consistency with the standard CodeQL queries,
225
+ you can write query help in the ``.qhelp `` format and convert it to markdown before
226
+ running the analysis. Query help written in ``.qhelp `` files can't be included in SARIF files,
227
+ and they can't be processed by code scanning. For more information, see
228
+ ":doc: `Testing query help files <testing-query-help-files >`."
223
229
224
230
Results
225
231
-------
0 commit comments