Skip to main content

このバージョンの GitHub Enterprise サーバーはこの日付をもって終了となります: 2024-09-24. 重大なセキュリティの問題に対してであっても、パッチリリースは作成されません。 パフォーマンスの向上、セキュリティの向上、新機能の向上を図るために、最新バージョンの GitHub Enterprise サーバーにアップグレードしてください。 アップグレードに関するヘルプについては、GitHub Enterprise サポートにお問い合わせください

リポジトリのプッシュ保護の有効化

プッシュ保護を使用すると、secret scanning は共同作成者がリポジトリにシークレットをプッシュするのをブロックし、共同作成者がブロックをバイパスするたびにアラートを生成します。

この機能を使用できるユーザーについて

Secret scanningは組織が所有するリポジトリに利用できます。 詳細については、「シークレット スキャン アラートについて」と「GitHub Advanced Security について」を参照してください。

About enabling push protection

To enable push protection for a repository, you must first enable secret scanning. You can then enable push protection in the repository's "Code security and analysis" settings page following the steps outlined in this article.

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

Organization owners, security managers, and repository administrators can also enable push protection for secret scanning via the API. For more information, see "REST API endpoints for repositories" and expand the "Properties of the security_and_analysis object" section.

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 "Managing GitHub Advanced Security features for your enterprise."

Enabling push protection for a repository

  1. On GitHub, navigate to the main page of the repository.

  2. Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

    Screenshot of a repository header showing the tabs. The "Settings" tab is highlighted by a dark orange outline.

  3. In the "Security" section of the sidebar, click Code security and analysis.

  4. Under "Code security and analysis", find "GitHub Advanced Security."

  5. Under "Secret scanning", under "Push protection", click Enable.

Further reading