Skip to content

Commit 733acc6

Browse files
authored
Merge pull request #42568 from github/repo-sync
Repo sync
2 parents 18e2626 + 0be0c6d commit 733acc6

33 files changed

+105
-97
lines changed

content/code-security/concepts/code-scanning/setup-types.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: About setup types for code scanning
33
shortTitle: Setup types
4-
intro: Depending on your needs, {% data variables.product.github %} offers a default or advanced setup for code scanning.
4+
intro: Depending on your needs, {% data variables.product.github %} offers a default or advanced setup for {% data variables.product.prodname_code_scanning %}.
55
topics:
66
- Code Security
77
- Code scanning
@@ -14,7 +14,7 @@ contentType: concepts
1414

1515
## About default setup
1616

17-
Default setup for {% data variables.product.prodname_code_scanning %} is the quickest, easiest, most low-maintenance way to enable {% data variables.product.prodname_code_scanning %} for your repository. Based on the code in your repository, default setup will automatically create a custom {% data variables.product.prodname_code_scanning %} configuration. After enabling default setup, the code written in {% data variables.product.prodname_codeql %}-supported languages in your repository will be scanned:
17+
Default setup for {% data variables.product.prodname_code_scanning %} is the quickest, easiest, most low-maintenance way to enable {% data variables.product.prodname_code_scanning %} for your repository. Based on the code in your repository, default setup will automatically create a custom {% data variables.product.prodname_code_scanning %} configuration. After enabling default setup, the code written in {% data variables.product.prodname_codeql %}-supported languages in your repository will be scanned using {% data variables.product.prodname_codeql %}:
1818

1919
* On each push to the repository's default branch, or any protected branch. For more information on protected branches, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches).
2020
* When creating or committing to a pull request based against the repository's default branch, or any protected branch, excluding pull requests from forks.
@@ -46,16 +46,25 @@ Unless you have a specific use case, we recommend that you only assign runners w
4646

4747
## About advanced setup
4848

49-
Advanced setup for {% data variables.product.prodname_code_scanning %} is helpful when you need to customize your {% data variables.product.prodname_code_scanning %}. By creating and editing a workflow file, you can define how to build compiled languages, choose which queries to run, select the languages to scan, use a matrix build, and more. You also have access to all the options for controlling workflows, for example: changing the scan schedule, defining workflow triggers, specifying specialist runners to use.
49+
Advanced setup for {% data variables.product.prodname_code_scanning %} is helpful when you need to customize your {% data variables.product.prodname_code_scanning %}. You can set up {% data variables.product.prodname_code_scanning %} with {% data variables.product.prodname_actions %} or an external continuous integration or continuous delivery/deployment (CI/CD) system.
5050

51-
{% ifversion fpt or ghec %}
52-
You can also configure {% data variables.product.prodname_code_scanning %} with third-party tools.
51+
{% data reusables.code-scanning.about-multiple-configurations-link %}
52+
53+
### With {% data variables.product.prodname_actions %}
5354

54-
{% else %}
55+
By creating and editing a {% data variables.product.prodname_actions %} workflow file, you can define how to build compiled languages, choose which queries to run, select the languages to scan, use a matrix build, and more. You also have access to all the options for controlling workflows, for example: changing the scan schedule, defining workflow triggers, specifying specialist runners to use.
56+
57+
{% ifversion ghes %}
5558
Your site administrator can also make third-party actions available to users for {% data variables.product.prodname_code_scanning %}, by setting up {% data variables.product.prodname_github_connect %}. For more information, see [AUTOTITLE](/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance#configuring-github-connect-to-sync-github-actions).
5659
{% endif %}
5760

58-
{% data reusables.code-scanning.about-multiple-configurations-link %}
61+
### With a third-party CI/CD system
62+
63+
As an alternative to running {% data variables.product.prodname_code_scanning %} within {% data variables.product.github %} using {% data variables.product.prodname_actions %}, you can analyze code in an external CI/CD system, then upload the results to {% data variables.product.github %}.
64+
65+
The {% data variables.product.prodname_codeql_cli %} is a standalone, command-line tool that you can use to analyze code. You can add the {% data variables.product.prodname_codeql_cli %} to your third-party system, or use another third-party static analysis tool that can produce results as Static Analysis Results Interchange Format (SARIF) 2.1.0 data. For more information, see [AUTOTITLE](/code-security/codeql-cli/getting-started-with-the-codeql-cli/about-the-codeql-cli) and [AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning).
66+
67+
Alerts for {% data variables.product.prodname_code_scanning %} that you generate externally are displayed in the same way as those for {% data variables.product.prodname_code_scanning %} that you generate within {% data variables.product.github %}.
5968

6069
## Next steps
6170

content/code-security/how-tos/scan-code-for-vulnerabilities/integrate-with-existing-tools/using-code-scanning-with-your-existing-ci-system.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,8 @@ contentType: how-tos
2727

2828
{% data reusables.code-scanning.enterprise-enable-code-scanning %}
2929

30-
## About using {% data variables.product.prodname_code_scanning %} with your existing CI system
31-
3230
As an alternative to running {% data variables.product.prodname_code_scanning %} within {% data variables.product.github %} using {% data variables.product.prodname_actions %}, you can analyze code in an external continuous integration or continuous delivery/deployment (CI/CD) system, then upload the results to {% data variables.product.github %}.
3331

34-
You can add the {% data variables.product.prodname_codeql_cli %} to your third-party system, or use another third-party static analysis tool that can produce results as Static Analysis Results Interchange Format (SARIF) 2.1.0 data. For more information about the supported SARIF format, see [AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning).
35-
36-
The {% data variables.product.prodname_codeql_cli %} is a standalone, command-line tool that you can use to analyze code. For more information, see [AUTOTITLE](/code-security/codeql-cli/getting-started-with-the-codeql-cli/about-the-codeql-cli).
37-
38-
Alerts for {% data variables.product.prodname_code_scanning %} that you generate externally are displayed in the same way as those for {% data variables.product.prodname_code_scanning %} that you generate within {% data variables.product.github %}. {% data reusables.code-scanning.about-multiple-configurations-link %}
39-
4032
{% data reusables.code-scanning.upload-sarif-ghas %}
4133

4234
## Setting up your analysis tool

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

0 commit comments

Comments
 (0)