Lesson 06 — Image Signing & Verification
Learning Objectives
Section titled “Learning Objectives”By the end of this lesson, you will be able to:
- Understand what Image Signing is
- Learn why image signing is critical for supply chain security
- Understand digital signatures and cryptographic verification
- Explore image signing technologies
- Learn how Amazon EKS verifies trusted images
- Integrate image signing into CI/CD pipelines
- Apply enterprise image trust best practices
Why This Matters
Section titled “Why This Matters”Building a secure container image is only part of the security journey.
Organizations must also answer critical questions:
- Was this image created by our organization?
- Has the image been modified?
- Has the image been replaced by an attacker?
- Can this image be trusted?
- Is this the exact image that passed security validation?
Without verification, attackers may introduce:
- Malicious container images
- Backdoored software
- Trojanized dependencies
- Fake application updates
- Supply chain attacks
Image Signing ensures only trusted images are deployed into production.
What is Image Signing?
Section titled “What is Image Signing?”Image Signing is the process of digitally signing a container image using cryptographic keys.
The signature proves:
- Who created the image
- That the image has not been modified
- That the image is authentic
- That the image can be trusted
Unlike image scanning, which identifies vulnerabilities, image signing establishes trust.
Image Signing Workflow
Section titled “Image Signing Workflow”Developer
↓
Build Image
↓
Security Scan
↓
Digitally Sign Image
↓
Amazon ECR
↓
Verify Signature
↓
Amazon EKS
↓
Deploy ContainerOnly trusted images are allowed into production.
Why Image Signing Matters
Section titled “Why Image Signing Matters”Without image signing:
Attacker
↓
Uploads Fake Image
↓
Registry
↓
Production DeploymentWith image signing:
Fake Image
↓
Signature Validation
↓
Verification Failed
↓
Deployment BlockedDigital signatures help prevent unauthorized or tampered images from being deployed.
Digital Signatures
Section titled “Digital Signatures”A digital signature uses cryptography to verify authenticity and integrity.
The process uses:
- Private Key
- Public Key
Private Key
↓
Sign Image
↓
Digital Signature
↓
Public Key
↓
Verify ImageOnly the holder of the private key can create a valid signature.
Public Key Cryptography
Section titled “Public Key Cryptography”Image signing relies on asymmetric cryptography.
| Private Key | Public Key |
|---|---|
| Secret | Shared |
| Creates signatures | Verifies signatures |
| Stored securely | Distributed to verifiers |
If the image changes after signing, verification fails.
Image Integrity
Section titled “Image Integrity”Image signing protects image integrity.
Original Image
↓
Sign Image
↓
Store Signature
↓
Image Modified?
↓
Yes
↓
Verification FailedEven a single modified byte invalidates the signature.
Image Authenticity
Section titled “Image Authenticity”Image verification confirms:
Trusted Publisher
↓
Signed Image
↓
Registry
↓
Verification
↓
Deployment ApprovedThe organization knows exactly who produced the image.
Image Signing Lifecycle
Section titled “Image Signing Lifecycle”Developer
↓
Source Code
↓
Build Image
↓
Scan Image
↓
Sign Image
↓
Amazon ECR
↓
Admission Policy
↓
Amazon EKSSigning should occur only after the image successfully passes security validation.
Common Image Signing Technologies
Section titled “Common Image Signing Technologies”Enterprise organizations commonly use:
| Technology | Purpose |
|---|---|
| Cosign | Container image signing and verification |
| Sigstore | Open-source signing infrastructure |
| Notation | OCI image signing standard |
| AWS Signer | Managed code signing service (for supported workloads and integrations) |
| in-toto | Supply chain integrity metadata |
| The Update Framework (TUF) | Secure software update framework |
Cosign has become one of the most widely adopted solutions for Kubernetes image signing.
Cosign
Section titled “Cosign”Cosign is an open-source image signing tool developed as part of the Sigstore project.
Features include:
- Image signing
- Signature verification
- Keyless signing support
- OCI registry integration
- Supply chain security
- Kubernetes policy integration
Many enterprise Kubernetes platforms use Cosign as part of their CI/CD pipelines.
Sigstore
Section titled “Sigstore”Sigstore provides a secure ecosystem for software signing.
Components include:
- Cosign
- Fulcio (certificate authority)
- Rekor (transparency log)
Benefits:
- Open source
- Transparent verification
- Supply chain integrity
- Simplified key management
Image Verification
Section titled “Image Verification”Before deployment:
Container Image
↓
Verify Signature
↓
Trusted?
↓
Yes
↓
Deploy
-------------------
No
↓
Reject DeploymentVerification ensures only approved images reach production.
Admission Controllers
Section titled “Admission Controllers”Image verification is commonly enforced using admission policies.
Developer
↓
Deploy Image
↓
Admission Controller
↓
Verify Signature
↓
Approved
or
RejectedUnsigned or untrusted images are blocked automatically.
Image Signing in Amazon EKS
Section titled “Image Signing in Amazon EKS”Developer
↓
CI/CD Pipeline
↓
Image Scan
↓
Cosign Sign
↓
Amazon ECR
↓
Admission Policy
↓
Amazon EKS
↓
Running ContainerImage trust becomes an automated part of the deployment process.
Enterprise Example
Section titled “Enterprise Example”A multinational banking organization deploys all workloads through a centralized CI/CD platform.
The pipeline automatically:
- Builds the image
- Performs vulnerability scanning
- Executes compliance checks
- Signs the image using Cosign
- Stores the image in Amazon ECR
When developers deploy an application:
- The admission controller verifies the signature.
- Only images signed by the organization’s trusted signing key are accepted.
- Unsigned or externally signed images are rejected.
This ensures every workload running in production is both approved and traceable.
Common Image Signing Risks
Section titled “Common Image Signing Risks”Cloud Security Engineers frequently identify:
- Unsigned production images
- Shared signing keys
- Private keys stored in source code
- Missing signature verification
- Public images without validation
- Weak admission policies
- Untrusted registries
- Expired signing certificates
- Missing audit trails
- Manual deployment bypasses
These weaknesses reduce trust in the software supply chain.
Enterprise Monitoring
Section titled “Enterprise Monitoring”Security teams should monitor:
- Image signing failures
- Signature verification failures
- Admission controller denials
- Registry activity
- Signing key usage
- Certificate expiration
- Unauthorized image uploads
- CI/CD pipeline events
- Security policy violations
- Deployment approvals
Monitoring helps ensure that only trusted images are deployed.
Enterprise Implementation Strategy
Section titled “Enterprise Implementation Strategy”A recommended rollout:
Step 1
↓
Approve Base Images
↓
Step 2
↓
Build Container Images
↓
Step 3
↓
Perform Vulnerability Scanning
↓
Step 4
↓
Digitally Sign Images
↓
Step 5
↓
Push to Amazon ECR
↓
Step 6
↓
Enable Signature Verification
↓
Step 7
↓
Enforce Admission Policies
↓
Step 8
↓
Continuously MonitorThis process establishes a trusted software supply chain.
Image Signing vs Image Scanning
Section titled “Image Signing vs Image Scanning”| Image Scanning | Image Signing |
|---|---|
| Finds vulnerabilities | Verifies authenticity |
| Detects CVEs | Confirms trusted publisher |
| Identifies outdated software | Detects image tampering |
| Improves security posture | Establishes deployment trust |
| Should occur before deployment | Should occur after successful scanning |
Enterprise environments require both scanning and signing.
Best Practices
Section titled “Best Practices”As a Kubernetes Security Engineer:
- Sign every production container image.
- Scan images before signing them.
- Store signing keys securely using enterprise key management solutions.
- Never commit private signing keys to source code.
- Verify image signatures before deployment.
- Use admission policies to block unsigned images.
- Store images in trusted private registries such as Amazon ECR.
- Rotate signing keys regularly.
- Audit image signing and verification events.
- Integrate image signing into CI/CD pipelines.
Image signing establishes trust throughout the software supply chain and helps prevent unauthorized software from entering production.
Real-World Scenario
Section titled “Real-World Scenario”A technology company manages multiple Amazon EKS production clusters.
An attacker gains access to a developer’s workstation and attempts to upload a modified container image containing a hidden cryptocurrency miner.
The attacker pushes the image to the organization’s registry.
When the deployment begins:
- The admission controller requests signature verification.
- The image has no valid enterprise signature.
- Verification fails.
- Kubernetes rejects the deployment.
- Security teams receive an alert.
- The malicious image never reaches production.
Because image signing and verification were enforced, the attempted supply chain attack is stopped before any workloads are affected.
Key Takeaways
Section titled “Key Takeaways”After completing this lesson, you should understand:
- What Image Signing is
- Why digital signatures are important
- How public/private key cryptography supports image trust
- Image authenticity and integrity
- Cosign, Sigstore and enterprise signing technologies
- Admission controller verification
- Amazon EKS image trust architecture
- Best practices for software supply chain security
Image Signing & Verification are critical components of modern Kubernetes supply chain security. By combining vulnerability scanning, cryptographic signatures, admission policy enforcement and continuous monitoring, organizations can ensure that only trusted, approved and untampered container images are deployed into Amazon EKS production environments.
Knowledge Check
Section titled “Knowledge Check”Question 1
Section titled “Question 1”What is the primary purpose of Image Signing?
- A. Reduce image size
- B. Verify the authenticity and integrity of container images
- C. Improve container startup performance
- D. Encrypt Kubernetes Secrets
Answer: B
Question 2
Section titled “Question 2”Which cryptographic key is used to create a digital signature?
- A. Public Key
- B. Session Key
- C. Private Key
- D. Shared Secret
Answer: C
Question 3
Section titled “Question 3”Which open-source tool is widely used to sign and verify container images?
- A. Helm
- B. Cosign
- C. Prometheus
- D. Fluent Bit
Answer: B
Question 4
Section titled “Question 4”What should happen if an image fails signature verification during deployment?
- A. Deploy it with a warning.
- B. Skip the verification process.
- C. Reject the deployment.
- D. Automatically rebuild the image.
Answer: C
Question 5
Section titled “Question 5”Which combination represents enterprise best practice?
- A. Scan images, digitally sign approved images, securely manage signing keys, verify signatures during deployment and block unsigned images using admission policies.
- B. Deploy any image from a public registry without verification.
- C. Store private signing keys inside the Dockerfile.
- D. Sign images only after they have been deployed to production.
Answer: A
What’s Next?
Section titled “What’s Next?”In the next lesson, you will learn about Software Bill of Materials (SBOM), exploring how SBOMs provide a complete inventory of software components, improve software supply chain transparency, support vulnerability management and strengthen compliance for Amazon EKS workloads.
➡️ Next Lesson: Lesson 07 — Software Bill of Materials (SBOM)