About custom security configurations
We recommend securing your enterprise with the GitHub-recommended security configuration, then evaluating the security findings on your repositories before configuring custom security configurations. For more information, see Applying the GitHub-recommended security configuration to your enterprise.
With custom security configurations, you can create collections of enablement settings for GitHub's security products to meet the specific security needs of your enterprise. For example, you can create a different custom security configuration for each organization or group of organizations to reflect their unique security requirements and compliance obligations.
You can also choose whether or not you want to include GitHub Code Security or GitHub Secret Protection features in a configuration.
If you do, keep in mind that these features incur usage costs (or require GitHub Advanced Security licenses) when applied to private and internal repositories. For more information, see About GitHub Advanced Security.
Creating a custom security configuration
Note
The enablement status of some security features is dependent on other, higher-level security features. For example, disabling dependency graph will also disable automatic dependency submission, Dependabot alerts, vulnerability exposure analysis, and security updates.
-
In the top-right corner of GitHub, click your profile photo.
-
Depending on your environment, click Your enterprise, or click Your enterprises then click the enterprise you want to view.
-
At the top of the page, click Settings.
-
In the left sidebar, click Advanced Security.
-
In the "Configurations" section, click New configuration.
-
To help identify your custom security configuration and clarify its purpose on the "Configurations" page, name your configuration and create a description.
-
Optionally, enable "Secret Protection", a paid feature for private and internal repositories. Enabling Secret Protection enables alerts for secret scanning. In addition, you can choose whether to enable, disable, or keep the existing settings for the following secret scanning features:
- Validity checks. To learn more about validity checks for partner patterns, see Evaluating alerts from secret scanning.
- Non-provider patterns. To learn more about scanning for non-provider patterns, see Supported secret scanning patterns and Viewing and filtering alerts from secret scanning.
- Scan for generic passwords. To learn more, see Responsible detection of generic secrets with Copilot secret scanning.
- Push protection. To learn about push protection, see About push protection.
- Prevent direct alert dismissals. To learn more, see Enabling delegated alert dismissal for secret scanning.
-
Optionally, enable "Code Security", a paid feature for private and internal repositories. You can choose whether to enable, disable, or keep the existing settings for the following code scanning features:
- Default setup. To learn more, see Configuring default setup for code scanning.
- Runner type. If you want to target specific runners for code scanning, you can choose to use custom-labeled runners at this step. See Configuring default setup for code scanning.
- Prevent direct alert dismissals. To learn more, see Enabling delegated alert dismissal for code scanning.
-
Still under "Code Security", in the "Dependency scanning" table, choose whether you want to enable, disable, or keep the existing settings for the following dependency scanning features:
- Dependency graph. To learn about dependency graph, see About the dependency graph.
Tip
When both "Code Security" and Dependency graph are enabled, this enables dependency review, see About dependency review.
- Automatic dependency submission. To learn about automatic dependency submission, see Configuring automatic dependency submission for your repository.
- Dependabot alerts. To learn about Dependabot, see About Dependabot alerts.
- Security updates. To learn about security updates, see About Dependabot security updates.
- Dependency graph. To learn about dependency graph, see About the dependency graph.
-
For "Private vulnerability reporting", choose whether you want to enable, disable, or keep the existing settings. To learn about private vulnerability reporting, see Configuring private vulnerability reporting for a repository.
-
Optionally, in the "Policy" section, you can use additional options to control how the configuration is applied:
-
Use as default for newly created repositories. Select the None dropdown menu, then click Public, Private and internal, or All repositories.
-
Enforce configuration. Block repository owners from changing features that are enabled or disabled by the configuration (features that are not set aren't enforced). Select Enforce from the dropdown menu.
Note
The default security configuration for an organization is only automatically applied to new repositories created in your organization. If a repository is transferred into your organization, you will still need to apply an appropriate security configuration to the repository manually.
-
-
To finish creating your custom security configuration, click Save configuration.
Note
If a user in your enterprise attempts to change the enablement status of a feature in an enforced configuration using the REST API, the API call will appear to succeed, but no enablement statuses will change.
Some situations can break the enforcement of security configurations for a repository. For example, the enablement of code scanning will not apply to a repository if:
- GitHub Actions is initially enabled on the repository, but is then disabled in the repository.
- GitHub Actions required by code scanning configurations are not available in the repository.
- The definition for which languages should not be analyzed using code scanning default setup is changed.
Next steps
To optionally configure additional secret scanning settings for the enterprise, see Configuring additional secret scanning settings for your enterprise.
To apply your custom security configuration to repositories in your organization, see Applying a custom security configuration.
To learn how to edit your custom security configuration, see Editing a custom security configuration.