-
Suggestion
-
Resolution: Unresolved
-
None
When trying to call the Bitbucket API from the build pipeline of a repository in a workspace with IP restrictions, We get an error saying, "To access this repository, an admin must whitelist your IP," and I'm unable to call the API.
e.g)
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-post
We can work around this issue by setting the step option size to 4x or 8x, enabling "atlassian-ip-ranges," and adding the IP addresses listed in the documentation to the workspace's allowlist.
But allowing outbound IPs used by Bitbucket Pipelines poses a risk: if the repository access token is leaked, others could potentially access it from their own Bitbucket Pipelines using 4x or 8x sizes.
To mitigate this risk, it would be helpful to have special permissions that allow actions on the repository running the Bitbucket Pipelines, even if those actions aren't included in the IP whitelist.