In this video, we explain why using container image tags can expose us to some nasty software supply chain attack. We present two alternatives:
- Image Digests
- Digital Signatures (with Sigstore)
Docker image tags are mutable, i.e. they can be updated. If we define our deployment manifests using image tags, an attacker who gains access to our container image registry can swap a genuine image for a corrupted one.
An image digest is an immutable identifier computed by the container engine that cannot be updated. Using the digest we can pin a specific version of an image.
However, that is not enough to establish the provenance of the image. To get such guarantees, we need to leverage digital signatures.
A digital signature is meant to guarantee authenticity, non-repudiation and integrity of the signed data. Despite digital signature have been around for many years, they are seldom employed because of their complexity. You need to setup an infrastructure to manage keys, signing and verification.
However, Sigstore, a project back by the Open Source Security Foundation (OpenSSF) and companies like Google and Red Hat, is promising to democratize digital signatures for artifact. We can using their CLI cosign and sign and verify images with just one line. We can also easily integrate cosign in our automation pipelines such as GitHub Actions and GitLab CI.
Finally, we can use Sigstore's policy controller in our Kubernetes cluster to define cluster image policy and do strict control on what runs on our environments.
00:00 Intro
00:19 Why are image tags bad?
02:47 What is an image digest?
04:47 What is a digital signature?
06:14 Sigstore
-----
Useful links:
-----
Connect with me:
#docker #devops #devsecops #kubernetes