The Problem with Tampering
Even if an image was built safely and scanned clean, how do you know someone didn't intercept it between the registry and your cluster and inject malware? Or that a disgruntled employee didn't push a backdoored version over the legitimate tag?
The answer is digital signatures. The builder uses a private key to create a cryptographic signature of the image. Consumers use the corresponding public key to verify that the image hasn't changed since it was signed and that it was signed by someone they trust.
The Key Management Nightmare
Traditional signing sounds straightforward but creates serious operational problems:
- Where do you store the private key? A secret management system? A hardware security module (HSM)? If it's stolen, every artifact ever signed with it is now suspect.
- What happens when an employee leaves? You need to rotate the key and re-sign every artifact.
- How do consumers get the right public key? You need a distribution mechanism, and if that mechanism is compromised, attackers can substitute their own public key.
Because of this operational pain, most container images shipped unsigned for years. The tooling existed; the friction was too high.