News for hackers. Stuff that matters.
Re:Attack campaign involving stolen OAuth tokens issued to t... by Sytten on Friday April 15, 2022 @10:53PM (#31048905)
If one thing can be gotten from that incident is forcing GitHub to create finer OAuth scopes and per repository.

I am always uneasy when an application even thrust worthy like sentry asks access to ALL my private repositories even when they dont need it.

I feel that in 2022 GitHub is way too critical to many organizations and they should really work on stricter rules. Even google requires special and costly audits from oauth applications to access users critical data like drive and emails.

Re:Attack campaign involving stolen OAuth tokens issued to t... by greggman3 on Saturday April 16, 2022 @02:32AM (#31050096)
I wrote about this a couple of years ago

https://games.greggman.com/game/github-permission-problem/

Github has (had) some of the worst wording in the permission prompts as well as too many 3rd party apps asking for blanket permission to do anything and everything in all your repos. It might as well be "hey, give us root on your servers and our new service will do cool things for you!"

And even worse is the 1000s and 1000s of repos that have signed up for those services including all kinds of popular libraries. They've given the keys to hack the libraries at will to 10s or 100s of random companies that integrate with github. It's insane.

Re:Attack campaign involving stolen OAuth tokens issued to t... by media-trivial on Saturday April 16, 2022 @04:28AM (#31050677)
> If one thing can be gotten from that incident is forcing GitHub to create finer OAuth scopes and per repository.

This. Limiting OAuth app access to specific repositories. I really wish this was a thing. For this exact reason I'm creating a new GitHub account for every new integration and share the repo with this account. It's technically against the TOS (they only allow single bot account per user) but there is no other way if you want security.

Maybe GitHub will implement this feature now. My hopes are high.

Re:Attack campaign involving stolen OAuth tokens issued to t... by kall on Saturday April 16, 2022 @05:34AM (#31050993)
Aren't OAuth tokens scoped to org? Wouldn't it be easier to create an org per repo? I guess it might get expensive depending on your usage/collaborators.

Edit: nevermind OAuth tokens are not org-scoped, only apps are

Re:Attack campaign involving stolen OAuth tokens issued to t... by chucke on Saturday April 16, 2022 @04:53AM (#31050799)
> If one thing can be gotten from that incident is forcing GitHub to create finer OAuth scopes and per repository.

Just noting that gitlab has supported per repo tokens for ages. Yes, it's really useful, as this incident can attest.

Re:Attack campaign involving stolen OAuth tokens issued to t... by judge2020 on Saturday April 16, 2022 @01:16AM (#31049702)
All the oauth prompts I’ve gotten in the past 3 years or so seem to have the granular per-repo control you’re looking for.
Re:Attack campaign involving stolen OAuth tokens issued to t... by media-trivial on Saturday April 16, 2022 @04:33AM (#31050712)
Only "app installations" from the GitHub marketplace can be limited to specific repositories. For OAuth apps this is not possible sadly (everything that uses GitHub to login or connect accounts, e.g. Travis CI, Terraform Registry, Heroku).
Re:Attack campaign involving stolen OAuth tokens issued to t... by bswinnerton on Saturday April 16, 2022 @12:09AM (#31049383)
Re:Attack campaign involving stolen OAuth tokens issued to t... by yuvadam on Saturday April 16, 2022 @08:59AM (#31051959)
Github already has per-repo scope, and has supported that for at least several years AFAIR.
Re:Attack campaign involving stolen OAuth tokens issued to t... by daenney on Saturday April 16, 2022 @09:14AM (#31052048)
Unfortunately no. GitHub Apps can be scoped to a repo, GitHub OAuth tokens cannot. A lot of things fall in the second category.

You’ll also discover this if you try to create a personal access token, it’s all repos, you can’t limit them to a particular repo.

Re:Attack campaign involving stolen OAuth tokens issued to t... by lmeyerov on Saturday April 16, 2022 @10:21AM (#31052548)
Disturbingly, their own products like azure dev portal largely push you into such a grant-universal-access-for-every-contributor path

Their sec org is impressive, so these occasional massive things have been surprising