Skip to content

Commit ba3c74f

Browse files
mchammer01Copilotcourtneyclam-stead
authored
Configuration for push protected patterns in secret scanning [Public Preview] (#55891)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Courtney Claessens <courtneycl@github.com> Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com>
1 parent ae8c7fe commit ba3c74f

File tree

7 files changed

+75
-4
lines changed

7 files changed

+75
-4
lines changed

content/admin/managing-code-security/securing-your-enterprise/configuring-additional-secret-scanning-settings-for-your-enterprise.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ topics:
1616
There are some additional {% data variables.product.prodname_secret_scanning %} settings that cannot be applied to repositories using {% data variables.product.prodname_security_configurations %}, so you must configure these settings separately:
1717

1818
* [Configuring a resource link for push protection](#configuring-a-resource-link-for-push-protection)
19-
* [Controlling features for new repositories created in a user namespace](#controlling-features-for-new-repositories-created-in-a-user-namespace)
19+
* [Controlling features for new repositories created in a user namespace](#controlling-features-for-new-repositories-created-in-a-user-namespace){% ifversion push-protected-pattern-configuration %}
20+
* [Specifying patterns to include in push protection for your enterprise](#specifying-patterns-to-include-in-push-protection-for-your-enterprise){% endif %}
2021

2122
These additional settings apply only to repositories with {% data variables.product.prodname_secret_scanning %} and {% data variables.product.prodname_GHAS %} both enabled{% ifversion ghas-products %}, or with {% data variables.product.prodname_GH_secret_protection %} enabled{% endif %}.
2223

@@ -31,11 +32,25 @@ These additional settings apply only to repositories with {% data variables.prod
3132

3233
To provide context for developers when {% data variables.product.prodname_secret_scanning %} blocks a commit, you can display a link with more information on why the commit was blocked.
3334

34-
1. Under "Additional settings", to the right of "Resource link for push protection", click **{% octicon "pencil" aria-hidden="true" aria-label="pencil" %}**.
35+
1. Under "Additional settings", in the "{% data variables.product.UI_secret_protection_scanning %}" section and to the right of "Resource link for push protection", click **{% octicon "pencil" aria-hidden="true" aria-label="pencil" %}**.
3536
1. In the text box, type the link to the desired resource, then click **{% octicon "check" aria-label="Save" %}**.
3637

3738
### Controlling features for new repositories created in a user namespace
3839

3940
To ensure that any repositories created by users outside of an organization are protected by the same security features as repositories created within an organization, you can enable or disable {% data variables.product.prodname_secret_scanning %} features for new repositories created in a user namespace.
4041

4142
Under "Additional settings", use the options in the "User namespace repositories" section to enable or disable features for new repositories.
43+
44+
{% ifversion push-protected-pattern-configuration %}
45+
46+
### Specifying patterns to include in push protection for your enterprise
47+
48+
{% data reusables.secret-scanning.push-protected-pattern-configuration-org-enterprise-preview %}
49+
50+
You can customize which secret patterns are included in push protection, giving security teams greater control over what types of secrets are blocked in the repositories in your enterprise.
51+
52+
1. Under "Additional settings", in the "{% data variables.product.UI_secret_protection_scanning %}" section, click anywhere inside the "Pattern configurations for push protection" row.
53+
1. In the page that gets displayed, make the desired changes in the "Enterprise setting" column.
54+
{% data reusables.secret-scanning.pattern-enablement-org-enterprise %}
55+
56+
{% endif %}

content/admin/overview/establishing-a-governance-framework-for-your-enterprise.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ See [AUTOTITLE](/code-security/secret-scanning/introduction/about-push-protectio
9494

9595
Push protection can be enabled at the organization, repository, and user account level. See [AUTOTITLE](/code-security/secret-scanning/enabling-secret-scanning-features/enabling-push-protection-for-your-repository).
9696

97+
{% ifversion push-protected-pattern-configuration %}
98+
99+
{% data reusables.secret-scanning.push-protected-pattern-configuration-org-enterprise-preview %}
100+
101+
To align secret detection with internal security policies and more effectively prevent unauthorized exposure of sensitive information in your repositories, you can customize which secret patterns are included in push protection at the enterprise or organization level. See [AUTOTITLE](/admin/managing-code-security/securing-your-enterprise/configuring-additional-secret-scanning-settings-for-your-enterprise#specifying-patterns-to-include-in-push-protection-for-your-enterprise) and [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/configuring-global-security-settings-for-your-organization#specifying-patterns-to-include-in-push-protection).
102+
103+
{% endif %}
104+
97105
{% ifversion push-protection-delegated-bypass %}
98106

99107
## Setting up an approval process for sensitive actions

content/code-security/secret-scanning/introduction/about-push-protection.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ Every user across {% data variables.product.prodname_dotcom %} can also enable p
8888

8989
Once push protection is enabled, you can customize it further:
9090

91+
{% ifversion push-protected-pattern-configuration %}
92+
93+
### Configure push protected patterns
94+
95+
Customize which secret patterns are included in push protection at the enterprise or organization level. See [AUTOTITLE](/admin/managing-code-security/securing-your-enterprise/configuring-additional-secret-scanning-settings-for-your-enterprise#specifying-patterns-to-include-in-push-protection-for-your-enterprise) and [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/configuring-global-security-settings-for-your-organization#specifying-patterns-to-include-in-push-protection).
96+
97+
{% endif %}
98+
9199
### Define custom patterns
92100

93101
Define custom patterns that push protection can use to identify secrets and block pushes containing these secrets. For more information, see [AUTOTITLE](/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/defining-custom-patterns-for-secret-scanning).

content/code-security/securing-your-organization/enabling-security-features-in-your-organization/configuring-global-security-settings-for-your-organization.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ You can customize several {% data variables.product.prodname_global_settings %}
7878
* [Enabling {% data variables.copilot.copilot_autofix_short %} for {% data variables.product.prodname_codeql %}](#enabling-copilot-autofix-for-codeql)
7979
* [Enabling {% data variables.copilot.copilot_autofix_short %} for third-party {% data variables.product.prodname_code_scanning %} tools](#enabling-copilot-autofix-for-third-party-code-scanning-tools) {% endif %}
8080
* [Recommending the extended query suite for default setup](#recommending-the-extended-query-suite-for-default-setup){% ifversion ghes < 3.17 %}
81-
* [Setting a failure threshold for {% data variables.product.prodname_code_scanning %} checks in pull requests](#setting-a-failure-threshold-for-code-scanning-checks-in-pull-requests){% endif %}
81+
* [Setting a failure threshold for {% data variables.product.prodname_code_scanning %} checks in pull requests](#setting-a-failure-threshold-for-code-scanning-checks-in-pull-requests)
8282

8383
{% endif %}
8484

@@ -116,7 +116,8 @@ You can choose the severity levels at which {% data variables.product.prodname_c
116116
You can customize several {% data variables.product.prodname_global_settings %} for {% data variables.product.prodname_secret_scanning %}:
117117

118118
* [Adding a resource link for blocked commits](#adding-a-resource-link-for-blocked-commits)
119-
* [Defining custom patterns](#defining-custom-patterns)
119+
* [Defining custom patterns](#defining-custom-patterns){% endif %}{% ifversion push-protected-pattern-configuration %}
120+
* [Specifying patterns to include in push protection](#specifying-patterns-to-include-in-push-protection){% endif %}
120121

121122
### Adding a resource link for blocked commits
122123

@@ -126,6 +127,20 @@ To provide context for developers when {% data variables.product.prodname_secret
126127

127128
You can define custom patterns for {% data variables.product.prodname_secret_scanning %} with regular expressions. Custom patterns can identify secrets that are not detected by the default patterns supported by {% data variables.product.prodname_secret_scanning %}. To create a custom pattern, click **New pattern**, then enter the details for your pattern and click **Save and dry run**. For more information on custom patterns, see [AUTOTITLE](/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/custom-patterns/defining-custom-patterns-for-secret-scanning).
128129

130+
{% ifversion push-protected-pattern-configuration %}
131+
132+
### Specifying patterns to include in push protection
133+
134+
{% data reusables.secret-scanning.push-protected-pattern-configuration-org-enterprise-preview %}
135+
136+
You can customize which secret patterns are included in push protection, giving security teams greater control over what types of secrets are blocked in the repositories in your organization.
137+
138+
1. Under "Additional settings", in the "{% data variables.product.prodname_secret_scanning_caps %}" section and to the right of "Pattern configurations", click **{% octicon "gear" aria-label="The Gear icon" %}**.
139+
1. In the page that gets displayed, make the desired changes in the "Organization setting" column.
140+
{% data reusables.secret-scanning.pattern-enablement-org-enterprise %}
141+
142+
{% endif %}
143+
129144
## Creating security managers for your organization
130145

131146
The security manager role grants members of your organization the ability to manage security settings and alerts across your organization. Security managers can view data for all repositories in your organization through security overview.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Issue 16897
2+
# Configuration for push protected patterns in secret scanning [Public Preview]
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>3.18'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
You can enable or disable push protection for individual patterns by using the toggle in the relevant column: "Enterprise setting" at the enterprise level, and "Organization setting" at the organization level.
2+
3+
The data is limited to the scope, therefore the alert volume, false positives, bypass rate, or availability of custom patterns is reflective of user / alert activity within the _enterprise_ or _organization_.
4+
5+
The {% data variables.product.github %} default may change over time as we increase precision and promote patterns.
6+
7+
> [!NOTE] Organization administrators and security teams can override settings configured at the enterprise level.
8+
9+
| Column | Description |
10+
|---------------------------------------------|----------------------------------------------|
11+
| Name | Name of the pattern or secret |
12+
| Alert total | Total number of alerts for the pattern (percentage and absolute numbers) |
13+
| False positives | Percentage of false positives for the pattern |
14+
| Bypass rate | Percentage of bypasses for the pattern |
15+
| {% data variables.product.github %} default | Default behavior for push protection, as recommended by {% data variables.product.github %} |
16+
| Enterprise setting | **Uneditable at organization level**</br>Current enablement status for push protection</br>Can be `Enabled`, `Disabled`, and `Default`.</br>At enterprise level, `Default` is the default value. |
17+
| Organization setting | **Only valid at organization level**</br>Current enablement status for push protection</br>Can be `Enabled`, `Disabled`, and `Enterprise` (inherited from the enterprise).</br>`Enterprise` is the default value. |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> [!NOTE]
2+
> The configuration of patterns for push protection at enterprise and organization level is currently in {% data variables.release-phases.public_preview %} and subject to change.

0 commit comments

Comments
 (0)