Enabling scanning for generic patterns
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."
Enabling detection of generic patterns for a repository
-
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" section of the sidebar, click Advanced Security.
-
Under "Secret Protection", to the right of "Generic patterns", click Enable.
Enabling detection of generic patterns for an organization
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.