reduce scope of GitHub permissions required #22

Open
opened 2024-10-30 13:27:03 +00:00 by zramsay · 6 comments
Member

the GitHub client should only request read permissions from public / private repos

the GitHub client should only request read permissions from public / private repos
ashwin was assigned by zramsay 2024-10-31 14:40:44 +00:00
Author
Member

the GitHub client also shows private repos of the org being used for the app

the GitHub client also shows private repos of the org being used for the app
Member

Scope of GitHub permissions has been set to public_repo and user
https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes

user scope is required to list orgs user is a part of and create repos in selected org

The staging branch has been rebased onto main and now includes the above change
App has been redeployed https://deploy.apps.vaasl.io

NOTE: The oauth app (Deploy App owned by laconic-templates) needs to be revoked to see changes in permissions on connecting GitHub again
https://github.com/settings/applications

image

Scope of GitHub permissions has been set to `public_repo` and `user` <https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes> `user` scope is required to list orgs user is a part of and create repos in selected org The `staging` branch has been rebased onto `main` and now includes the above change App has been redeployed https://deploy.apps.vaasl.io NOTE: The oauth app (`Deploy App` owned by `laconic-templates`) needs to be revoked to see changes in permissions on connecting GitHub again <https://github.com/settings/applications> ![image](/attachments/a1bcb570-6f6f-4172-a840-5c919c9ad639)
200 KiB
Author
Member

confirming private repos don't show up anymore, however, This application will be able to read and write all public repository data. The app shouldn't have to to require perms to write to repos.

confirming private repos don't show up anymore, however, `This application will be able to read and write all public repository data`. The app shouldn't have to to require perms to write to repos.
Author
Member

Write perms to create a new repo is 👍
Write perms to write to existing/new repo is 👎

Write perms to create a new repo is 👍 Write perms to write to existing/new repo is 👎
Member

Write perms to create a new repo is 👍
Write perms to write to existing/new repo is 👎

According to the available GitHub OAuth scopes, there is no scope that allows for creating a new repository without also granting write access to existing or newly created repositories
https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes

Currently, the public_repo scope is used, which includes read/write access to code, commit statuses, repository projects, collaborators, and deployment statuses for public repositories and organizations
image

> Write perms to create a new repo is 👍 > Write perms to write to existing/new repo is 👎 According to the available GitHub OAuth scopes, there is no scope that allows for creating a new repository without also granting write access to existing or newly created repositories <https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes> Currently, the `public_repo` scope is used, which includes read/write access to code, commit statuses, repository projects, collaborators, and deployment statuses for public repositories and organizations ![image](/attachments/79c0e2c2-c7fb-4620-8bee-d57242c4710c)
165 KiB
Author
Member

oof. here's to hoping gitea has finer grained perms...

oof. here's to hoping gitea has finer grained perms...
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/snowballtools-base#22
No description provided.