News for hackers. Stuff that matters.
Re:Unauthorized access to Docker Hub database by rlt on Monday April 29, 2019 @01:11AM (#19775986)
I've found Docker's communication about this incident to be pretty poor.

1. The email they sent out didn't specify whether your account was included in the 5% of compromised users, or whether you had linked GitHub or BitBucket accounts that they unlinked. The only way to know seems to be if you still have a linked GH/BB account then you're (probably?) ok.

2. They mention you should "check security logs to see if any unexpected actions have taken place" and linked to GH/BB security audit log pages, but I don't believe that's sufficient, you also need to check for rogue commits.

3. They haven't said when the breach occurred, so there's no way of knowing how far back to look. They "discovered" it on Thursday, and say it was a "brief period", but that's meaningless.

4. They downplayed it as "brief", "non-financial user data", and "less than 5%" of users. I care more about the integrity of source code and builds than any financial information I might have given to Docker.

I can sometimes forgive companies for breaches like this, if they own up to it and do an excellent job of communicating what happened, how, when, what the impact and mitigations are, both internally and for their customers. That was not the case here.

EDIT: they discovered the breach Thursday, but still haven't given a timeframe for when it may have first occurred.

Re:Unauthorized access to Docker Hub database by tie_ on Monday April 29, 2019 @02:36AM (#19776298)
I also find it frustrating that they are not stating when exactly did the breach occur. The message implies that they know, due to the "brief period" claim, but they are not explicitly stating one of the most important facts. No mention in the FAQ either.

I'm guessing that they are either not quite certain about the exact timing and duration, or that the brief period was actually embarrassingly long. Otherwise, that's one of the most important facts that anyone would communicate.

Re:Unauthorized access to Docker Hub database by randallsquared on Monday April 29, 2019 @07:50AM (#19777472)
Yeah, the ambiguousness of “brief” is what implies that they do not know, with certainty. It seems most likely to mean “we think it happened at or after time n, but haven’t looked at everything yet, so the belief might change”.
Re:Unauthorized access to Docker Hub database by sundvor on Monday April 29, 2019 @08:43AM (#19777786)
Our whole lives are but brief glimpses on the grand scale of thing. :)

This really highlights the value of locking down the base images used in our own pipelines.

Re:Unauthorized access to Docker Hub database by rlt on Monday April 29, 2019 @01:56AM (#19776148)
Oh, and if anyone with write access to your repositories had their GH/BB account linked to their DockerHub account, your source code could be compromised.

AFAIK the only way to check is to ask every person who has write access and hope they tell the truth.

Honestly, everyone should probably check their repos for recent activity / commits.

We need more fine-grained permissions for things like this. Principle of Least Authority, people.

Now is a good time to review authorized application https://github.com/settings/installations and if you're part of a GitHub organization I highly recommend setting up OAuth application restrictions https://help.github.com/en/articles/about-oauth-app-access-r...

Re:Unauthorized access to Docker Hub database by kelleyk on Monday April 29, 2019 @07:00AM (#19777284)
I haven't seen anyone mention that Docker Hub's automatic build integration requires either "Owner"-level permissions on your organization or "Admin"-level permissions on the individual repository. Based on the GitHub-side audit log, Docker Hub seems to be using this access to add deploy keys to your repository, but this isn't mentioned in the documentation (which is why we had to go spelunking in the audit log), and if you try to take a least-privilege approach and grant only the read-only access that Docker Hub should require, your GitHub repository will simply not appear in the list of available repositories when you try to configure an automatic build.

Lots of people may have exposed credentials to Docker Hub that can do much more than disclose proprietary source code.

Re:Unauthorized access to Docker Hub database by donmcronald on Monday April 29, 2019 @02:36AM (#19776299)
Signed commits would be useful, right? I don’t know much about GitHub permissions, but I’ve skimmed GitLab’s. Why would Docker hub have write access to the repo? Is there really no read only access for repos?
Re:Unauthorized access to Docker Hub database by rlt on Monday April 29, 2019 @02:42AM (#19776325)
I think it's possible, but I'm not sure what DockerHub does. GitHubs OAuth tokens can't be restricted to be read-only or to specific repos (https://stackoverflow.com/questions/26372417/github-oauth2-t...) but I think Deploy Keys can.
Re:Unauthorized access to Docker Hub database by donmcronald on Monday April 29, 2019 @03:00AM (#19776390)
They have a lot of scopes compared to GitLab (https://developer.github.com/apps/building-oauth-apps/unders...). I find it crazy that anyone would click authorize on a 3rd party app with the repo scope without having a way to (easily) identify unauthorized commits.
Re:Unauthorized access to Docker Hub database by Kalium on Monday April 29, 2019 @10:43AM (#19778765)
A lot of developers are in a hurry and interested mainly in getting their builds to work so they can move on to the thing they actually care about. They don't think about the potential consequences of the easiest thing they did to make it work.

This is how a sizable number of security incidents happen. The easiest thing to do is reckless, so people do it.

Re:Unauthorized access to Docker Hub database by Nicksil on Monday April 29, 2019 @02:39AM (#19776309)
> They downplayed it as "brief", "non-financial user data", and "less than 5%" of users.

This caught my attention, as well; rubbed me the wrong way.

Re:Unauthorized access to Docker Hub database by oldjokes on Monday April 29, 2019 @08:22AM (#19777626)
Companies seem to have realized that security incidents are more of a public relations issue than anything else after Equifax. Just lockdown as much info as you can, limit anyone talking about anything, spin spin spin. No reason to be more proactive than that, you only get punished for it.
Re:Unauthorized access to Docker Hub database by tsbinz on Monday April 29, 2019 @02:00AM (#19776170)
Where did they say it started Thursday? The blog post says it was discovered Thursday ...
Re:Unauthorized access to Docker Hub database by rlt on Monday April 29, 2019 @02:14AM (#19776209)
Good point. I probably assumed it due to the "brief period" language, but you're right, that's highly ambiguous.

I've edited my comment.

Re:Unauthorized access to Docker Hub database by jrochkind1 on Monday April 29, 2019 @09:23AM (#19778104)
> 2. They mention you should "check security logs to see if any unexpected actions have taken place" and linked to GH/BB security audit log pages, but I don't believe that's sufficient, you also need to check for rogue commits.

It does not seem to me obvious how one would go about determining with confidence that "no unexpected actions have taken place", in really either of these venues, and the process of doing so does not seem trivial.

This is what makes it scary, indeed, and I agree the advice glosses over it as if it is obvious and easy how to do this.

Re:Unauthorized access to Docker Hub database by nickjj on Monday April 29, 2019 @08:37AM (#19777739)
I didn't even get an email from Docker but I still changed my password.

Funny enough, I only found out about the issue from seeing it on HN the other day.

Re:Unauthorized access to Docker Hub database by pritambaral on Monday April 29, 2019 @01:19AM (#19776022)
Not surprising given their past outlook towards security.
Re:Unauthorized access to Docker Hub database by jnbiche on Monday April 29, 2019 @08:43AM (#19777785)
Also, have they even released the hash algorithm or if it was salted?
Re:Unauthorized access to Docker Hub database by pluma on Monday April 29, 2019 @07:17AM (#19777346)
I'm not even sure if their disclosure meets the requirements of the GDPR, considering the breach involved user data.