Skip to content

Commit 30c1bb4

Browse files
felicitymayCopilotmchammer01
authored
Security configurations: Add new troubleshooting article for advanced setup (#56913)
Co-authored-by: Copilot <[email protected]> Co-authored-by: mc <[email protected]>
1 parent 6efaaf8 commit 30c1bb4

File tree

5 files changed

+48
-10
lines changed

5 files changed

+48
-10
lines changed

content/code-security/securing-your-organization/troubleshooting-security-configurations/a-repository-is-using-advanced-setup-for-code-scanning.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ topics:
1515

1616
## About the problem
1717

18-
You cannot successfully apply a {% data variables.product.prodname_security_configuration %} with {% data variables.product.prodname_code_scanning %} default setup set to "Enabled" to a target repository that uses advanced setup for {% data variables.product.prodname_code_scanning %}. Advanced setups are tailored to the specific security needs of their repositories, so they are not intended to be overridden at scale.
18+
You cannot successfully apply a {% data variables.product.prodname_security_configuration %} with {% data variables.product.prodname_code_scanning %} default setup set to "Enabled" to a target repository that has an active configuration of advanced setup for {% data variables.product.prodname_code_scanning %}. Advanced setups are tailored to the specific security needs of the repositories they are applied to, so they are not intended to be overridden at scale.
19+
20+
### Active advanced setup
1921

2022
If you try to attach a {% data variables.product.prodname_security_configuration %} with {% data variables.product.prodname_code_scanning %} set to "Enabled" to a repository that already uses advanced setup, security settings will be applied as follows:
2123

2224
* **{% data variables.product.prodname_code_scanning_caps %} default setup will not be enabled**, and advanced setup will continue to run as normal.
2325
* **All other security features enabled in the configuration will be enabled.**
2426
* **The {% data variables.product.prodname_security_configuration %} will not be attached** to the repository, since only some features from the configuration are enabled.
2527

26-
For all repositories without an active advanced setup, the {% data variables.product.prodname_security_configuration %} will be applied as expected, and {% data variables.product.prodname_code_scanning %} default setup will be enabled.
28+
### Inactive or absent advanced setup
29+
30+
{% data reusables.code-scanning.inactive-advanced-setup %}
2731

28-
> [!NOTE]
29-
> If advanced setup is considered inactive for a repository, default setup _will_ still be enabled for that repository. Advanced setup is considered inactive for a repository if the repository meets any of the following criteria:
30-
> * The latest {% data variables.product.prodname_codeql %} analysis is more than 90 days old
31-
> * All {% data variables.product.prodname_codeql %} configurations have been deleted
32-
> * The workflow file has been deleted or disabled (exclusively for YAML-based advanced setup)
32+
If there is no advanced setup or the advanced setup is inactive, then default setup is enabled and the {% data variables.product.prodname_security_configuration %} applied as expected.
3333

3434
## Solving the problem
3535

content/code-security/securing-your-organization/troubleshooting-security-configurations/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Troubleshooting security configurations
3-
shortTitle: Troubleshooting configurations
3+
shortTitle: Troubleshoot configurations
44
intro: 'To successfully apply a {% data variables.product.prodname_security_configuration %}, you may need to troubleshoot unexpected issues.'
55
versions:
66
feature: security-configurations
@@ -11,6 +11,7 @@ topics:
1111
- Security
1212
children:
1313
- /a-repository-is-using-advanced-setup-for-code-scanning
14+
- /unexpected-default-setup
1415
- /not-enough-github-advanced-security-licenses
1516
- /feature-disappears
1617
---
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Default setup for code scanning overrides advanced setup
3+
shortTitle: Unexpected default setup
4+
intro: 'You apply a {% data variables.product.prodname_security_configuration %} with "Enabled with advanced setup allowed" and the existing advanced setup for {% data variables.product.prodname_code_scanning %} is ignored in some repositories.'
5+
permissions: '{% data reusables.permissions.security-org-enable %}'
6+
versions:
7+
feature: security-configurations
8+
topics:
9+
- Code Security
10+
- Organizations
11+
- Security
12+
---
13+
14+
## About the problem
15+
16+
When you apply a {% data variables.product.prodname_security_configuration %} and {% data variables.product.prodname_code_scanning %} is defined as "Enabled with advanced setup allowed", each repository is checked to see if there is an existing, active, advanced setup.
17+
18+
* **No change to {% data variables.product.prodname_code_scanning %}** if an **active** advanced setup configuration is detected.
19+
* **Default setup is enabled** for repositories where advanced setup is **inactive or absent**.
20+
21+
### Inactive or absent advanced setup
22+
23+
{% data reusables.code-scanning.inactive-advanced-setup %}
24+
25+
## Solving the problem
26+
27+
This solution has two parts:
28+
29+
1. Any repositories where default setup for {% data variables.product.prodname_code_scanning %} was unexpectedly applied need to run {% data variables.product.prodname_codeql %} analysis at intervals of less than 90 days, for example, once a month.
30+
31+
Even if the repository is not under active development, new vulnerabilities may be identified by updates to {% data variables.product.prodname_codeql %} analysis.
32+
33+
1. Once the affected repositories all have {% data variables.product.prodname_codeql %} analysis running, you can reapply the {% data variables.product.prodname_security_configuration %}.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
> [!NOTE]
2-
> To create a configuration that you can apply to a repository that uses advanced setup for {% data variables.product.prodname_codeql %}, choose "Enabled with advanced setup allowed". This setting enables default setup in repositories where advanced setup for {% data variables.product.prodname_codeql %} is not detected.
3-
> _Option available from {% data variables.product.prodname_ghe_server %} 3.19._
2+
> To create a configuration that you can apply to all repositories regardless of current {% data variables.product.prodname_code_scanning %} setup, choose "Enabled with advanced setup allowed". This setting enables default setup only in repositories where {% data variables.product.prodname_codeql %} analysis is not actively run. _Option available from {% data variables.product.prodname_ghe_server %} 3.19._
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Advanced setup is considered **inactive** for a repository if the repository meets any of the following criteria:
2+
3+
* The latest {% data variables.product.prodname_codeql %} analysis is more than 90 days old.
4+
* All {% data variables.product.prodname_codeql %} configurations have been deleted.
5+
* The workflow file has been deleted or disabled (exclusively for advanced setup run using actions).

0 commit comments

Comments
 (0)