READING organization repository rulesets should not require WRITE permissions #72148
Replies: 3 comments 2 replies
-
Hey there @lukas-hetzenecker, Thanks so much for reaching out in our community. This issue was recently raised with our support team and this was the final verdict:
A feature request was opened for this endpoint to be added. I've added this Discussion to that feature request to show that there is demand for reducing permissions where appropriate. In the meantime, please feel free to follow-up here and let me know if you have any additional questions. |
Beta Was this translation helpful? Give feedback.
-
Hi @ghostinhershell. @danielzev here... Co-Founder & CTO of one of those security and compliance partners @drata that @t2farrell mentioned above. I 100% agree with all of the posters on this thread, that this seems wrong. I would love to understand how GET /orgs/{org}/rulesets/{ruleset_id} Those should be under a READ ONLY permission. It would make sense if the I would be more than happy to connect here, on email, phone, or a Zoom call to talk through it. We have 1000's of mutual customers with you that are not happy with the |
Beta Was this translation helpful? Give feedback.
-
Hi @ghostinhershell, we have the exact same issue at SignPath. We evaluate ruleset rules for our customers and they (rightfully) ask why our App would need write permissions on their organizations, which can do so much more and potentically cause a lot of damage. I think that the detailed permission model in GitHub is great and that we can scope our app to really only have the permissions it needs, but for ruleset rules this is just not the case. Please change it or at least elaborate as to why the decision was taken. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Product Feedback
Body
Hello,
we're provisioning our Github settings via Infrastructure as Code.
And when doing that, we always implement least privileges for that - generally speaking, this means when terraform applies our settings, tokens with WRITE permissions will be used. When generating plans, usually only GET calls are made, and therefore READ permissions on the various permissions should be sufficient.
Recently we tried to use the github_organization_ruleset resource:
Unfortunately this breaks our security model, as we noticed that our token permissions are not sufficient for organization rulesets.
In particular, when running a terraform plan, the following API endpoint will be used:
GET /orgs/{org}/rulesets
According to the Permissions description, this endpoint requires
organization_administration: WRITE permissions.
This strikes us a bit odd - why is this GET endpoint requiring WRITE permissions, when it is only reading all organization repository rulesets?
For other read requests in this category, READ permissions are sufficient.
This breaks our IaC workflows, and we therefore cannot make use of Rulesets in our organization.
Beta Was this translation helpful? Give feedback.
All reactions