Building Scanning and Signing into Delivery Pipelines
This lesson explains where vulnerability scanning belongs in a pipeline, how signing and verification ensure only trusted artifacts run, and how to secure the pipeline itself.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the scanning stages from source to runtime.
- Explain how AWS Signer and image signing prove an artifact's origin.
- Describe controls that secure the pipeline itself.
Scanning stages
A pipeline scans at several points. Source: static analysis, secret detection and infrastructure as code checks on every pull request, for example with Amazon Inspector code security integrated with the repositories. Build: dependency and image scanning, for example with the Amazon Inspector CI/CD integration and SBOM generator in CodeBuild, failing the build when findings exceed a severity threshold. Registry and runtime: ECR enhanced scanning and Inspector scanning of Lambda functions and EC2 rescan continuously, because new vulnerabilities are published after deployment.
Pipeline scanning
Signing and verification
Signing creates a verifiable link between an artifact and the pipeline that built it. AWS Signer signs Lambda deployment packages, and a Lambda code signing configuration with the enforce policy rejects code that is unsigned, signed by another profile or modified. Container images are signed with AWS Signer and the Notation client or with ECR managed signing, and admission controllers on EKS verify signatures before pods run. KMS asymmetric keys, including ML-DSA keys, can sign other artifacts.
-
Scan source
Pull request checks for code, dependencies, secrets and IaC.
-
Build and scan
Build once, generate an SBOM, scan the image and fail on critical findings.
-
Sign
Sign the artifact with the pipeline's signing profile or key.
-
Promote
Deploy the same signed digest to each environment.
-
Verify and rescan
Targets verify signatures; registries and runtimes rescan continuously.
Trusting what is deployed
Securing the pipeline itself
- Separate build and deployment roles, with deployment roles in target accounts trusted only by the pipeline.
- Artifacts encrypted with customer managed KMS keys and stored with tag immutability.
- No long-term credentials in the pipeline: OIDC federation or IAM roles.
- Approvals and audit logs for production promotions.
Stopping vulnerable images
Twice this year, container images with critical vulnerabilities reached production, and once a developer pushed an image directly to the production repository.
The pipeline now scans each image in CodeBuild with the Inspector CI/CD integration and fails on critical findings, then signs the image with ECR managed signing and pushes it with an immutable tag.
EKS admission control rejects images without the pipeline's signature, so directly pushed images no longer run, and ECR enhanced scanning alerts the owning team when a newly published CVE affects an image already in production.
An image passed scanning at build time. Why does it still need continuous scanning?
Show answer
New vulnerabilities are published after the image is built. Continuous scanning in ECR re-evaluates stored images against new CVEs.
Exam Tips
Remember for the exam
- Stop vulnerable images before push: Inspector scan in CodeBuild with a severity threshold.
- Vulnerabilities published after deployment: ECR enhanced scanning and continuous Inspector scanning.
- Lambda must run only pipeline-built code: AWS Signer with an enforced code signing configuration.
- Clusters must run only signed images: signature verification in an admission controller.