4 ms·
Does `docker pull` do any form of signing? Because if it does, I've never seen it. I'm just waiting for some adversary to insert some malware in a popular libra
by majewsky 9y ago
Does `docker pull` do any form of signing? Because if it does, I've never seen it. I'm just waiting for some adversary to insert some malware in a popular library image (something like nginx:latest or ruby:2.3) and have that deployed on thousands, if not millions of servers. Assuming, of course, that this has not already happened (cough National Security Letter cough).
System package managers have protections in place against that: Package signing means that you now have to hack the packager's laptop and obtain their signing key to publish malicious packages, and reproducible builds will close that attack vector as well. (Which is why I'm very disappointed that distributions are not pushing reproducible builds as a top priority. If nothing else, this might make me switch to NixOS soon.)
- gtirloni 9y agohttps://docs.docker.com/engine/security/trust/content_trust/ https://docs.docker.com/engine/security/trust/content_trust/
- vidarh 9y agoIt can, but it's more cumbersome than it should be. It's one of the things rkt does much better (signed by default; need to explicitly disable trust if you want to pull something that isn't properly signed. But also, I think you overstate the benefit you get from system package managers there in that people quickly get groomed into accepting it as normal to add extra APT repositories and the like to install some app, or bypass the system packages entirely (curl somesite | bash, anyone?) or use a series of third party package managers (npm, rubygems etc.), all of which massively increases the attack surface. So if you only trust your distro, packager, sure. But most people end up pulling things from far more sources. While Docker security is by no means painless, this is one more reason to run things in containers. You're right to worry about the base images, but I'd still argue you're at least in marginally better shape if you run that "curl somesite | bash" inside a container (I'll assume that it won't stop a dedicated attacker, but it has far more potential to stop accidents or lower level attackers). I'm trying to move more of my stuff to rkt, as I think it gets more things right and signatures by default is one of them. Being able to exchange the container runtime for whatever level of isolation works best for your app is another thing (ranging from just chroot to LKVM)
- dom0 9y agoDocker docs: > Currently, content trust is disabled by default. So no, no signing ;)
- mikegerwitz 9y ago> Which is why I'm very disappointed that distributions are not pushing reproducible builds as a top priority. If nothing else, this might make me switch to NixOS soon. Yes, it's unfortunately a step in the wrong direction, which is alarming considering the scale at which Docker is used. I haven't used Nix, but I use Guix, and GuixSD is its distribution. Like Nix, it's a functional package manager, so not only do you get package signing, but you also get a fully verifiable and reproducible (barring certain packages that aren't yet reproducible) state of the entire system. It's not that containers and Docker can't succeed in solving some of these problems. Guix can create docker images, for example. Better yet, it can run things in isolation in containers, even ad-hoc, without the need for Docker. https://www.gnu.org/software/guix/news/running-system-services-in-containers.html https://www.gnu.org/software/guix/news/running-system-servic... You can even run your browser in a container and share the X11 session: https://github.com/pjotrp/guix-notes/blob/master/CONTAINERS.org https://github.com/pjotrp/guix-notes/blob/master/CONTAINERS.... (And in that regard, we also have Qubes OS, but that doesn't have the benefit of a functional package manager, unless you use Guix/Nix of course.)
- ptman 9y agodebian is pushing reproducible builds: https://wiki.debian.org/ReproducibleBuilds https://wiki.debian.org/ReproducibleBuilds
- majewsky 9y agoI'm aware of that but that's only a few guys working on that AFAICS. "Pushing it" would be if the core devs said "all new packages after day X must build reproducibly", and then "on day Y, we will remove all packages that do not build reproducibly".
- ptman 9y agoWell, debian is a volunteer effort, it's hard to force stuff on people that will just stop contributing if it doesn't feel fun enough.