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
{{ message }}
Repository navigation
Commit 8b2baae
Browse filesBrowse the repository at this point in the historyBrowse files
intro: 'Explore the queries that {% data variables.product.prodname_codeql %} uses to analyze code written in Rust when you select the `default` or the `security-extended` query suite.'
5
+
product: '{% data reusables.gated-features.codeql %}'
6
+
allowTitleToDifferFromFilename: true
7
+
versions:
8
+
fpt: '*'
9
+
ghes: '*'
10
+
ghec: '*'
11
+
type: reference
12
+
topics:
13
+
- Code scanning
14
+
- CodeQL
15
+
---
16
+
17
+
{% data variables.product.prodname_codeql %} includes many queries for analyzing Rust code. {% data reusables.code-scanning.codeql-query-tables.query-suite-behavior %}
18
+
19
+
## Built-in queries for Rust analysis
20
+
21
+
{% data reusables.code-scanning.codeql-query-tables.codeql-version-info %}
22
+
23
+
{% data reusables.code-scanning.codeql-query-tables.rust %}
Copy file name to clipboardExpand all lines: content/code-security/codeql-cli/codeql-cli-manual/database-create.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,6 +286,9 @@ predicates.
286
286
`fit`: Simply make sure the defined size limits for the disk cache are
287
287
observed, deleting as many intermediates as necessary.
288
288
289
+
`overlay`: Trim to just the data that will be useful when evaluating
290
+
against an overlay.
291
+
289
292
#### `--cleanup-upgrade-backups`
290
293
291
294
Delete any backup directories resulting from database upgrades.
@@ -311,7 +314,7 @@ configuration files that should work in most situations.
311
314
312
315
\[Advanced] The directory in which the specified command should be
313
316
executed. If this argument is not provided, the command is executed in
314
-
the value of `--source-root` passed to [codeql database create](/code-security/codeql-cli/codeql-cli-manual/database-create), if one exists. If no `--source-root` argument is provided, the command is executed in the
317
+
the value of `--source-root` passed to codeql database create, if one exists. If no `--source-root` argument is provided, the command is executed in the
Copy file name to clipboardExpand all lines: content/code-security/codeql-cli/codeql-cli-manual/database-init.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,7 +264,7 @@ will use all the values provided, in order. Extractor options specified
264
264
using this command-line option are processed after extractor options
265
265
given via `--extractor-options-file`.
266
266
267
-
When passed to [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
267
+
When passed to codeql database init or `codeql database begin-tracing`, the options will only be
268
268
applied to the indirect tracing environment. If your workflow also makes
269
269
calls to
270
270
[codeql database trace-command](/code-security/codeql-cli/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
@@ -290,7 +290,7 @@ will use all the values provided, in order. Extractor options specified
290
290
using this command-line option are processed before extractor options
291
291
given via `--extractor-option`.
292
292
293
-
When passed to [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
293
+
When passed to codeql database init or `codeql database begin-tracing`, the options will only be
294
294
applied to the indirect tracing environment. If your workflow also makes
295
295
calls to
296
296
[codeql database trace-command](/code-security/codeql-cli/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
Copy file name to clipboardExpand all lines: content/code-security/codeql-cli/codeql-cli-manual/database-run-queries.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ the results subdirectory of the database directory.
37
37
The results can later be converted to readable formats by [codeql database interpret-results](/code-security/codeql-cli/codeql-cli-manual/database-interpret-results), or query-for-query by with [codeql bqrs decode](/code-security/codeql-cli/codeql-cli-manual/bqrs-decode) or [codeql bqrs interpret](/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret).
38
38
39
39
If your queries produce results in a form that can be interpreted as
40
-
source-code alerts, you may find [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) a more convenient way to run them. [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) combines [codeql database run-queries](/code-security/codeql-cli/codeql-cli-manual/database-run-queries) with [codeql database interpret-results](/code-security/codeql-cli/codeql-cli-manual/database-interpret-results) in a single step. In particular, [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) can produce output in the SARIF format, which can be used with an variety of alert viewers.
40
+
source-code alerts, you may find [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) a more convenient way to run them. [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) combines codeql database run-queries with [codeql database interpret-results](/code-security/codeql-cli/codeql-cli-manual/database-interpret-results) in a single step. In particular, [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) can produce output in the SARIF format, which can be used with an variety of alert viewers.
41
41
42
42
Alternatively, if you have only a single query to run, you might prefer
43
43
[codeql query run](/code-security/codeql-cli/codeql-cli-manual/query-run), which can display human-readable output for quick inspection of results while you're debugging.
Copy file name to clipboardExpand all lines: content/code-security/codeql-cli/codeql-cli-manual/database-trace-command.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ configuration files that should work in most situations.
99
99
In addition to the specified command, run the main script for extractors
100
100
that don't depend on tracing a build process. If you're constructing
101
101
databases for several languages with `--db-cluster`, this option should
102
-
be given to exactly one invocation of [codeql database trace-command](/code-security/codeql-cli/codeql-cli-manual/database-trace-command).
102
+
be given to exactly one invocation of codeql database trace-command.
103
103
104
104
#### `--[no-]use-build-mode`
105
105
@@ -144,7 +144,7 @@ given via `--extractor-options-file`.
144
144
When passed to [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
145
145
applied to the indirect tracing environment. If your workflow also makes
146
146
calls to
147
-
[codeql database trace-command](/code-security/codeql-cli/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
147
+
codeql database trace-command then the options also need to be passed there if desired.
148
148
149
149
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
150
150
more information on CodeQL extractor options, including how to list the
@@ -170,7 +170,7 @@ given via `--extractor-option`.
170
170
When passed to [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
171
171
applied to the indirect tracing environment. If your workflow also makes
172
172
calls to
173
-
[codeql database trace-command](/code-security/codeql-cli/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
173
+
codeql database trace-command then the options also need to be passed there if desired.
174
174
175
175
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
176
176
more information on CodeQL extractor options, including how to list the
0 commit comments