Earlier quoted context omitted.
Exactly this. For the docker images we use in production, we fork the corresponding git repo, build our own image and push it to our own local docker registry and pull it from there. It's fairly easy to setup in fact.
Out of curiosity do you resolve it so that the image is FROM scratch or do you rely on alpine/some other base image?
Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
231–240 of 269 posts
Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#232Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#233What are dockerhub's alternatives? No 2FA. That is bad.
As others have stated you could run your own registry or use an alternative service for private repositories, to minimise or eliminate the attack vector. By replicating the images (or packages) that you need into your own account, you can minimise the possibility of a bad actor replacing a well-known image with something untrusted. An alternative is to side-cart a service like Notary ( https://docs.docker.com/notary/…
Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#234Docker Hub being hacked was basically just a question of time. With how much of the internet blindly pulls images from it, the potential gain from hijacking just one high-profile one would be monumental.
Hacking aside, Docker is an invitation to trouble. Anybody can publish a binary blob, and users are expected to blindly trust it. It's centralized. It doesn't have a context of "trustworthiness" yet I don't recall docker ever warning me that the image I'm downloading could have been the work of any person. Shortcuts all around -- kind of reminds me of MongoDB. Sad it's the primary player...
Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#235Earlier quoted context omitted.
It uses SHA-256 right? My understanding is that there isn't yet a workable collision attack on the SHA-2 family. Regardless, I think it's certainly an excellent hardening step.
Infosec in 2019: The server I download code from telling me the hash of said code is "certainly an excellent hardening step".
Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#236Earlier quoted context omitted.
Wouldn't that mean you need to find a collision?
The issue is, how do you verify the checksum you are using is valid. If you obtain the checksum from the same place you get the image, then an attacker can simply calculate a new checksum for the malicious image and publish it too. I guess if you were really sure you had obtained a checksum prior to the service compromise, then that would give reasonable assurance the image was not tampered with.
Assuming you have fetched a given image and captured its sha in a config file in your version control (e.g. a kubetnetes manifest), then whenever you deploy a container you are sure that you're not affected by exploits happening _after_ you saved the fingerprint.
Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#237Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#238Earlier quoted context omitted.
Hacking aside, Docker is an invitation to trouble. Anybody can publish a binary blob, and users are expected to blindly trust it. It's centralized. It doesn't have a context of "trustworthiness" yet I don't recall docker ever warning me that the image I'm downloading could have been the work of any person. Shortcuts all around -- kind of reminds me of MongoDB. Sad it's the primary player...
Not docker, but library hosting, in general. My company maintains client libraries for 6 languages, also hosted in the popular place for that language. The standards for account management and authenticating the libraries are all different. Some have scary-little security, some have painful security.
One day, there's going to be a colossal compromise, and that might finally change where we place security in the priority chain.
Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#239Re: Docker Hub Hacked – 190k accounts, GitHub tokens revoked, builds disabled
#240Earlier quoted context omitted.
Most distributions' package repos aren't a free-for-all, unlike NPM It'd be a legit criticism of ruby gems or CPAN, but linux distros are an entirely different kettle of fish, and most of the mainstream distros take security pretty seriously
Yeah just like Mint one of the most popular Linux distro where you had a preinstalled malmware on your ISO because servers got hacked. Should I mention the ultra critical vulnerability of apt that was discovered few months ago or that apt doesn't use https, cuase it designed to work with http only in the first place.