Skip to main content

Push protection for users

You can use secret scanning to block commits containing secrets in any public repository by enabling push protection for yourself.

Note: Push protection for users is currently in beta and subject to change.

About push protection for users

With push protection for users, you can enable push protection for yourself, so that no matter which public repository you push to, you will be protected. Additionally, if you are a repository administrator, or an organization owner, you can enable push protection for your repository or organization, respectively. For more information, see "Push protection for repositories and organizations."

If push protection is not enabled for the repository you are pushing to, but you have push protection for yourself enabled, no alerts will be created after you push a secret. However, if the bypassed secret is a GitHub token, the token will be revoked and you will be notified by email.

For information on the secrets and service providers supported for push protection, see "secret scanning パターン."

Enabling push protection for yourself

You can enable push protection for yourself through your personal account settings.

  1. 任意のページで、右上隅にあるプロファイルの画像をクリックし、次に[設定]をクリックします。

    GitHub のアカウント メニューのスクリーンショット。ユーザーがプロファイル、コンテンツ、設定を表示および編集するためのオプションが表示されています。 メニュー項目 [設定] が濃いオレンジ色の枠線で囲まれています。

  2. サイドバーの [セキュリティ] セクションで、 [コードのセキュリティと分析] をクリックします。

  3. Under "User", to the right of "Push protection for yourself", click Enable.

    Screenshot of the "User" section of the "Code security and analysis" settings page. A button labeled "Enable" is outlined in dark orange.