You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/code-security/securing-your-organization/troubleshooting-security-configurations/a-repository-is-using-advanced-setup-for-code-scanning.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,21 @@ topics:
15
15
16
16
## About the problem
17
17
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
19
21
20
22
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:
21
23
22
24
***{% data variables.product.prodname_code_scanning_caps %} default setup will not be enabled**, and advanced setup will continue to run as normal.
23
25
***All other security features enabled in the configuration will be enabled.**
24
26
***The {% data variables.product.prodname_security_configuration %} will not be attached** to the repository, since only some features from the configuration are enabled.
25
27
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 %}
27
31
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.
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 %}.
> 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._
0 commit comments