Skip to main content

リポジトリのシークレット スキャンの有効化

GitHub がリポジトリで漏洩したシークレットをスキャンし、アラートを生成する方法を構成できます。

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

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

About enabling secret scanning

Secret scanning can be enabled for any repository that is owned by an organization, and for repositories owned by user accounts when using GitHub Enterprise Cloud with Enterprise Managed Users.

If you're an organization owner, you can enable secret scanning for multiple repositories at the same time. For more information, see "Quickstart for securing your organization"."

If your organization is owned by an enterprise account, an enterprise owner can also enable secret scanning at the enterprise level. For more information, see "Managing GitHub Advanced Security features for your enterprise."

Enabling secret scanning

  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. If Advanced Security is not already enabled for the repository, to the right of "GitHub Advanced Security", click Enable.

  5. Review the impact of enabling Advanced Security, then click Enable GitHub Advanced Security for this repository.

  6. When you enable Advanced Security, secret scanning may automatically be enabled for the repository due to the organization's settings. If "Secret scanning" is shown with an Enable button, you still need to enable secret scanning by clicking Enable. If you see a Disable button, secret scanning is already enabled.

    Screenshot of the "Secret scanning" section of the "Code security and analysis" page, with the "Enable" button highlighted in a dark orange outline.

A repository administrator can choose to disable secret scanning for a repository at any time. For more information, see "Managing security and analysis settings for your repository."

Next steps