Skip to content

Commit 4a3d0f9

Browse files
docs-botmchammer01
andauthored
Update CodeQL CLI manual (#59204)
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent f08840c commit 4a3d0f9

30 files changed

+88
-81
lines changed

content/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-decode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The file to write the desired output to.
5353
#### `-r, --result-set=<name>`
5454
5555
Select a particular result set from the BQRS file to decode. The
56-
available results sets can be listed by [codeql bqrs info](/code-security/codeql-cli/codeql-cli-manual/bqrs-info).
56+
available results sets can be listed by [codeql bqrs info](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-info).
5757
5858
If no result set is selected, all result sets will be decoded, provided
5959
the selected output format and processing options support that.
@@ -116,7 +116,7 @@ at the top, or at the location given by `--start-at`.
116116
#### `--start-at=<offset>`
117117
118118
\[Advanced] Start printing the row defined at a particular byte offset
119-
in the BQRS file. The offset must be gotten from [codeql bqrs info](/code-security/codeql-cli/codeql-cli-manual/bqrs-info), or from the "next" pointer found in JSON output from a previous invocation with `--rows`
119+
in the BQRS file. The offset must be gotten from [codeql bqrs info](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-info), or from the "next" pointer found in JSON output from a previous invocation with `--rows`
120120
set. Other offsets are likely to produce nonsense output and/or explicit
121121
errors.
122122

content/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-info.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ names and sizes of each result set (table) in the BQRS file, and the
4141
column types of each result set.
4242

4343
It can also optionally precompute offsets for using the pagination
44-
options of [codeql bqrs decode](/code-security/codeql-cli/codeql-cli-manual/bqrs-decode). This is mainly useful for IDE plugins.
44+
options of [codeql bqrs decode](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-decode). This is mainly useful for IDE plugins.
4545

4646
## Options
4747

@@ -61,7 +61,7 @@ Select output format, either `text` _(default)_ or `json`.
6161

6262
\[Advanced] When given together with `--format=json`, compute a table
6363
of byte offsets that can later be given to the `--start-at` option of
64-
[codeql bqrs decode](/code-security/codeql-cli/codeql-cli-manual/bqrs-decode), to start streaming results at positions 0, _\<num>_, 2\*_\<num>_, and so
64+
[codeql bqrs decode](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-decode), to start streaming results at positions 0, _\<num>_, 2\*_\<num>_, and so
6565
forth.
6666

6767
#### `--paginate-result-set=<name>`

content/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-analyze.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ Run a query suite (or some individual queries) against a CodeQL
4242
database, producing results, styled as alerts or paths, in SARIF or
4343
another interpreted format.
4444

45-
This command combines the effect of the [codeql database run-queries](/code-security/codeql-cli/codeql-cli-manual/database-run-queries) and [codeql database interpret-results](/code-security/codeql-cli/codeql-cli-manual/database-interpret-results) commands. If you want to run queries whose results _don't_ meet the requirements for
45+
This command combines the effect of the [codeql database run-queries](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-run-queries) and [codeql database interpret-results](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-interpret-results) commands. If you want to run queries whose results _don't_ meet the requirements for
4646
being interpreted as source-code alerts, use
47-
[codeql database run-queries](/code-security/codeql-cli/codeql-cli-manual/database-run-queries) or [codeql query run](/code-security/codeql-cli/codeql-cli-manual/query-run) instead, and then [codeql bqrs decode](/code-security/codeql-cli/codeql-cli-manual/bqrs-decode) to convert the raw results to a readable notation.
47+
[codeql database run-queries](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-run-queries) or [codeql query run](/code-security/reference/code-scanning/codeql/codeql-cli-manual/query-run) instead, and then [codeql bqrs decode](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-decode) to convert the raw results to a readable notation.
4848

4949
## Options
5050

@@ -152,7 +152,7 @@ all queries. It loads query help for /path/to/query.ql from the
152152
/path/to/query.md file. If this flag is not supplied the default
153153
behavior is to include help only for custom queries i.e. those in query
154154
packs which are not of the form \`codeql/\<lang\&rt;-queries\`. This
155-
option has no effect when passed to [codeql bqrs interpret](/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret).
155+
option has no effect when passed to [codeql bqrs interpret](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-interpret).
156156

157157
#### `--sarif-include-query-help=<mode>`
158158

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

168168
`never`: Do not include query help for any queries.
169169

170-
This option has no effect when passed to [codeql bqrs interpret](/code-security/codeql-cli/codeql-cli-manual/bqrs-interpret).
170+
This option has no effect when passed to [codeql bqrs interpret](/code-security/reference/code-scanning/codeql/codeql-cli-manual/bqrs-interpret).
171171

172172
Available since `v2.15.2`.
173173

@@ -182,7 +182,7 @@ Available since `v2.18.1`.
182182

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

187187
#### `--[no-]sarif-multicause-markdown`
188188

@@ -317,7 +317,7 @@ timed parts are "RA layers" of the optimized query, but that might
317317
change in the future.
318318

319319
If no timeout is specified, or is given as 0, no timeout will be set
320-
(except for [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run), where the default timeout is 5 minutes).
320+
(except for [codeql test run](/code-security/reference/code-scanning/codeql/codeql-cli-manual/test-run), where the default timeout is 5 minutes).
321321

322322
#### `-j, --threads=<num>`
323323

@@ -340,7 +340,7 @@ be discarded after the queries have been executed.
340340
#### `--[no-]keep-full-cache`
341341

342342
\[Advanced] Don't clean up the disk cache after evaluation completes.
343-
This may save time if you're going to do [codeql dataset cleanup](/code-security/codeql-cli/codeql-cli-manual/dataset-cleanup) or [codeql database cleanup](/code-security/codeql-cli/codeql-cli-manual/database-cleanup) afterwards anyway.
343+
This may save time if you're going to do [codeql dataset cleanup](/code-security/reference/code-scanning/codeql/codeql-cli-manual/dataset-cleanup) or [codeql database cleanup](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-cleanup) afterwards anyway.
344344

345345
#### `--max-disk-cache=<MB>`
346346

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ Available since `v2.13.3`.
7979
Include an uncompressed version of the source archive directory. This is
8080
necessary for legacy CodeQL plugins (like CodeQL for Eclipse).
8181

82+
#### `--include=<include>`
83+
84+
\[Advanced] Additional paths relative to the database directory to
85+
include in the bundle.
86+
87+
Available since `v2.24.0`.
88+
8289
#### `--name=<name>`
8390

8491
The name of the top-level directory in the bundle. If not given, it

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ delete the entire database directory.
7474
on how to create the CodeQL databases and what queries to run in later
7575
steps. For more details on the format of this configuration file, refer
7676
to [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning). To run queries from
77-
this file in a later step, invoke [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) without any other queries specified.
77+
this file in a later step, invoke [codeql database analyze](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-analyze) without any other queries specified.
7878
7979
#### `--[no-]db-cluster`
8080
@@ -86,7 +86,7 @@ directory given on the command line.
8686
8787
The language that the new database will be used to analyze.
8888
89-
Use [codeql resolve languages](/code-security/codeql-cli/codeql-cli-manual/resolve-languages) to get a list of the pluggable language extractors found on the search path.
89+
Use [codeql resolve languages](/code-security/reference/code-scanning/codeql/codeql-cli-manual/resolve-languages) to get a list of the pluggable language extractors found on the search path.
9090
9191
When the `--db-cluster` option is given, this can appear multiple times,
9292
or the value can be a comma-separated list of languages.
@@ -173,7 +173,7 @@ will be left unfinalized.
173173
174174
#### `--[no-]linkage-aware-import`
175175
176-
\[Advanced] Controls whether [codeql dataset import](/code-security/codeql-cli/codeql-cli-manual/dataset-import) is linkage-aware _(default)_ or not. On projects where this part of database creation
176+
\[Advanced] Controls whether [codeql dataset import](/code-security/reference/code-scanning/codeql/codeql-cli-manual/dataset-import) is linkage-aware _(default)_ or not. On projects where this part of database creation
177177
consumes too much memory, disabling this option may help them progress
178178
at the expense of database completeness.
179179
@@ -349,10 +349,10 @@ will use all the values provided, in order. Extractor options specified
349349
using this command-line option are processed after extractor options
350350
given via `--extractor-options-file`.
351351
352-
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
352+
When passed to [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
353353
applied to the indirect tracing environment. If your workflow also makes
354354
calls to
355-
[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.
355+
[codeql database trace-command](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
356356
357357
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
358358
more information on CodeQL extractor options, including how to list the
@@ -375,10 +375,10 @@ will use all the values provided, in order. Extractor options specified
375375
using this command-line option are processed before extractor options
376376
given via `--extractor-option`.
377377
378-
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
378+
When passed to [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
379379
applied to the indirect tracing environment. If your workflow also makes
380380
calls to
381-
[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.
381+
[codeql database trace-command](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
382382
383383
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
384384
more information on CodeQL extractor options, including how to list the

content/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-export-diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Available since `v2.12.6`.
4747
#### `<database>`
4848

4949
\[Mandatory] Path to the CodeQL database under construction. This must
50-
have been prepared for extraction with [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init).
50+
have been prepared for extraction with [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init).
5151

5252
If the `--db-cluster` option is given, this is not a database itself,
5353
but a directory that _contains_ databases, and all of those databases

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ codeql database finalize [--dbscheme=<file>] [--threads=<num>] [--ram=<MB>] <opt
3535

3636
\[Plumbing] Final steps in database creation.
3737

38-
Finalize a database that was created with [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init) and subsequently seeded with analysis data using [codeql database trace-command](/code-security/codeql-cli/codeql-cli-manual/database-trace-command). This needs to happen before the new database can be queried.
38+
Finalize a database that was created with [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init) and subsequently seeded with analysis data using [codeql database trace-command](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-trace-command). This needs to happen before the new database can be queried.
3939

4040
## Options
4141

@@ -44,7 +44,7 @@ Finalize a database that was created with [codeql database init](/code-security/
4444
#### `<database>`
4545

4646
\[Mandatory] Path to the CodeQL database under construction. This must
47-
have been prepared for extraction with [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init).
47+
have been prepared for extraction with [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init).
4848

4949
If the `--db-cluster` option is given, this is not a database itself,
5050
but a directory that _contains_ databases, and all of those databases
@@ -62,7 +62,7 @@ construction. Those databases will be processed together.
6262
These will not themselves be finalized, but the data from them will be
6363
included in the finalized database being created. This is an advanced
6464
option that may not have the desired effect in all cases. For more
65-
information, please refer to the documentation of [codeql database import](/code-security/codeql-cli/codeql-cli-manual/database-import).
65+
information, please refer to the documentation of [codeql database import](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-import).
6666

6767
If the `--db-cluster` option is given, it is expected that these will be
6868
database clusters rather than individual CodeQL databases.
@@ -188,7 +188,7 @@ takes up a lot of space in the dataset.
188188

189189
#### `--[no-]linkage-aware-import`
190190

191-
\[Advanced] Controls whether [codeql dataset import](/code-security/codeql-cli/codeql-cli-manual/dataset-import) is linkage-aware _(default)_ or not. On projects where this part of database creation
191+
\[Advanced] Controls whether [codeql dataset import](/code-security/reference/code-scanning/codeql/codeql-cli-manual/dataset-import) is linkage-aware _(default)_ or not. On projects where this part of database creation
192192
consumes too much memory, disabling this option may help them progress
193193
at the expense of database completeness.
194194

content/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-import.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ meaningful.
5858
#### `<database>`
5959

6060
\[Mandatory] Path to the CodeQL database under construction. This must
61-
have been prepared for extraction with [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init).
61+
have been prepared for extraction with [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init).
6262

6363
If the `--db-cluster` option is given, this is not a database itself,
6464
but a directory that _contains_ databases, and all of those databases
@@ -132,7 +132,7 @@ takes up a lot of space in the dataset.
132132

133133
#### `--[no-]linkage-aware-import`
134134

135-
\[Advanced] Controls whether [codeql dataset import](/code-security/codeql-cli/codeql-cli-manual/dataset-import) is linkage-aware _(default)_ or not. On projects where this part of database creation
135+
\[Advanced] Controls whether [codeql dataset import](/code-security/reference/code-scanning/codeql/codeql-cli-manual/dataset-import) is linkage-aware _(default)_ or not. On projects where this part of database creation
136136
consumes too much memory, disabling this option may help them progress
137137
at the expense of database completeness.
138138

content/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-index-files.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ patterns, which can use the following wildcard characters:
5757
#### `<database>`
5858

5959
\[Mandatory] Path to the CodeQL database under construction. This must
60-
have been prepared for extraction with [codeql database init](/code-security/codeql-cli/codeql-cli-manual/database-init).
60+
have been prepared for extraction with [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init).
6161

6262
#### `-l, --language=<lang>`
6363

@@ -82,7 +82,7 @@ set, the environment variable value takes precedence over this option.
8282

8383
\[Advanced] The directory in which the specified command should be
8484
executed. If this argument is not provided, the command is executed in
85-
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
85+
the value of `--source-root` passed to [codeql database create](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-create), if one exists. If no `--source-root` argument is provided, the command is executed in the
8686
current working directory.
8787

8888
### Options to control extractor behavior
@@ -105,10 +105,10 @@ will use all the values provided, in order. Extractor options specified
105105
using this command-line option are processed after extractor options
106106
given via `--extractor-options-file`.
107107

108-
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
108+
When passed to [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
109109
applied to the indirect tracing environment. If your workflow also makes
110110
calls to
111-
[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.
111+
[codeql database trace-command](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
112112

113113
See <https://codeql.github.com/docs/codeql-cli/extractor-options> for
114114
more information on CodeQL extractor options, including how to list the
@@ -131,10 +131,10 @@ will use all the values provided, in order. Extractor options specified
131131
using this command-line option are processed before extractor options
132132
given via `--extractor-option`.
133133

134-
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
134+
When passed to [codeql database init](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-init) or `codeql database begin-tracing`, the options will only be
135135
applied to the indirect tracing environment. If your workflow also makes
136136
calls to
137-
[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.
137+
[codeql database trace-command](/code-security/reference/code-scanning/codeql/codeql-cli-manual/database-trace-command) then the options also need to be passed there if desired.
138138

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

0 commit comments

Comments
 (0)