Legit-Labs / legitify

Detect and remediate misconfigurations and security risks across all your GitHub and GitLab assets
https://legitify.dev
Apache License 2.0
771 stars 63 forks source link

"organization_has_too_many_admins" policy doesn't flag an organization with 8 owners #256

Closed ajh- closed 11 months ago

ajh- commented 1 year ago

TL;DR

Currently have a GitHub Enterprise server with a dev organization that has 8 owners but legitify does not fail "organization_has_too_many_admins" policy

Expected behavior

Expect "organization_has_too_many_admins" policy to fail with 4+ organization owners/admins configured

Observed behavior

"organization_has_too_many_admins" policy passes even though there are 8 organizational owners/admins

Version

v1.0.3

On which operating system are you using legitify?

Linux

Relevant log output

No response

Additional information

No response

noamd-legit commented 1 year ago

Thanks for opening the issue @ajh- Please attach the error log from the execution. and the output of this api request if possible:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/orgs/ORG/members?role=admin
ajh- commented 12 months ago

See attached. Just a note, the environment is a GitHub Enterprise instance.

api_request_output.txt error.log

noamd-legit commented 11 months ago

Hi @ajh- Should be fixed now, let me know if there is any problem

ajh- commented 11 months ago

Hey @noamd-legit Just tested the new release (v1.0.5) but I'm still getting the same results as before. Please let me know if you need any updated data.

noamd-legit commented 11 months ago

@ajh- I validated internally with a similar setup and couldn't reproduce it. Do you mind reaching out by mail so I can further assist? legitify@legitsecurity.com