Description:

This control ensures that only organization owners can delete or transfer repositories in the GitHub organization. Members with admin permissions on a repository are prevented from deleting it or transferring it out of the organization.


Rationale:

Deleting a repository can cause permanent loss of code, history, issues, and pull requests, while transferring a repository can move proprietary code outside the organization’s control. Restricting these actions to organization owners prevents accidental or malicious data loss and data exfiltration.


Impact:

  • Members with repository admin permissions can no longer delete or transfer repositories.

  • Requests to delete or transfer repositories must be handled by organization owners.

  • Reduces the risk of accidental data loss and exposure of sensitive information.

  • Supports change management and data protection requirements.


Default Value:

  • Enabled by default. Organization members with admin permissions on a repository can delete or transfer it unless organization owners restrict this privilege.


Remediation:

Test Plan:

  1. Sign in to GitHub as an organization owner.

  2. Click your profile picture in the upper-right corner, select Organizations, and select the target organization.

  3. Select Settings.

  4. In the Access section of the sidebar, select Member privileges.

  5. Under Repository deletion and transfer, verify that Allow members to delete or transfer repositories for this organization is cleared.

  1. If the setting is selected, follow the Implementation Steps to remediate the issue and repeat the test.


Implementation Steps:

  1. Sign in to GitHub as an organization owner.

  2. Click your profile picture in the upper-right corner, select Organizations, and select the target organization.

  3. Select Settings.

  4. In the Access section of the sidebar, select Member privileges.

  1. Under Repository deletion and transfer, clear Allow members to delete or transfer repositories for this organization.

  1. Click Save.

  2. Communicate the process for requesting repository deletion or transfer to organization members.


Backout Plan:

  1. Sign in to GitHub as an organization owner.

  2. Click your profile picture in the upper-right corner, select Organizations, and select the target organization.

  3. Select Settings.

  4. In the Access section of the sidebar, select Member privileges.

  5. Under Repository deletion and transfer, select Allow members to delete or transfer repositories for this organization.

  6. Click Save.

  7. Verify that repository admins can delete or transfer repositories according to the updated configuration.


References: