Description
This check verifies that user groups within a Bitbucket workspace are assigned a permission level of "read" or "none" rather than "write" or "admin." Group-level permissions determine the baseline access that all members of a group receive across the workspace's repositories, and since new members are typically added to a group rather than granted individual permissions, an overly permissive group setting effectively becomes the default access level for anyone added to that group.
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
Assigning groups a permission level higher than necessary — particularly "write" or "admin" — means every current and future member of that group automatically inherits the ability to push changes or administer repositories, regardless of whether that level of trust has actually been established for each individual. Limiting group permissions to "read" or "none" enforces the principle of least privilege, ensuring that write or administrative access is granted deliberately and individually rather than inherited broadly through group membership.
Impact
Prevent members of a group from pushing changes to repositories until individually granted write access.
Require workspace administrators to explicitly elevate access for members who need to contribute code.
Reduce the risk of unauthorized or unintended changes being made by members who were only meant to have visibility into the codebase.
Improve overall governance and auditability of who can modify workspace repositories and why.
Default Value
Depends on workspace configuration. Bitbucket workspaces do not enforce a fixed default; group permissions are assigned explicitly per group. In practice, newly created groups (such as a default "Developers" group) are often assigned "write" access unless an administrator deliberately restricts it.
Pre-Requisites
Workspace admin access
An existing Bitbucket workspace
Test Plan
Sign in to Bitbucket at https://bitbucket.org.
Select the Settings → Workspace settings.
Under Access management, select User groups.
Review each group's assigned Workspace permission.
Verify that no group is assigned "Write" or "Admin" permission.
Implementation Steps
Sign in to Bitbucket at https://bitbucket.org.
Navigate to Workspace settings → User groups.
For each group with "Write" or "Admin" permission, click the permission dropdown.
Change the permission to "Read" (or remove the group's access entirely if no access is needed).
Save the changes.
Backout Plan
Sign in to Bitbucket at https://bitbucket.org.
Navigate to Workspace settings → User groups.
Locate the group whose permission was changed.
Restore the group's permission to its previous value ("Write" or "Admin") if elevated access is required again.
Save the changes.
Reference
https://support.atlassian.com/bitbucket-cloud/docs/groups-and-permissions/
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-groups/
https://support.atlassian.com/bitbucket-cloud/docs/groups-endpoint/