Skip to content

Commit 8b2baae

Browse files
authored
Merge pull request #39705 from github/repo-sync
Repo sync
2 parents 2308835 + 5f0006d commit 8b2baae

File tree

16 files changed

+70
-14
lines changed

16 files changed

+70
-14
lines changed

content/code-security/code-scanning/managing-your-code-scanning-configuration/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ children:
2828
- /javascript-typescript-built-in-queries
2929
- /python-built-in-queries
3030
- /ruby-built-in-queries
31+
- /rust-built-in-queries
3132
- /swift-built-in-queries
3233
---
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Rust queries for CodeQL analysis
3+
shortTitle: Rust CodeQL queries
4+
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 %}

content/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ all queries. It loads query help for /path/to/query.ql from the
102102
/path/to/query.md file. If this flag is not supplied the default
103103
behavior is to include help only for custom queries i.e. those in query
104104
packs which are not of the form \`codeql/\<lang\&rt;-queries\`. This
105-
option has no effect when passed to [codeql bqrs interpret](/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret).
105+
option has no effect when passed to codeql bqrs interpret.
106106

107107
#### `--sarif-include-query-help=<mode>`
108108

@@ -117,7 +117,7 @@ queries i.e. those in query packs which are not of the form
117117

118118
`never`: Do not include query help for any queries.
119119

120-
This option has no effect when passed to [codeql bqrs interpret](/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret).
120+
This option has no effect when passed to codeql bqrs interpret.
121121

122122
Available since `v2.15.2`.
123123

@@ -132,7 +132,7 @@ Available since `v2.18.1`.
132132

133133
\[SARIF formats only] Place the rule object for each query under its
134134
corresponding QL pack in the `<run>.tool.extensions` property. This
135-
option has no effect when passed to [codeql bqrs interpret](/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret).
135+
option has no effect when passed to codeql bqrs interpret.
136136

137137
#### `--[no-]sarif-multicause-markdown`
138138

content/code-security/codeql-cli/codeql-cli-manual/database-bundle.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ predicates.
122122
`fit`: Simply make sure the defined size limits for the disk cache are
123123
observed, deleting as many intermediates as necessary.
124124

125+
`overlay`: Trim to just the data that will be useful when evaluating
126+
against an overlay.
127+
125128
#### `--cleanup-upgrade-backups`
126129

127130
Delete any backup directories resulting from database upgrades.

content/code-security/codeql-cli/codeql-cli-manual/database-cleanup.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ predicates.
8484
`fit`: Simply make sure the defined size limits for the disk cache are
8585
observed, deleting as many intermediates as necessary.
8686

87+
`overlay`: Trim to just the data that will be useful when evaluating
88+
against an overlay.
89+
8790
#### `--cleanup-upgrade-backups`
8891

8992
Delete any backup directories resulting from database upgrades.

content/code-security/codeql-cli/codeql-cli-manual/database-create.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ predicates.
286286
`fit`: Simply make sure the defined size limits for the disk cache are
287287
observed, deleting as many intermediates as necessary.
288288
289+
`overlay`: Trim to just the data that will be useful when evaluating
290+
against an overlay.
291+
289292
#### `--cleanup-upgrade-backups`
290293
291294
Delete any backup directories resulting from database upgrades.
@@ -311,7 +314,7 @@ configuration files that should work in most situations.
311314
312315
\[Advanced] The directory in which the specified command should be
313316
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
315318
current working directory.
316319
317320
#### `--no-run-unnecessary-builds`

content/code-security/codeql-cli/codeql-cli-manual/database-finalize.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ predicates.
143143
`fit`: Simply make sure the defined size limits for the disk cache are
144144
observed, deleting as many intermediates as necessary.
145145

146+
`overlay`: Trim to just the data that will be useful when evaluating
147+
against an overlay.
148+
146149
#### `--cleanup-upgrade-backups`
147150

148151
Delete any backup directories resulting from database upgrades.

content/code-security/codeql-cli/codeql-cli-manual/database-init.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ will use all the values provided, in order. Extractor options specified
264264
using this command-line option are processed after extractor options
265265
given via `--extractor-options-file`.
266266
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
268268
applied to the indirect tracing environment. If your workflow also makes
269269
calls to
270270
[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
290290
using this command-line option are processed before extractor options
291291
given via `--extractor-option`.
292292
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
294294
applied to the indirect tracing environment. If your workflow also makes
295295
calls to
296296
[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.

content/code-security/codeql-cli/codeql-cli-manual/database-run-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ the results subdirectory of the database directory.
3737
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).
3838

3939
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.
4141

4242
Alternatively, if you have only a single query to run, you might prefer
4343
[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.

content/code-security/codeql-cli/codeql-cli-manual/database-trace-command.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ configuration files that should work in most situations.
9999
In addition to the specified command, run the main script for extractors
100100
that don't depend on tracing a build process. If you're constructing
101101
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.
103103

104104
#### `--[no-]use-build-mode`
105105

@@ -144,7 +144,7 @@ given via `--extractor-options-file`.
144144
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
145145
applied to the indirect tracing environment. If your workflow also makes
146146
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.
148148

149149
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
150150
more information on CodeQL extractor options, including how to list the
@@ -170,7 +170,7 @@ given via `--extractor-option`.
170170
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
171171
applied to the indirect tracing environment. If your workflow also makes
172172
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.
174174

175175
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
176176
more information on CodeQL extractor options, including how to list the

0 commit comments

Comments
 (0)