You can enable secret scanning to detect additional potential secrets at the repository and organization levels.
You can enable scanning for generic patterns. Generic patterns correspond to secrets such as private keys.
For more information about generic patterns, see "Supported secret scanning patterns."
On GitHub, navigate to the main page of the repository.
Under your repository name, click Settings. If you cannot see the "Settings" tab, select the dropdown menu, then click Settings.

In the "Security and quality" section of the sidebar, click Advanced Security.
Under "Secret Protection", to the right of "Generic patterns", click Enable.
You can enable scanning for generic patterns at the organization level by applying a custom security configuration. For more information, see Creating a custom security configuration.