About enabling delegated bypass for push protection
Delegated bypass for push protection lets you:
- Define contributors who can bypass push protection.
- Adds an approval process for other contributors.
Delegated bypass applies to files created, edited, and uploaded on GitHub.
For more information, see "About delegated bypass for push protection."
When you enable this feature, you will create a bypass list of roles and teams who can manage requests to bypass push protection. If you don't already have appropriate teams or roles to use, you should create additional teams before you start.
Alternatively, you can grant specific organization members the ability to review and manage bypass requests using fine-grained permissions, which give you more refined control over which individuals and teams can approve and deny bypass requests. For more information, see "Using fine-grained permissions to control who can review and manage bypass requests."
Configuring delegated bypass for a repository
Note
If an organization owner configures delegated bypass at the organization-level, the repository-level settings are disabled.
-
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 Code security and analysis.
-
Under "Code security and analysis", find "GitHub Advanced Security."
-
Under "Push protection", to the right of "Who can bypass push protection for secret scanning", select the dropdown menu, then click Specific roles or teams.
-
Under "Bypass list", click Add role or team.
Note
When you add roles or teams to the "bypass list", these users will be granted the ability to bypass push protection, and they can also review and manage the requests from all other contributors to bypass push protection.
You can't add secret teams to the bypass list.
-
In the dialog box, select the roles and teams that you want to add to the bypass list, then click Add selected.
Configuring delegated bypass for an organization
You must configure delegated bypass for your organization using a custom security configuration. You can then apply the security configuration to all (or selected) repositories in your organization.
-
Create a new custom security configuration, or edit an existing one. See "Creating a custom security configuration."
-
When creating the custom security configuration, under "Secret scanning", ensure that the dropdown menus for "Alerts" and "Push protection" are set to Enabled.
-
Under "Push protection", to the right of "Bypass privileges", select the dropdown menu, then click Specific actors.
Note
When you assign bypass privileges to selected actors, these organization members are granted the ability to bypass push protection, and they also review and manage the requests from all other contributors to bypass push protection.
You can't add secret teams to the bypass list.
-
Click the "Select actors" dropdown menu, then select the roles and teams you want to assign bypass privileges to.
Tip
In addition to assigning bypass privileges to roles and teams, you can also grant individual organization members the ability to review and manage bypass requests using fine-grained permissions. See "Using fine-grained permissions to control who can review and manage bypass requests."
-
Click Save configuration.
-
Apply the security configuration to all (or selected) repositories in your organization. See "Applying a custom security configuration."
To learn more about security configurations, see "About enabling security features at scale."
Using fine-grained permissions to control who can review and manage bypass requests
You can grant specific individuals or teams in your organization the ability to review and manage bypass requests using fine-grained permissions.
- Ensure that delegated bypass is enabled for the organization. For more information, follow steps 1-3 in "Configuring delegated bypass for your organization" and ensure you have saved and applied the security configuration to your selected repositories.
- Create (or edit) a custom organization role. For information on creating and editing custom roles, see "Managing custom organization roles."
- When choosing which permissions to add to the custom role, select the "Review and manage secret scanning bypass requests" permission.
- Assign the custom role to individual members or teams in your organization. For more information on assigning custom roles, see "Using organization roles."