Skip to content

Commit ffd09b2

Browse files
Update CodeQL CLI manual (#40489)
Co-authored-by: Felicity Chapman <felicitymay@github.com>
1 parent 0f5701e commit ffd09b2

29 files changed

+66
-165
lines changed

Diff for: content/code-security/codeql-cli/codeql-cli-manual/bqrs-info.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Select output format, either `text` _(default)_ or `json`.
5656

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

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

Diff for: content/code-security/codeql-cli/codeql-cli-manual/database-analyze.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ directory.
451451
#### `--registries-auth-stdin`
452452

453453
Authenticate to GitHub Enterprise Server Container registries by passing
454-
a comma-separated list of \<registry\_url>=\<token> pairs.
454+
a comma-separated list of `<registry_url>=<token>` pairs.
455455

456456
For example, you can pass
457457
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ default to <https://github.com/>
185185
#### `--registries-auth-stdin`
186186
187187
Authenticate to GitHub Enterprise Server Container registries by passing
188-
a comma-separated list of \<registry\_url>=\<token> pairs.
188+
a comma-separated list of `<registry_url>=<token>` pairs.
189189
190190
For example, you can pass
191191
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ default to <https://github.com/>
159159
#### `--registries-auth-stdin`
160160
161161
Authenticate to GitHub Enterprise Server Container registries by passing
162-
a comma-separated list of \<registry\_url>=\<token> pairs.
162+
a comma-separated list of `<registry_url>=<token>` pairs.
163163
164164
For example, you can pass
165165
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`
@@ -178,16 +178,16 @@ registry, you can instead authenticate using the simpler
178178
parent process of the CodeQL CLI whose name matches this argument. If
179179
more than one parent process has this name, the one lowest in the
180180
process tree will be selected. This option overrides
181-
`--trace-process-level`, so if both are used passed only this option
182-
will be used.
181+
`--trace-process-level`, so if both are passed, only this option will be
182+
used.
183183
184184
#### `--trace-process-level=<process-level>`
185185
186186
\[Windows only] When initializing tracing, inject the tracer this many
187187
parents above the current process, with 0 corresponding to the process
188-
that is invoking the CodeQL CLI. The CLI's default behaviour if no
188+
that is invoking the CodeQL CLI. The CLI's default behavior if no
189189
arguments are passed is to inject into the parent of the calling
190-
process.
190+
process, with some special cases for GitHub Actions and Azure Pipelines.
191191
192192
### Options to configure indirect build tracing
193193

Diff for: content/code-security/codeql-cli/codeql-cli-manual/database-interpret-results.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Print the baseline lines of code counted to standard output.
181181
#### `--registries-auth-stdin`
182182

183183
Authenticate to GitHub Enterprise Server Container registries by passing
184-
a comma-separated list of \<registry\_url>=\<token> pairs.
184+
a comma-separated list of `<registry_url>=<token>` pairs.
185185

186186
For example, you can pass
187187
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ directory.
338338
#### `--registries-auth-stdin`
339339

340340
Authenticate to GitHub Enterprise Server Container registries by passing
341-
a comma-separated list of \<registry\_url>=\<token> pairs.
341+
a comma-separated list of `<registry_url>=<token>` pairs.
342342

343343
For example, you can pass
344344
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/execute-queries.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ directory.
327327
#### `--registries-auth-stdin`
328328

329329
Authenticate to GitHub Enterprise Server Container registries by passing
330-
a comma-separated list of \<registry\_url>=\<token> pairs.
330+
a comma-separated list of `<registry_url>=<token>` pairs.
331331

332332
For example, you can pass
333333
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/execute-query-server.md

+4-127
Original file line numberDiff line numberDiff line change
@@ -25,141 +25,18 @@ redirect_from:
2525
## Synopsis
2626

2727
```shell copy
28-
codeql execute query-server [--threads=<num>] <options>...
28+
codeql execute query-server <options>...
2929
```
3030

3131
## Description
3232

33-
\[Plumbing] Support for running queries from IDEs.
33+
\[Deprecated] \[Plumbing] Support for running queries from IDEs.
3434

35-
This command is only relevant for authors of QL language extensions for
36-
IDEs. It is started by the IDE plugin in the background and communicates
37-
with it through a special protocol on its standard input and output
38-
streams.
39-
40-
The IDE extensions should use
41-
[codeql resolve ram](/code-security/codeql-cli/codeql-cli-manual/resolve-ram) to construct options for RAM limits before starting the query server.
35+
The
36+
[codeql execute query-server](/code-security/codeql-cli/codeql-cli-manual/execute-query-server) subcommand is unsupported and no longer works. If you are using the official CodeQL extension for Visual Studio Code, please upgrade the extension to 1.7.6 or a later version. Otherwise please migrate your CodeQL IDE integration to the `codeql execute query-server2` subcommand.
4237

4338
## Primary options
4439

45-
#### `--[no-]tuple-counting`
46-
47-
\[Advanced] Display tuple counts for each evaluation step in the query
48-
evaluator logs. If the `--evaluator-log` option is provided, tuple
49-
counts will be included in both the text-based and structured JSON logs
50-
produced by the command. (This can be useful for performance
51-
optimization of complex QL code).
52-
53-
#### `--timeout=<seconds>`
54-
55-
\[Advanced] Set the timeout length for query evaluation, in seconds.
56-
57-
The timeout feature is intended to catch cases where a complex query
58-
would take "forever" to evaluate. It is not an effective way to limit
59-
the total amount of time the query evaluation can take. The evaluation
60-
will be allowed to continue as long as each separately timed part of the
61-
computation completes within the timeout. Currently these separately
62-
timed parts are "RA layers" of the optimized query, but that might
63-
change in the future.
64-
65-
If no timeout is specified, or is given as 0, no timeout will be set
66-
(except for [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run), where the default timeout is 5 minutes).
67-
68-
#### `-j, --threads=<num>`
69-
70-
Use this many threads to evaluate queries.
71-
72-
Defaults to 1. You can pass 0 to use one thread per core on the machine,
73-
or -_N_ to leave _N_ cores unused (except still use at least one
74-
thread).
75-
76-
#### `--[no-]save-cache`
77-
78-
\[Advanced] Aggressively write intermediate results to the disk cache.
79-
This takes more time and uses (much) more disk space, but may speed up
80-
the subsequent execution of similar queries.
81-
82-
#### `--[no-]expect-discarded-cache`
83-
84-
\[Advanced] Make decisions about which predicates to evaluate, and what
85-
to write to the disk cache, based on the assumption that the cache will
86-
be discarded after the queries have been executed.
87-
88-
#### `--[no-]keep-full-cache`
89-
90-
\[Advanced] Don't clean up the disk cache after evaluation completes.
91-
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.
92-
93-
#### `--max-disk-cache=<MB>`
94-
95-
Set the maximum amount of space that the disk cache for intermediate
96-
query results can use.
97-
98-
If this size is not configured explicitly, the evaluator will try to use
99-
a "reasonable" amount of cache space, based on the size of the dataset
100-
and the complexity of the queries. Explicitly setting a higher limit
101-
than this default usage will enable additional caching which can speed
102-
up later queries.
103-
104-
#### `--min-disk-free=<MB>`
105-
106-
\[Advanced] Set target amount of free space on file system.
107-
108-
If `--max-disk-cache` is not given, the evaluator will try hard to
109-
curtail disk cache usage if the free space on the file system drops
110-
below this value.
111-
112-
#### `--min-disk-free-pct=<pct>`
113-
114-
\[Advanced] Set target fraction of free space on file system.
115-
116-
If `--max-disk-cache` is not given, the evaluator will try hard to
117-
curtail disk cache usage if the free space on the file system drops
118-
below this percentage.
119-
120-
#### `--external=<pred>=<file.csv>`
121-
122-
A CSV file that contains rows for external predicate `<pred>`.
123-
Multiple `--external` options can be supplied.
124-
125-
#### `--xterm-progress=<mode>`
126-
127-
\[Advanced] Controls whether to show progress tracking during QL
128-
evaluation using xterm control sequences. Possible values are:
129-
130-
`no`: Never produce fancy progress; assume a dumb terminal.
131-
132-
`auto` _(default)_: Autodetect whether the command is running in an
133-
appropriate terminal.
134-
135-
`yes`: Assume the terminal can understand xterm control sequences. The
136-
feature still depends on being able to autodetect the _size_ of the
137-
terminal, and will also be disabled if `-q` is given.
138-
139-
`25x80` (or similar): Like `yes`, and also explicitly give the size of
140-
the terminal.
141-
142-
`25x80:/dev/pts/17` (or similar): show fancy progress on a _different_
143-
terminal than stderr. Mostly useful for internal testing.
144-
145-
### Options for controlling outputting of structured evaluator logs
146-
147-
#### `--evaluator-log=<file>`
148-
149-
\[Advanced] Output structured logs about evaluator performance to the
150-
given file. The format of this log file is subject to change with no
151-
notice, but will be a stream of JSON objects separated by either two
152-
newline characters (by default) or one if the `--evaluator-log-minify`
153-
option is passed. Please use `codeql generate log-summary <file>` to
154-
produce a more stable summary of this file, and avoid parsing the file
155-
directly. The file will be overwritten if it already exists.
156-
157-
#### `--evaluator-log-minify`
158-
159-
\[Advanced] If the `--evaluator-log` option is passed, also passing
160-
this option will minimize the size of the JSON log produced, at the
161-
expense of making it much less human readable.
162-
16340
### Common options
16441

16542
#### `-h, --help`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/execute-upgrades.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ expense of making it much less human readable.
214214
#### `--registries-auth-stdin`
215215

216216
Authenticate to GitHub Enterprise Server Container registries by passing
217-
a comma-separated list of \<registry\_url>=\<token> pairs.
217+
a comma-separated list of `<registry_url>=<token>` pairs.
218218

219219
For example, you can pass
220220
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/generate-query-help.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ value.
131131
#### `--registries-auth-stdin`
132132

133133
Authenticate to GitHub Enterprise Server Container registries by passing
134-
a comma-separated list of \<registry\_url>=\<token> pairs.
134+
a comma-separated list of `<registry_url>=<token>` pairs.
135135

136136
For example, you can pass
137137
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-add.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The root directory of the package.
6767
#### `--registries-auth-stdin`
6868

6969
Authenticate to GitHub Enterprise Server Container registries by passing
70-
a comma-separated list of \<registry\_url>=\<token> pairs.
70+
a comma-separated list of `<registry_url>=<token>` pairs.
7171

7272
For example, you can pass
7373
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-bundle.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ directory.
157157
#### `--registries-auth-stdin`
158158

159159
Authenticate to GitHub Enterprise Server Container registries by passing
160-
a comma-separated list of \<registry\_url>=\<token> pairs.
160+
a comma-separated list of `<registry_url>=<token>` pairs.
161161

162162
For example, you can pass
163163
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-ci.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ Available since `v2.11.3`.
7575
\[Advanced] Specifies an alternate lock file to use as the input to
7676
dependency resolution.
7777

78+
#### `--lock-output=<file>`
79+
80+
\[Advanced] Specifies an alternate location to save the lock file
81+
generated by dependency resolution.
82+
83+
Available since `v2.14.1`.
84+
7885
#### `--no-strict-mode`
7986

8087
\[Advanced] Turn off strict mode to avoid a warning when resolving
@@ -131,7 +138,7 @@ value.
131138
#### `--registries-auth-stdin`
132139

133140
Authenticate to GitHub Enterprise Server Container registries by passing
134-
a comma-separated list of \<registry\_url>=\<token> pairs.
141+
a comma-separated list of `<registry_url>=<token>` pairs.
135142

136143
For example, you can pass
137144
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-create.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ directory.
159159
#### `--registries-auth-stdin`
160160

161161
Authenticate to GitHub Enterprise Server Container registries by passing
162-
a comma-separated list of \<registry\_url>=\<token> pairs.
162+
a comma-separated list of `<registry_url>=<token>` pairs.
163163

164164
For example, you can pass
165165
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-download.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ value.
124124
#### `--registries-auth-stdin`
125125

126126
Authenticate to GitHub Enterprise Server Container registries by passing
127-
a comma-separated list of \<registry\_url>=\<token> pairs.
127+
a comma-separated list of `<registry_url>=<token>` pairs.
128128

129129
For example, you can pass
130130
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-install.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ Available since `v2.11.3`.
7171
\[Advanced] Specifies an alternate lock file to use as the input to
7272
dependency resolution.
7373

74+
#### `--lock-output=<file>`
75+
76+
\[Advanced] Specifies an alternate location to save the lock file
77+
generated by dependency resolution.
78+
79+
Available since `v2.14.1`.
80+
7481
#### `--no-strict-mode`
7582

7683
\[Advanced] Turn off strict mode to avoid a warning when resolving
@@ -158,7 +165,7 @@ value.
158165
#### `--registries-auth-stdin`
159166

160167
Authenticate to GitHub Enterprise Server Container registries by passing
161-
a comma-separated list of \<registry\_url>=\<token> pairs.
168+
a comma-separated list of `<registry_url>=<token>` pairs.
162169

163170
For example, you can pass
164171
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-publish.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ directory.
195195
#### `--registries-auth-stdin`
196196

197197
Authenticate to GitHub Enterprise Server Container registries by passing
198-
a comma-separated list of \<registry\_url>=\<token> pairs.
198+
a comma-separated list of `<registry_url>=<token>` pairs.
199199

200200
For example, you can pass
201201
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-resolve-dependencies.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ and will not be added to the package lock.
101101
\[Advanced] Specifies an alternate lock file to use as the input to
102102
dependency resolution.
103103

104+
#### `--lock-output=<file>`
105+
106+
\[Advanced] Specifies an alternate location to save the lock file
107+
generated by dependency resolution.
108+
109+
Available since `v2.14.1`.
110+
104111
### Options for resolving QL packs outside of the package registry
105112

106113
#### `--search-path=<dir>[:<dir>...]`
@@ -147,7 +154,7 @@ value.
147154
#### `--registries-auth-stdin`
148155

149156
Authenticate to GitHub Enterprise Server Container registries by passing
150-
a comma-separated list of \<registry\_url>=\<token> pairs.
157+
a comma-separated list of `<registry_url>=<token>` pairs.
151158

152159
For example, you can pass
153160
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/pack-upgrade.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ Available since `v2.11.3`.
6868
\[Advanced] Specifies an alternate lock file to use as the input to
6969
dependency resolution.
7070

71+
#### `--lock-output=<file>`
72+
73+
\[Advanced] Specifies an alternate location to save the lock file
74+
generated by dependency resolution.
75+
76+
Available since `v2.14.1`.
77+
7178
#### `--no-strict-mode`
7279

7380
\[Advanced] Turn off strict mode to avoid a warning when resolving
@@ -124,7 +131,7 @@ value.
124131
#### `--registries-auth-stdin`
125132

126133
Authenticate to GitHub Enterprise Server Container registries by passing
127-
a comma-separated list of \<registry\_url>=\<token> pairs.
134+
a comma-separated list of `<registry_url>=<token>` pairs.
128135

129136
For example, you can pass
130137
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

Diff for: content/code-security/codeql-cli/codeql-cli-manual/query-compile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ directory.
234234
#### `--registries-auth-stdin`
235235

236236
Authenticate to GitHub Enterprise Server Container registries by passing
237-
a comma-separated list of \<registry\_url>=\<token> pairs.
237+
a comma-separated list of `<registry_url>=<token>` pairs.
238238

239239
For example, you can pass
240240
`https://containers.GHEHOSTNAME1/v2/=TOKEN1,https://containers.GHEHOSTNAME2/v2/=TOKEN2`

0 commit comments

Comments
 (0)