# Ensure external collaborator push access is restricted

- Source: https://support.icompaas.com/support/solutions/articles/a_1789072809125900-ensure-external-collaborator-push-access-is-restricted
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Version Control System (VCS)](https://support.icompaas.com/support/solutions/c_1781179095087930) › [Bitbucket](https://support.icompaas.com/support/solutions/folders/f_1781179159125832)
- Last updated: 2026-10-26
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Description

This control ensures that external collaborators are restricted from directly pushing changes to protected branches within a Bitbucket repository. Direct modifications to protected branches are limited to authorized users and groups, helping protect code integrity and supporting secure development practices.

Note: Only repository-level branch restrictions are detected. Restrictions set only at the project level are not returned by Bitbucket’s API and will result in a FAIL. Configure the restriction at the repository level for accurate results.

Rationale

Restricting push access for external collaborators enforces the principle of least privilege and reduces the risk of unauthorized, accidental, or malicious changes to repository content. This control helps maintain repository security and supports organizational change management requirements.

Impact

-   Reduces the risk of accidental or malicious code changes.
    
-   Improves repository security and governance.
    
-   Supports compliance requirements related to access control and change management.
    
-   Ensures only authorized users can push changes to protected branches.
    

Default Value

Disabled by default. Repository administrators must explicitly configure branch restrictions to limit write access to authorized users or groups.

Pre-Requisites

-   Administrative access to the repository
    
-   An existing Bitbucket repository
    

Test Plan

1.  Sign in to Bitbucket at [https://bitbucket.org](https://bitbucket.org/).
    
2.  Navigate to the target Bitbucket repository.
    
3.  Review the branch restriction configured for the protected branch.
    
4.  Verify that Only specific people or groups have write access is configured.
    
5.  Attempt to push changes directly to the protected branch using an external collaborator account.
    
6.  Verify that the push attempt is denied.
    
7.  Verify that the external collaborator is not included in the authorized users or groups list.
    
8.  If direct pushes are permitted, follow the Implementation Plan to remediate the issue and repeat the test.
    

Implementation Steps

1.  Sign in to Bitbucket at [https://bitbucket.org](https://bitbucket.org/).
    
2.  Navigate to the target repository.
    
3.  Click the three-dot menu (⋯) next to the repository name and select Settings.
    

4.  Under Workflow, select Branch restrictions.
    

5.  Click Add a branch restriction or edit an existing branch restriction.
    

6.  Under Select branches, specify the branch name, branch pattern, or branch type to protect.
    
7.  Select the Branch permissions tab.
    
8.  Under Write access, select Only specific people or groups have write access.
    

9.  Add only the authorized users or groups that require direct push access to the protected branch.
    
10.  Ensure external collaborators are not included in the authorized users or groups list.
     
11.  Click Save to apply the branch restriction.
     

Backout Plan

1.  Sign in to Bitbucket at [https://bitbucket.org](https://bitbucket.org/).
    
2.  Navigate to the target repository.
    
3.  Click the three-dot menu (⋯) next to the repository name and select Settings.
    
4.  Under Workflow, select Branch restrictions.
    
5.  Edit the applicable branch restriction.
    
6.  Under Write access, modify the authorized users or groups list as required.
    
7.  Alternatively, select Everyone with access to the repository has write access.
    
8.  Click Save.
    

Reference

-   [https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/](https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/)
    
-   [https://support.atlassian.com/bitbucket-cloud/docs/groups-and-permissions/](https://support.atlassian.com/bitbucket-cloud/docs/groups-and-permissions/)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
