What do others use for ensuring the authenticity of images after downloading them with docker pull?
We’ve setup our CI build process to use docker for consistent, cross-platform builds. To ensure that our builds don’t use a malicious docker image (because the surface area of attack with TLS is enormous if you’re using X.509), we’ve been using DCT (Docker Content Trust).
Unfortunately, I just discovered that the official docker documentation says that DCT is being deprecated. Apparently this was announced last year, and in June this blog post was published with advice:
Cosign is not secure
We spent some time looking into cosign, but we discovered that the private keys aren’t actually in the hands of the developer.
Rather, they use this complicated setup using very insecure X.509 to issue temporary certificates.
The result is that the OIDC identity provider (e.g., GitHub) extends the vector of attack significantly – to probably tens of thousands of people – that can publish a malicious image that will be accepted by cosign as “trusted”
Notation (Notary v2)
I also looked at Notation (aka “Notary v2”), but there’s no way to bootstrap the software safely, since (perplexingly) their tool for verifying the authenticity of images using cryptographic signatures itself can’t be verified using a cryptographic signature.
Alternatives
Are there any other alternatives that I can use to replace DCT to ensure the authenticity (using cryptography) of the container images that I download – where the keys are actually held by the developer (thus significantly reducing the “insider threat” risk)?
What do you (or does your org do) to ensure that you’re not using maliciously-modified containers after pulling a new docker image?


Assuming the risk of being naive… Why is checking the hash not enough?
Or didn’t I understand your problem?
Because the hash comes from the same source as the image itself.
So if someone compromised the publishing infrastructure (or does a MITM attack), they can trivially maliciously modify the hash as easily as they can maliciously modify the image. It provides zero security to Publishing Infrastructure compromise.
A good historical example of this happening was when monero’s release infrastructure was comprimised. And here’s a great list of historically relevant cases where this happened:
In the case of Monero, the users were able to verify that the release was malicious – because the cryptographic signature was invalid, and it was fixed very fast. If the user can only check checksums, they have literally no way to detect if the publishing infrastructure or a MITM attack is taking place.
Got it, I thought it was a last segment attack (image substition) but now I see you are aiming to a fully supply chain attack.
And if you find an nswer to that, please let me know because this things have virtually not a solution that ticks all boxes