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

feat: Add a new check to ensure no teams have admin or maintain access. #485

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

feanil
Copy link
Contributor

@feanil feanil commented Mar 6, 2024

For each repo, the check will find any teams that have admin or maintain
access to that repo and downgrade the access of the team to write.

@feanil feanil force-pushed the feanil/disable_admin branch from c9743d6 to d546446 Compare March 6, 2024 18:04
@feanil feanil requested a review from kdmccormick March 7, 2024 19:05
@feanil feanil force-pushed the feanil/disable_admin branch from d546446 to 7952f25 Compare March 7, 2024 19:09
@feanil feanil requested review from arbrandes, bmtcril and ormsbee March 7, 2024 19:09
Copy link
Contributor

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not test this, but the logic makes sense. 👍🏼

class EnsureNoAdminOrMaintainTeams(Check):
"""
Teams should not be granted `admin` or `maintain` access to a repository unless the access
is exceptions and it is noted here. All other `admin` and `maintain` access is downgraded to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is exceptions and it is noted here. All other `admin` and `maintain` access is downgraded to
is an exception and it is noted here. All other `admin` and `maintain` access is downgraded to

Not sure if you meant "in exceptions" or just missed an "an".

For each repo, the check will find any teams that have admin or maintain
access to that repo and downgrade the access of the team to write.
@feanil feanil force-pushed the feanil/disable_admin branch from 7952f25 to baf310a Compare March 12, 2024 14:36
@feanil feanil merged commit 9434bea into master Mar 12, 2024
3 checks passed
@feanil feanil deleted the feanil/disable_admin branch March 12, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants