That GitHub is telling these companies, and bear in mind that these companies are paying customers of GitHub, yeah we don't care that your private proprietary code can be hacked off GitHub by anybody, is incredibly disturbing. Is there really not enough pressure from paying customers to fix this? Is Microsoft just too big to care?
Anyone can access deleted and private repository data on GitHub
261–270 of 394 posts
Re: Anyone can access deleted and private repository data on GitHub
#262Earlier quoted context omitted.
Yep, I see GitHub as "public only" hosting, and if I want to host something private, I will choose another vendor.
The noted issue looks to be applicable to forks only, not to all private repos.
Re: Anyone can access deleted and private repository data on GitHub
#263Earlier quoted context omitted.
If you published a key, you must assume someone copied it and that deleting references to it is not sufficient. You must rotate that key now, and should check whether it was used improperly. This is pretty basic incident response. The thing about exposing commits that were only ever in a private repo is pretty indefensible, but not garbage collecting public commits on delete shouldn't matter.
> If you published a key Why would anyone think that a private fork is "published"!? This is the footgun here: The UI is telling you that nobody can see the secrets you committed to your private copy , but actually it is widely accessible. A similar example of UI-vs-reality mismatch that I've noticed recently is the Azure Store Account "public" visibility. By default, it uses your authenticated account for RBAC acces…
Anyone who put sensitive content in a git repo should consider published anyway. Git is a decentralized tool, as a company you cannot control the amount of git remotes that may host your code. Considering your code is only hosted as a private repo in a specific remote git server is at best naive. This is without even considering the amount of copies that are stored in dev computers.
Besides, anyone who put stuff on a third party publicly accessible infrastructure should consider it published anyway as breaches happen all the time.
If you happen to have api keys stored in a git repo, the only viable response is rotating those keys.
Re: Anyone can access deleted and private repository data on GitHub
#264The biggest gotcha here is probably that if you start of with a private repo and a private fork, making the repo public also makes the fork "public". GitHub may very well say that this is working as intended, but if it truly is then you should be forced to make both the repo and fork public at the same time. Essentially "Making repo R public will make the following forks public as well 'My Fork', 'Super secret fork',…
Any time you make a private repo public it’s best to just copy that code into a new public repo and leave the private repo private. Otherwise have to audit every previous commit and every commit on every fork of your private code.
Re: Anyone can access deleted and private repository data on GitHub
#265Re: Anyone can access deleted and private repository data on GitHub
#266Re: Anyone can access deleted and private repository data on GitHub
#267Earlier quoted context omitted.
> I'll be calling "private" repos "unlisted" The same for “deleted” repos.
"deleted" is just a fancy word "inaccessible to the user"
Re: Anyone can access deleted and private repository data on GitHub
#268Ultimately I don't think it's feasible to break this behaviour and the most we can hope for is a big red warning when something counterintuitive happens.
Re: Anyone can access deleted and private repository data on GitHub
#269> I submitted a P1 vulnerability to a major tech company showing they accidentally committed a private key ... They immediately deleted the repository,
That is a ridiculous response to a compromised key. The repository should not have been "deleted", the key should have been revoked.
Imagine if you lost a bag with 100 keys to your house. Upon realising you desperately try to search for the bag only to find it's been opened and the keys spread around. You comb through the grass and forests nearby collecting keys and hoping you find them all.
Or you just change the locks and forget about it.
If you upload something, anything, to a computer system you do not own you need to consider it no longer secret. It's as simple as that. Don't like it? Don't do it.
I detest things like delete buttons in messaging apps and, even worse, email recall in Outhouse-style email apps. They just give people a false sense of security. I've been accidentally sent someone's password several times on Teams. Yeah you deleted the message, but my memory is very good and, trust me, I still know your password.
If there's a security problem here it's in people believing you can delete stuff from someone else's system, or that that systems make it look like you can. The solution is the same though: education. Don't blame GitHub. Don't force them to "fix" this. That will only make it worse because there are still a million other places people will upload stuff and also won't actually delete stuff.
Re: Anyone can access deleted and private repository data on GitHub
#270Trusting some company will actually delete your stuff is kind of naive in my opinion.
The example of people forking and putting an API key in the repo, I would never let my people do this. Once you push, it will be "out there".