Skip to content

Commit 944ae5e

Browse files
authored
[EDI] Enabling push protection for your repository (#59320)
1 parent c5399dd commit 944ae5e

File tree

1 file changed

+2
-35
lines changed

1 file changed

+2
-35
lines changed

content/code-security/how-tos/secure-your-secrets/prevent-future-leaks/enabling-push-protection-for-your-repository.md

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,11 @@ redirect_from:
1616
- /code-security/secret-scanning/enabling-secret-scanning-features/enabling-push-protection-for-your-repository
1717
---
1818

19-
## About enabling push protection
20-
21-
To enable push protection for a repository, you must first enable {% ifversion ghas-products %}{% data variables.product.prodname_secret_protection %}{% else %}{% data variables.product.prodname_secret_scanning %}{% endif %}. You can then enable push protection in the repository's "{% data variables.product.UI_advanced_security %}" settings page following the steps outlined in this article.
22-
23-
{% ifversion secret-scanning-push-protection-for-users %}
24-
25-
You can additionally enable push protection for your own personal account, which prevents you from pushing secrets to _any_ public repository on {% data variables.product.github %}. For more information, see [AUTOTITLE](/code-security/secret-scanning/working-with-secret-scanning-and-push-protection/push-protection-for-users).
26-
27-
{% endif %}
28-
29-
{% ifversion security-configurations %}
30-
31-
If you're an organization owner, you can enable push protection for multiple repositories at a time using {% data variables.product.prodname_security_configurations %}. For more information, see [AUTOTITLE](/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/about-enabling-security-features-at-scale).
32-
33-
{% else %}
34-
35-
If you're an organization owner, you can enable push protection for multiple repositories at a time. For more information, see [AUTOTITLE](/code-security/getting-started/quickstart-for-securing-your-organization#enabling-security-features-in-your-organization).
36-
37-
{% endif %}
38-
39-
Organization owners, security managers, and repository administrators can also enable push protection for {% data variables.product.prodname_secret_scanning %} via the API. For more information, see [AUTOTITLE](/rest/repos#update-a-repository) and expand the "Properties of the `security_and_analysis` object" section.
40-
41-
{% ifversion security-configuration-enterprise-level %}
42-
43-
If your organization is owned by an enterprise account, an enterprise owner can also enable push protection at the enterprise level. For more information, see [AUTOTITLE](/admin/managing-code-security/securing-your-enterprise/creating-a-custom-security-configuration-for-your-enterprise).
44-
45-
{% elsif ghes < 3.16 %}
46-
47-
If your organization is owned by an enterprise account, an enterprise owner can also enable push protection at the enterprise level. For more information, see [AUTOTITLE](/admin/managing-code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise).
48-
49-
{% endif %}
50-
51-
## Enabling push protection for a repository
52-
5319
{% data reusables.repositories.navigate-to-repo %}
5420
{% data reusables.repositories.sidebar-settings %}
5521
{% data reusables.repositories.navigate-to-code-security-and-analysis %}{% ifversion ghas-products %}
56-
1. Under "{% data variables.product.prodname_secret_protection %}", to the right of "Push Protection", click **Enable**.{% else %}
22+
1. If you have not already enabled {% data variables.product.prodname_secret_protection %}, to the right of "{% data variables.product.prodname_secret_protection %}", click **Enable**.
23+
1. In the "{% data variables.product.prodname_secret_protection %}" section, to the right of "Push protection", click **Enable**.{% else %}
5724
{% data reusables.repositories.navigate-to-ghas-settings %}
5825
{% data reusables.advanced-security.secret-scanning-push-protection-repo %}{% endif %}
5926

0 commit comments

Comments
 (0)