Skip to content

Commit 2e7690c

Browse files
authored
Merge pull request #42519 from github/repo-sync
Repo sync
2 parents 0fca3d2 + 92b7dc5 commit 2e7690c

File tree

11 files changed

+199
-143
lines changed

11 files changed

+199
-143
lines changed

content/admin/data-residency/network-details-for-ghecom.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,43 @@ Japan region:
177177

178178
### Domains for Azure private networking
179179

180+
#### Required for all regions
181+
180182
* `*.<TENANT>.ghe.com`
181183
* `<TENANT>.ghe.com`
182184
* `github.com`
183185
* `*.githubusercontent.com`
184-
* `*.blob.core.windows.net`
186+
* `*.blob.core.windows.net` (can be further restricted by region, see below)
185187
* `*.web.core.windows.net`
186188

189+
#### EU
190+
191+
`*.blob.core.windows.net` can be replaced with:
192+
* `prodsdc01resultssa0.blob.core.windows.net`
193+
* `prodsdc01resultssa1.blob.core.windows.net`
194+
* `prodsdc01resultssa2.blob.core.windows.net`
195+
* `prodsdc01resultssa3.blob.core.windows.net`
196+
* `prodweu01resultssa0.blob.core.windows.net`
197+
* `prodweu01resultssa1.blob.core.windows.net`
198+
* `prodweu01resultssa2.blob.core.windows.net`
199+
* `prodweu01resultssa3.blob.core.windows.net`
200+
201+
#### Australia
202+
203+
`*.blob.core.windows.net` can be replaced with:
204+
* `prodae01resultssa0.blob.core.windows.net`
205+
* `prodae01resultssa1.blob.core.windows.net`
206+
* `prodae01resultssa2.blob.core.windows.net`
207+
* `prodae01resultssa3.blob.core.windows.net`
208+
209+
#### Japan
210+
211+
`*.blob.core.windows.net` can be replaced with:
212+
* `prodjpw01resultssa0.blob.core.windows.net`
213+
* `prodjpw01resultssa1.blob.core.windows.net`
214+
* `prodjpw01resultssa2.blob.core.windows.net`
215+
* `prodjpw01resultssa3.blob.core.windows.net`
216+
187217
## IP ranges for {% data variables.product.prodname_importer_proper_name %}
188218

189219
If you're running a migration to your enterprise with {% data variables.product.prodname_importer_proper_name %}, you may need to add certain ranges to an IP allow list. See [AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/managing-access-for-a-migration-between-github-products#configuring-ip-allow-lists-for-migrations).

content/code-security/concepts/code-scanning/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ contentType: concepts
1515
children:
1616
- /about-code-scanning
1717
- /about-code-scanning-alerts
18-
- /evaluating-default-setup-for-code-scanning
18+
- /setup-types
1919
- /about-integration-with-code-scanning
2020
- /codeql
2121
---
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: About setup types for code scanning
3+
shortTitle: Setup types
4+
intro: Depending on your needs, {% data variables.product.github %} offers a default or advanced setup for code scanning.
5+
topics:
6+
- Code Security
7+
- Code scanning
8+
versions:
9+
fpt: '*'
10+
ghes: '*'
11+
ghec: '*'
12+
contentType: concepts
13+
---
14+
15+
## About default setup
16+
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:
18+
19+
* 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).
20+
* When creating or committing to a pull request based against the repository's default branch, or any protected branch, excluding pull requests from forks.
21+
* On a weekly schedule.
22+
23+
If you need more granular control over your {% data variables.product.prodname_code_scanning %} configuration, you should instead configure advanced setup.
24+
25+
### Supported languages
26+
27+
{% data reusables.code-scanning.default-setup-pre-enablement-explanation %}
28+
29+
If the code in a repository changes to include any {% data variables.product.prodname_codeql %}-supported languages, {% data variables.product.prodname_dotcom %} will automatically update the {% data variables.product.prodname_code_scanning %} configuration to include the new language. If {% data variables.product.prodname_code_scanning %} fails with the new configuration, {% data variables.product.prodname_dotcom %} will resume the previous configuration automatically so the repository does not lose {% data variables.product.prodname_code_scanning %} coverage.
30+
31+
### Available runners
32+
33+
You can use default setup for all {% data variables.product.prodname_codeql %}-supported languages on self-hosted runners or {% data variables.product.prodname_dotcom %}-hosted runners.
34+
35+
You can assign self-hosted runners for default setup by giving the runners {% ifversion code-scanning-default-setup-customize-labels %}the default `code-scanning` label, or you can optionally give them custom labels so that individual repositories can use different runners.{% else %}the `code-scanning` label.{% endif %}
36+
37+
{% ifversion code-scanning-default-setup-customize-labels %}
38+
39+
Unless you have a specific use case, we recommend that you only assign runners with the default `code-scanning` label. However, you may want to use custom labels to:
40+
41+
* Assign more powerful self-hosted runners to critical repositories for faster {% data variables.product.prodname_code_scanning %} analysis.
42+
* Run your {% data variables.product.prodname_code_scanning %} analyses on a particular platform (for example, macOS).
43+
* Have granular control over the workload for your {% data variables.product.prodname_dotcom %}-hosted runners and self-hosted runners.
44+
45+
{% endif %}
46+
47+
## About advanced setup
48+
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.
50+
51+
{% ifversion fpt or ghec %}
52+
You can also configure {% data variables.product.prodname_code_scanning %} with third-party tools.
53+
54+
{% else %}
55+
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).
56+
{% endif %}
57+
58+
{% data reusables.code-scanning.about-multiple-configurations-link %}
59+
60+
## Next steps
61+
62+
You can enable default setup for a single repository, multiple repositories, or all repositories in an organization at the same time.
63+
64+
* For a single repository, see [AUTOTITLE](/code-security/how-tos/scan-code-for-vulnerabilities/configure-code-scanning/configuring-default-setup-for-code-scanning).
65+
* For bulk enablement, see [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale).
66+
67+
To configure advanced setup instead, see [AUTOTITLE](/code-security/how-tos/scan-code-for-vulnerabilities/configure-code-scanning/configuring-advanced-setup-for-code-scanning).

content/code-security/how-tos/scan-code-for-vulnerabilities/configure-code-scanning/configuring-advanced-setup-for-code-scanning.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,11 @@ contentType: how-tos
2323

2424
{% data reusables.code-scanning.enterprise-enable-code-scanning-actions %}
2525

26-
## About advanced setup for {% data variables.product.prodname_code_scanning %}
27-
28-
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. For more information about {% data variables.product.prodname_actions %} workflows, see [AUTOTITLE](/actions/using-workflows/about-workflows).
29-
30-
{% ifversion fpt or ghec %}
31-
You can also configure {% data variables.product.prodname_code_scanning %} with third-party tools. For more information, see [Configuring {% data variables.product.prodname_code_scanning %} using third-party actions](#configuring-code-scanning-using-third-party-actions).
32-
33-
{% else %}
34-
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).
35-
{% endif %}
36-
37-
{% data reusables.code-scanning.about-multiple-configurations-link %}
3826
{% data reusables.code-scanning.codeql-action-version-ghes %}
3927

40-
If you do not need a highly customizable {% data variables.product.prodname_code_scanning %} configuration, consider using default setup for {% data variables.product.prodname_code_scanning %}. For more information on eligibility for default setup, see [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning#requirements-for-using-default-setup).
28+
If you do not need a highly customizable {% data variables.product.prodname_code_scanning %} configuration, consider using default setup for {% data variables.product.prodname_code_scanning %}. For more information, see [AUTOTITLE](/code-security/concepts/code-scanning/setup-types).
4129

42-
### Prerequisites
30+
## Prerequisites
4331

4432
Your repository is eligible for advanced setup if it meets these requirements.
4533
* It uses {% data variables.product.prodname_codeql %}-supported languages or you plan to generate code scanning results with a third-party tool.

content/code-security/how-tos/scan-code-for-vulnerabilities/configure-code-scanning/configuring-default-setup-for-code-scanning.md

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -27,40 +27,14 @@ versions:
2727
contentType: how-tos
2828
---
2929

30-
## About default setup
30+
We recommend that you start using {% data variables.product.prodname_code_scanning %} with default setup. After you've initially configured default setup, you can evaluate {% data variables.product.prodname_code_scanning %} to see how it's working for you and customize it to better meet your needs. For more information, see [AUTOTITLE](/code-security/concepts/code-scanning/setup-types).
3131

32-
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:
33-
* 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).
34-
* When creating or committing to a pull request based against the repository's default branch, or any protected branch, excluding pull requests from forks.
35-
* On a weekly schedule.
36-
37-
> [!NOTE]
38-
> If no pushes and pull requests have occurred in a repository with default setup enabled for 6 months, the weekly schedule will be disabled to save your {% data variables.product.prodname_actions %} minutes.
39-
40-
You can also enable default setup for multiple or all repositories in an organization at the same time. For information on bulk enablement, see [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale).
41-
42-
If you need more granular control over your {% data variables.product.prodname_code_scanning %} configuration, you should instead configure advanced setup. For more information, see [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning).
43-
44-
### Requirements for using default setup
32+
## Prerequisites
4533

4634
Your repository is eligible for default setup for {% data variables.product.prodname_code_scanning %} if:
4735

4836
{% data reusables.code-scanning.require-actions-ghcs %}
4937

50-
{% data reusables.code-scanning.default-setup-pre-enablement-explanation %}
51-
52-
You can use default setup for all {% data variables.product.prodname_codeql %}-supported languages for self-hosted runners or {% data variables.product.prodname_dotcom %}-hosted runners. See [Assigning labels to runners](#assigning-labels-to-runners), later in this article.
53-
54-
Default setup uses the `none` build mode for {% data variables.code-scanning.no_build_support %} and uses the `autobuild` build mode for other compiled languages. You should configure your self-hosted runners to make sure they can run all the necessary commands for C/C++, C#, and Swift analysis. Analysis of JavaScript/TypeScript, Go, Ruby, Python, and Kotlin code does not currently require special configuration.
55-
56-
### Customizing default setup
57-
58-
We recommend that you start using {% data variables.product.prodname_code_scanning %} with default setup. After you've initially configured default setup, you can evaluate {% data variables.product.prodname_code_scanning %} to see how it's working for you. If you find that something isn't working as you expect, you can customize default setup to better meet your needs. For more information, see [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/evaluating-default-setup-for-code-scanning).
59-
60-
### About adding new languages to your default setup
61-
62-
If the code in a repository changes to include any {% data variables.product.prodname_codeql %}-supported languages, {% data variables.product.prodname_dotcom %} will automatically update the {% data variables.product.prodname_code_scanning %} configuration to include the new language. If {% data variables.product.prodname_code_scanning %} fails with the new configuration, {% data variables.product.prodname_dotcom %} will resume the previous configuration automatically so the repository does not lose {% data variables.product.prodname_code_scanning %} coverage.
63-
6438
## Configuring default setup for a repository
6539

6640
> [!NOTE]
@@ -99,24 +73,31 @@ If the code in a repository changes to include any {% data variables.product.pro
9973
10074
1. Optionally, to view your default setup configuration after enablement, select {% octicon "kebab-horizontal" aria-label="Menu" %}, then click **{% octicon "gear" aria-hidden="true" aria-label="gear" %} View {% data variables.product.prodname_codeql %} configuration**.
10175

102-
## Assigning labels to runners
76+
> [!NOTE]
77+
> If no pushes and pull requests have occurred in a repository with default setup enabled for 6 months, the weekly schedule will be disabled to save your {% data variables.product.prodname_actions %} minutes.
10378
104-
>[!NOTE]{% data variables.product.prodname_code_scanning_caps %} sees assigned runners when default setup is enabled. If a runner is assigned to a repository that is already running default setup, you must disable and re-enable default setup to start using the runner. If you add a runner and want to start using it, you can change the configuration manually without needing to disable and re-enable default setup.
79+
{% ifversion fpt or ghec %}
10580

106-
You can also assign self-hosted runners{% ifversion code-scanning-default-setup-customize-labels %} with the default `code-scanning` label, or you can optionally give them custom labels so that individual repositories can use different runners.{% else %}with the `code-scanning` label.{% endif %} For information about assigning labels to self-hosted runners, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/using-labels-with-self-hosted-runners).
81+
## Running default setup on self-hosted or {% data variables.actions.hosted_runners %}
10782

108-
{% ifversion code-scanning-default-setup-customize-labels %}
83+
You can use default setup for all {% data variables.product.prodname_codeql %}-supported languages on self-hosted runners or {% data variables.product.prodname_dotcom %}-hosted runners.
10984

110-
Specifying custom labels for self-hosted runners is optional. Unless you have a specific use case, we recommend that you only assign runners with the default `code-scanning` label. For example, you may want to:
85+
{% else %}
11186

112-
* Assign more powerful self-hosted runners to critical repositories for faster {% data variables.product.prodname_code_scanning %} analysis.
113-
* Run your {% data variables.product.prodname_code_scanning %} analyses on a particular platform (for example, macOS).
114-
* Have granular control over the workload for your {% data variables.product.prodname_dotcom %}-hosted runners and self-hosted runners.
87+
## Assigning runners for default setup
11588

116-
Once you've assigned custom labels to self-hosted runners, your repositories can use those runners for {% data variables.product.prodname_code_scanning %} default setup. For more information, see [Configuring default setup for a repository](#configuring-default-setup-for-a-repository), earlier in this article.
89+
{% endif %}
11790

118-
You can also use {% data variables.product.prodname_security_configurations %} to assign labels to self-hosted runners for {% data variables.product.prodname_code_scanning %}. See [AUTOTITLE](/code-security/securing-your-organization/meeting-your-specific-security-needs-with-custom-security-configurations/creating-a-custom-security-configuration#creating-a-custom-security-configuration).
91+
>[!NOTE]{% data variables.product.prodname_code_scanning_caps %} sees assigned runners when default setup is enabled. If a runner is assigned to a repository that is already running default setup, you must disable and re-enable default setup to start using the runner. If you add a runner and want to start using it, you can change the configuration manually without needing to disable and re-enable default setup.
11992
93+
### Assigning labels to self-hosted runners
94+
95+
To assign a self-hosted runner for default setup, you can use {% ifversion code-scanning-default-setup-customize-labels %}the default `code-scanning` label, or you can optionally give them custom labels so that individual repositories can use different runners.{% else %}the `code-scanning` label.{% endif %} For information about assigning labels to self-hosted runners, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/using-labels-with-self-hosted-runners).
96+
97+
Once you've assigned custom labels to self-hosted runners, your repositories can use those runners for {% data variables.product.prodname_code_scanning %} default setup.
98+
99+
{% ifversion security-configurations %}
100+
You can also use {% data variables.product.prodname_security_configurations %} to assign labels to self-hosted runners for {% data variables.product.prodname_code_scanning %}. See [AUTOTITLE](/code-security/securing-your-organization/meeting-your-specific-security-needs-with-custom-security-configurations/creating-a-custom-security-configuration#creating-a-custom-security-configuration).
120101
{% endif %}
121102

122103
{% ifversion fpt or ghec %}
@@ -127,6 +108,10 @@ To assign a {% data variables.actions.hosted_runner %}, name the runner `code-sc
127108

128109
{% endif %}
129110

111+
### Ensuring build support
112+
113+
Default setup uses the `none` build mode for {% data variables.code-scanning.no_build_support %} and uses the `autobuild` build mode for other compiled languages. You should configure your self-hosted runners to make sure they can run all the necessary commands for C/C++, C#, and Swift analysis. Analysis of JavaScript/TypeScript, Go, Ruby, Python, and Kotlin code does not currently require special configuration.
114+
130115
## Next steps
131116

132117
After your configuration runs successfully at least once, you can start examining and resolving {% data variables.product.prodname_code_scanning %} alerts. For more information on {% data variables.product.prodname_code_scanning %} alerts, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts) and [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/assessing-code-scanning-alerts-for-your-repository).

0 commit comments

Comments
 (0)