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
Copy file name to clipboardExpand all lines: docs/codeql/codeql-cli/analyzing-databases-with-the-codeql-cli.rst
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -15,9 +15,7 @@ For information about writing queries to run with ``database analyze``, see
15
15
16
16
Before starting an analysis you must:
17
17
18
-
- :doc:`Set up the CodeQL CLI <getting-started-with-the-codeql-cli>` to run commands locally and
19
-
optionally check out the CodeQL repository if you want direct access to the CodeQL core queries
20
-
and libraries.
18
+
- :doc:`Set up the CodeQL CLI <getting-started-with-the-codeql-cli>` to run commands locally.
21
19
- :doc:`Create a CodeQL database <creating-codeql-databases>` for the source
22
20
code you want to analyze.
23
21
@@ -138,6 +136,18 @@ Example query specifiers
138
136
* ``codeql/python-queries@1.2.3:codeql-suites/python-code-scanning.qls`` - All queries in the ``codeql-suites/python-code-scanning.qls`` directory in version 1.2.3 of the ``codeql/python-queries`` pack.
139
137
* ``suites/my-suite.qls`` - All queries in the ``suites/my-suite.qls`` file relative to the current working directory.
140
138
139
+
.. pull-quote::
140
+
141
+
Tip
142
+
143
+
The default query suite of the standard CodeQL query packs are ``codeql-suites/<lang>-code-scanning.qls``. Several other useful query suites can also be found in the ``codeql-suites`` directory of each pack. For example, the ``codeql/cpp-queries`` pack contains the following query suites:
144
+
145
+
* ``cpp-code-scanning.qls`` - Standard Code Scanning queries for C++. The default query suite for this pack.
146
+
* ``cpp-security-extended.qls`` - Security-extended queries for C++. This suite contains queries that are less precise than the standard security queries, and may find more false-positives. This query suite includes all queries from ``cpp-code-scanning.qls``.
147
+
* ``cpp-security-and-quality.qls`` - Security-and-quality queries for C++. This query suite includes all queries from ``cpp-security-extended.qls``.
148
+
149
+
You can see the sources for these query suites in the `CodeQL repository <https://github.com/github/codeql/tree/main/cpp/ql/src/codeql-suites>`__. Query suites for other languages are similar.
150
+
141
151
Examples of using ``codeql database analyze``
142
152
---------------------------------------------
143
153
@@ -285,13 +295,6 @@ the location of the query suites used by code scanning, so the CodeQL CLI knows
285
295
suite files automatically, and you don't have to specify the full path on the command line.
286
296
For more information, see ":ref:`Creating CodeQL query suites <creating-codeql-query-suites>`."
287
297
288
-
Query suites in the core CodeQL query packs are all stored in the ``codeql-suites`` directory of the pack. For example, the ``codeql/cpp-queries`` pack contains the following query suites:
289
-
290
-
* ``cpp-code-scanning.qls`` - Standard Code Scanning queries for C++.
291
-
* ``cpp-security-and-quality`` - Security-and-quality queries for C++.
292
-
* ``cpp-security-extended`` - Security-extended queries for C++. This suite contains queries that are less precise than the standard security queries, and may find more false-positives.
293
-
294
-
You can see the sources for these query suites in the `CodeQL repository <https://github.com/github/codeql/tree/main/cpp/ql/src/codeql-suites>`__. Query suites for other languages are similar.
295
298
296
299
For information about creating custom query suites, see ":doc:`Creating
0 commit comments