News for hackers. Stuff that matters.
Re:Anyone can access deleted and private repository data on ... by jonahx on Wednesday July 24, 2024 @03:38PM (#41061025)
Not defending GH here (their position is indefensible imo) but, as the article notes, they document these behaviors clearly and publicly:

https://docs.github.com/en/pull-requests/collaborating-with-...

I don't think they're being underhanded exactly... they're just making a terrible decision. Quoting from the article:

> The average user views the separation of private and public repositories as a security boundary, and understandably believes that any data located in a private repository cannot be accessed by public users. Unfortunately, as we documented above, that is not always true. Whatsmore, the act of deletion implies the destruction of data. As we saw above, deleting a repository or fork does not mean your commit data is actually deleted.

Re:Anyone can access deleted and private repository data on ... by andersa on Wednesday July 24, 2024 @03:52PM (#41061226)
Based on some (admittedly not very thorough) search, this documentation was posted in 2021, three years after my report.
Re:Anyone can access deleted and private repository data on ... by YetAnotherNick on Wednesday July 24, 2024 @04:42PM (#41061832)
But that would still means they didn't intend to fix it, hence not giving bounty is fair.
Re:Anyone can access deleted and private repository data on ... by malfist on Wednesday July 24, 2024 @05:02PM (#41062076)
It's a bug bounty, not a "only if we have time to fix it" bounty.

He found a security problem, they decided not to act on it, but it was still an acknowledged security problem

Re:Anyone can access deleted and private repository data on ... by coldtea on Wednesday July 24, 2024 @06:03PM (#41062683)
>It's a bug bounty, not a "only if we have time to fix it" bounty

It's only a bug if it's not intended

Re:Anyone can access deleted and private repository data on ... by ethbr1 on Wednesday July 24, 2024 @08:32PM (#41063651)
Do some companies intend for their platform to feature remote code execution?
Re:Anyone can access deleted and private repository data on ... by jen20 on Wednesday July 24, 2024 @09:33PM (#41063957)
Remote code execution is literally a feature of GitHub…
Re:Anyone can access deleted and private repository data on ... by ethbr1 on Wednesday July 24, 2024 @11:29PM (#41064465)
Sandboxed code execution is a bit different than RCE.
Re:Anyone can access deleted and private repository data on ... by coldtea on Thursday July 25, 2024 @07:26AM (#41067277)
Some might very well do. E.g. a company with a service for training hackers and security researchers.

In this case the question is moot, as this doesn't involve remote code execution.

Re:Anyone can access deleted and private repository data on ... by ethbr1 on Thursday July 25, 2024 @01:59PM (#41071466)
Make a general point, get a general answer.

If the criteria for bug is "not intended", and that's solely judged by the company, then broken auth et al. suddenly become part of their product design.

If it quacks like a bug, it's a bug.

Re:Anyone can access deleted and private repository data on ... by bmitc on Thursday July 25, 2024 @02:07AM (#41065208)
I think a lot of developers and companies interpret "that's the way the code or process works" as intentional behavior, which is not always the case.
Re:Anyone can access deleted and private repository data on ... by madeofpalk on Wednesday July 24, 2024 @05:21PM (#41062286)
The point of a bug bounty is for companies to find new security problems.

If the (class of) problem is already known, it’s not worth rewarding.

Re:Anyone can access deleted and private repository data on ... by berdario on Wednesday July 24, 2024 @05:37PM (#41062434)
I can see this argument making a bit of sense, but if they documented this 3 years after the issue was reported, they don't have a way to demonstrate that they truly already knew.

At the end it boils down to: is Github being honest and fair in answering the bug bounty reports?

If you think it is, cool.

If you don't, maybe it's not worth playing ball with Github's bug bounty process

Re:Anyone can access deleted and private repository data on ... by tptacek on Wednesday July 24, 2024 @05:44PM (#41062498)
It doesn't matter if they knew. If they don't deem it a security vulnerability --- and they have put their money where their mouth is, by documenting it as part of the platform behavior --- it's not eligible for a payout. It can be a bug, but if it's not the kind of bug the bounty program is designed to address, it's not getting paid out. The incentives you create by paying for every random non-vulnerability are really bad.

The subtext of this thread is that companies should reward any research that turns up surprising or user-hostile behavior in products. It's good to want things. But that is not the point of a security bug bounty.

Re:Anyone can access deleted and private repository data on ... by lolinder on Wednesday July 24, 2024 @07:27PM (#41063300)
> The incentives you create by paying for every random non-vulnerability are really bad.

So much this. It's pretty clear that most people commenting on this thread have never been involved in a bug bounty program on the company's side.

Bug bounty programs get a lot of reports, most of which are frankly useless and many of which are cases of intended behavior subjectively perceived as problematic. Sifting through that mess is a lot of work, and if you regularly pay out on unhelpful reports you end up with many more unhelpful reports.

This particular case definitely feels like one where the intended behavior is horribly broken, but there are absolutely many cases where "this is intended" is the only valid answer to a report.

Re:Anyone can access deleted and private repository data on ... by cycomanic on Wednesday July 24, 2024 @06:42PM (#41062985)
I would argue that even if the behaviour was as intended, at least the fact that it was not documented was a bug (and a pretty serious one at that).
Re:Anyone can access deleted and private repository data on ... by tptacek on Wednesday July 24, 2024 @07:20PM (#41063236)
Again: you don't generally get bounties for finding "bugs"; you get them exclusively for finding qualified vulnerabilities.
Re:Anyone can access deleted and private repository data on ... by berdario on Thursday July 25, 2024 @08:01AM (#41067589)
That's true, but what's stopping a company from documenting a security issue as a known (mis)behaviour/bug? [*]

Companies can join/setup a bug bounty program, and just use it as a fig leaf for pretending to care about their own product/service's security.

Of course bug bounties can and are abused daily by people who report trivial non-issues in the hope of compensation

But in the same way, companies can also be bad actors in the way that they engage with bounties. I would usually expect big names (like Google, Apple, Github, etc.) to be trustworthy...

[*] Of course what stops companies is precisely them not being seen as trustworthy actors in the bug bounty system anymore... And for now, that's a decision that individuals have to make themselves

Re:Anyone can access deleted and private repository data on ... by tptacek on Thursday July 25, 2024 @10:05AM (#41068833)
No large company cares even a tiny bit about the money they're spending on bug bounties. They would literally lose money trying to cheat, because it would cost them more in labor to argue with people than to pay out. In reality, the bounty teams at Google and Apple are incentivized to maximize payouts, not minimize them.

If you don't trust the company running a bounty, don't participate. There are more lucrative ways to put vulnerability research skill to use.

Re:Anyone can access deleted and private repository data on ... by andrewinardeer on Wednesday July 24, 2024 @05:39PM (#41062448)
If a renown company won't pay a bug bounty, a foreign government often will.
Re:Anyone can access deleted and private repository data on ... by madeofpalk on Wednesday July 24, 2024 @06:10PM (#41062733)
Why would a foreign government pay for a commonly known security limitation of a product?
Re:Anyone can access deleted and private repository data on ... by prepend on Wednesday July 24, 2024 @06:33PM (#41062927)
Good luck selling this to a foreign (or domestic) government. It doesn’t seem valuable to me, but who knows, maybe someone finds it worth payout.
Re:Anyone can access deleted and private repository data on ... by K0balt on Thursday July 25, 2024 @04:57AM (#41066401)
The property (“bug”) in question is an inherent and intentional property of meekly-tree type storage systems such as git.

Calling this a bug is like reporting that telnet sends information unencrypted.

The actual bug is in the way that their UX paradigm sets user expectations.

Re:Anyone can access deleted and private repository data on ... by oasisaimlessly on Thursday July 25, 2024 @10:26AM (#41069042)
s/meekly/Merkle/g
Re:Anyone can access deleted and private repository data on ... by K0balt on Friday July 26, 2024 @06:10PM (#41082768)
lol. Someday autocorrect is going to take over my social media entirely.
Re:Anyone can access deleted and private repository data on ... by yencabulator on Thursday July 25, 2024 @12:10PM (#41070324)
Don't blame Git for Github decisions.

Github chooses to store all "Github forks" in the same repository, and allow accessing things in that repository even when they are not reachable by the refs in the namespace of one "fork". That is purely a Github decision.

Re:Anyone can access deleted and private repository data on ... by K0balt on Thursday July 25, 2024 @08:29PM (#41074879)
They could have split forks off into new repos, but then they wouldn’t be forks, in the repository sense. It was never hard to just copy a repo instead of forking it. The UX just leads people into holding it wrong.
Re:Anyone can access deleted and private repository data on ... by jowea on Wednesday July 24, 2024 @05:21PM (#41062287)
Shouldn't that be on the config page for the repo below the "private" button with a note saying private is not actually private if it's a fork? And ditto for delete?
Re:Anyone can access deleted and private repository data on ... by jiggawatts on Wednesday July 24, 2024 @07:18PM (#41063222)
From the article:

"We surveyed a few (literally 3) commonly-forked public repositories from a large AI company and easily found 40 valid API keys from deleted forks."

This is how your customers get their entire cloud taken over, because you made a stupid, stupid decision and instead of fixing it when warned (repeatedly!) you instead decide to just blame the customer for not reading page 537 paragraph 3 subsection B about the counter-intuitive security footgun you've left in your product.

This is negligence, pure and simple.

Re:Anyone can access deleted and private repository data on ... by ndriscoll on Wednesday July 24, 2024 @09:08PM (#41063836)
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.

Re:Anyone can access deleted and private repository data on ... by jiggawatts on Wednesday July 24, 2024 @10:37PM (#41064262)
> 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 access checks, so if you click around it'll say something like "you don't have browse access". This looks secure, but attempting access anonymously would have succeeded!

I had a customer recently where this happened -- they clicked through every Storage Account to "check" them, convinced themselves they were secure, meanwhile they had database backups with PII accessible to world+dog!

Re:Anyone can access deleted and private repository data on ... by ndriscoll on Wednesday July 24, 2024 @11:29PM (#41064467)
The bit you quoted is referring to public forks that were deleted. That sounds like a non-issue to me, and I'm not at all surprised that

1. Public "forks" are just namespaced branches that share an underlying repo

2. They don't run the garbage collector all the time

I'd be surprised if those weren't true.

Like I said, the behavior with private forks sounds indefensible.

The OP is mixing together multiple things. Being able to access deleted public data isn't that surprising and definitely isn't a security issue as far as leaking keys is concerned (it was already public. Assume it has been cloned). Being able to access private forks is a footgun/issue. They should be garbage collecting as part of public repo creation so that unreferenced commits from private forks aren't included.

Re:Anyone can access deleted and private repository data on ... by andersa on Thursday July 25, 2024 @05:59AM (#41066775)
As far as I can tell, they never run the garbage collector. Code I pushed to a fork that was deleted several years ago can still be accessed through the original parent repo.
Re:Anyone can access deleted and private repository data on ... by cellis on Wednesday July 24, 2024 @11:27PM (#41064458)
Putting keys in repos should not be done, full stop. Even if GitHub forks weren’t public, their _private_ repos could one day be compromised. Instead, store keys in a shared vault, .gitignore the .env and have a .env.example with empty keys.
Re:Anyone can access deleted and private repository data on ... by jiggawatts on Thursday July 25, 2024 @02:16AM (#41065268)
Any time I hear “shouldn’t be done” I translate that to “will happen regularly”.

I do see this regularly in my work. All but one dev team I’ve worked with over the last few years has done this.

Re:Anyone can access deleted and private repository data on ... by Eisenstein on Thursday July 25, 2024 @09:45AM (#41068627)
Don't blame the end user for doing something you don't want them to do if it is more convenient to do and works without immediate consequences. Redesign it or rethink your assumptions.
Re:Anyone can access deleted and private repository data on ... by prmoustache on Thursday July 25, 2024 @03:10AM (#41065631)
> Why would anyone think that a private fork is "published"!?

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.