How to secure atlantis connected to bitbucketcloud since bbc does not support webhook secrets? #3131
-
Hello! The documentation here has a scary message which reads:
I'm a little concerned about the suggestion at the end of that message. Even if one configures their Atlantis installation to only accept traffic from Bitbucket IP addresses, this does not seem to provide meaningful protection, since anyone can sign up for a Bitbucket Cloud account and use Bitbucket Pipelines. What am I missing here? Does limiting traffic to Bitbucket IP addresses significantly mitigate the risk here, even in the face of an attacker that uses Bitbucket Pipelines? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Not an atlantis maintainer but you can reduce ips to webhooks ips should be ok as i think what you can do from a webhool is limited |
Beta Was this translation helpful? Give feedback.
-
shameless plug you can resolve this in TF via https://registry.terraform.io/providers/DrFaust92/bitbucket/latest/docs/data-sources/ip_ranges |
Beta Was this translation helpful? Give feedback.
-
Yes, agreed with @DrFaust92. Best way is to only allow web hook ips to hit atlantis. Here is the upstream issue you can follow to get webhook secrets enabled in bitbucket cloud |
Beta Was this translation helpful? Give feedback.
-
Sorry, when I said 'bitbucket IPs', I actually did mean webhook IPs. But my question still stands, I think? Anyone can use Bitbucket Pipelines, so what's the point of limiting to those IP addresses? What's the threat model here? Are we assuming/hoping that an attacker won't know we're using Bitbucket Pipelines? |
Beta Was this translation helpful? Give feedback.
Not an atlantis maintainer but you can reduce ips to webhooks ips
https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/
should be ok as i think what you can do from a webhool is limited