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

Ghostly requests permissions which are not explained #10

Closed
hansmbakker opened this issue Feb 5, 2019 · 7 comments
Closed

Ghostly requests permissions which are not explained #10

hansmbakker opened this issue Feb 5, 2019 · 7 comments

Comments

@hansmbakker
Copy link

Ghostly requests a lot of permissions during authorization.

Especially the write access to all public and private repositories is not clear if it is necessary and why it is necessary - since Ghostly is about fetching notifications.

Why does Ghostly need to push code or need to read deploy keys?

Please keep the required permissions minimal.

image

@patriksvensson
Copy link
Owner

@hansmbakker

Sadly, GitHub permissions are not very fine grained and does not distinguish between read and write permissions for all scopes. The permissions we need to be able to read private repository information (issues/pull requests/releases and security vulnerabilities), notifications and user information are:

  • read:user
  • repo
  • notifications

Which you can read about here: https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes

So if we want to be able to get notifications regarding private repositories there's really nothing we can do about this.

One option would be to have a "public mode" as well which only gets notifications and similar from public repositories, in that case we would only need the read:user and notifications scopes.

@patriksvensson
Copy link
Owner

@hansmbakker Actually, I think we can remove the read:user scope after having re-read the documentation for the scopes since we don't need any private information about the user, just the ability to call the "current user api" to get the username.

@patriksvensson
Copy link
Owner

@hansmbakker I've added an option to only watch public repositories (which only requires the notifications permission scope). Will be available in the next version

image

@hansmbakker
Copy link
Author

Nice! I understand this might be a limitation of GitHub, but it was just a bit surprising to see GitHub ask for write permissions to code without a warning upfront.

Would the notifications scope instead of the repo scope be an option? I'm not sure whether you need other things from the repo scope.

@patriksvensson
Copy link
Owner

@hansmbakker Yes, just asking for notifications scope is what "Public repositories only" does in the image above.

If we want to be able to get information about work items (issues/prs etc) that are private, we need the repo in addition to the notifications scope (which is what the second option in the image does).

@patriksvensson
Copy link
Owner

So public repositories only = notifications
Public and private repositories = notifications, repo

@patriksvensson
Copy link
Owner

@hansmbakker There is a new version released (0.1.24000.0) which will add an option to only request the notifications scope.

@patriksvensson patriksvensson pinned this issue May 30, 2019
@patriksvensson patriksvensson transferred this issue from another repository Jan 4, 2022
@patriksvensson patriksvensson pinned this issue Jan 4, 2022
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

No branches or pull requests

2 participants