runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.73k stars 1.05k forks source link

gh-team-allowlist does not work with nested groups #4619

Open ben-dov opened 4 months ago

ben-dov commented 4 months ago

Community Note


Overview of the Issue

gh-team-allowlist does not work with nested groups. Important to note, because of issue #3627, I am using the environment variable ATLANTIS_GH_TEAM_ALLOWLIST instead. If this is not a bug but intended (not sure why), then the docs should mention it.

Reproduction Steps

  1. create two Github groups A and B.
  2. add group B under A.
  3. have a user named C, and add him to group B.
  4. add permission for group A to run atlantis plan (using ATLANTIS_GH_TEAM_ALLOWLIST).
  5. try to run atlantis plan from a PR using user C (it will fail because of permissions).
  6. add user C to group A (directly).
  7. try to run atlantis plan from a PR using user C (it will succeed).

Additional Context

Atlantis version: 0.23.1

jamengual commented 3 months ago

I can recall in which version we changed it but we started using the graphql API from github to check for the users that required Org permissions and I believe that is documented

jamengual commented 3 months ago

we might not have support for nested groups, PRs are welcome.