Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 3.36 KB

enabling-push-protection-for-your-repository.md

File metadata and controls

58 lines (40 loc) · 3.36 KB
title shortTitle intro permissions versions type topics
Enabling push protection for your repository
Enable push protection
With push protection, {% data variables.product.prodname_secret_scanning %} blocks contributors from pushing secrets to a repository and generates an alert whenever a contributor bypasses the block.
{% data reusables.permissions.push-protection %}
fpt ghes ghec
*
*
*
how_to
Secret scanning
Advanced Security
Alerts

About enabling push protection

To enable push protection for a repository, you must first enable {% data variables.product.prodname_secret_scanning %}. You can then enable push protection in the repository's "Code security" settings page following the steps outlined in this article.

{% ifversion secret-scanning-push-protection-for-users %}

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.prodname_dotcom %}. For more information, see "AUTOTITLE."

{% endif %}

{% ifversion security-configurations %}

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."

{% else %}

If you're an organization owner, you can enable push protection for multiple repositories at a time. For more information, see "AUTOTITLE."

{% endif %}

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" and expand the "Properties of the security_and_analysis object" section.

{% ifversion secret-scanning-enterprise-level %}

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."

{% endif %}

Enabling push protection for a repository

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %} {% data reusables.repositories.navigate-to-ghas-settings %} {% data reusables.advanced-security.secret-scanning-push-protection-repo %}

Further reading