Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Check user permissions on autoplan #3742

Merged
merged 12 commits into from Nov 15, 2023

Conversation

meringu
Copy link
Contributor

@meringu meringu commented Sep 5, 2023

what

This change enforces the team permissions on autoplans. Currently Atlantis will autoplan any PR when a team is configured.

why

The current behavior is a security risk for us. We have a large number of teams sharing the same GitHub org. We want to encourage inner-sourcing and collaboration by allowing forks from other teams within the orgs, but these PRs we don't trust until they have been reviewed by a team member that owns the project.

tests

We having been running this for a number of months internally on a small handful of repositories. This was the only vulnerability we could find when using Atlantis team permissions with our team and trust model on GitHub.

references

@meringu meringu requested a review from a team as a code owner September 5, 2023 22:41
@github-actions github-actions bot added the go Pull requests that update Go code label Sep 5, 2023
@meringu meringu changed the title Check user permissions on autoplan fix: Check user permissions on autoplan Sep 5, 2023
@jamengual jamengual added waiting-on-review Waiting for a review from a maintainer vcs-status labels Sep 13, 2023
GenPage
GenPage previously approved these changes Sep 25, 2023
@GenPage GenPage added needs tests Change requires tests and removed waiting-on-review Waiting for a review from a maintainer labels Sep 25, 2023
@GenPage
Copy link
Member

GenPage commented Sep 25, 2023

I think the tests need to be updated since they are failing on CreateComment

@GenPage GenPage added the waiting-on-response Waiting for a response from the user label Sep 25, 2023
@meringu
Copy link
Contributor Author

meringu commented Oct 11, 2023

Hey @GenPage. Thanks for taking a look.

I've updated the failing tests, and changed what I assume is a typo of conftest.

@meringu
Copy link
Contributor Author

meringu commented Oct 25, 2023

Hi @GenPage , are we able to remove the "waiting-on-response" label for this one? Please let me know if there is anything I can do to help progress.

@jamengual jamengual removed the waiting-on-response Waiting for a response from the user label Oct 25, 2023
@meringu
Copy link
Contributor Author

meringu commented Oct 25, 2023

Looks like it is failing now on installing Alpine packages? I'm not entirely sure if this is related to my change.

@meringu
Copy link
Contributor Author

meringu commented Oct 27, 2023

Sorry to keep chasing up @jamengual, would this now need the "waiting-on-review" label?

@jamengual jamengual added waiting-on-review Waiting for a review from a maintainer and removed needs tests Change requires tests labels Oct 27, 2023
@jamengual
Copy link
Contributor

/cherry-pick release-0.26

@jamengual jamengual merged commit ce2b992 into runatlantis:main Nov 15, 2023
24 checks passed
@jamengual
Copy link
Contributor

/cherry-pick release-0.26

ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* Check user permissions on autoplan

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* Check user permissions on autoplan

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code vcs-status waiting-on-review Waiting for a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants