c3.10 Build a DevSecOps pipeline
DevSecOps means development, security, and operations working together in automated continuous-delivery pipelines, with security built in from the start of a release rather than bolted on. Bake hardening, security testing, and protective controls into the pipeline.
Implementation guidance
Automate security into continuous delivery
Adopt continuous-delivery pipelines where build, provisioning, quality tests, security tests, and monitoring are automated, and security is considered from the very start of a release — not at the end.
Start from AWS guidance and accelerators
DevSecOps is a methodology, not a single AWS service to "turn on". To design and standardize your pipeline, start from AWS's prescriptive material:
- Designing a DevSecOps mechanism — prescriptive guidance for building the mechanism.
- AWS DevOps Pipeline Accelerator (DPA) — templates that stand up a complete, standardized CI/CD pipeline for applications or infrastructure.
- AWS Well-Architected DevOps Guidance — the best-practice framework, with a development lifecycle that has security built in.
AWS DevOps Agent complements the pipeline on the operations side: it is an AI agent that reviews release readiness and testing, and acts as an autonomous on-call engineer for incident response and reliability across AWS, multicloud, and on-premises. Use it to strengthen the "Ops" of DevSecOps — its deeper fit is in the operations and incident-response controls (see Automate critical playbooks and Advanced security automations). It does not replace the pipeline's security testing below, which is still SAST/DAST/SCA and secret scanning.
Harden the base in the pipeline
If you deploy to instances:
- Rebuild base images regularly with current patches using EC2 Image Builder.
- Add the Amazon Inspector agent so instances are continuously checked for OS and application vulnerabilities.
- Apply OS hardening (for example CIS benchmarks); Inspector can verify alignment.
Test applications and block on critical findings
Run SAST and DAST plus software composition analysis as part of the pipeline, and stop promotion to production when a high or critical vulnerability is found. The earlier a flaw is caught, the cheaper it is to fix. AWS CodePipeline can orchestrate these stages.
Deploy protective controls as code
When a known vulnerability cannot be fixed yet (for example a third-party dependency), deploy compensating controls — such as custom AWS WAF rules — as part of the pipeline until the fix ships. See using CI/CD to deploy AWS security services with Terraform.
How it fits together
Watch
How to validate
- Does the pipeline scan applications for vulnerabilities (SAST/DAST/SCA)?
- Does it scan for secrets committed to code?
- Does it block promotion to production when critical vulnerabilities are found?
- Are base images hardened and rebuilt regularly in the pipeline?
Threats addressed
- Exposed web applications put their vulnerabilities within reach of adversaries; without security gates in the pipeline, flawed code reaches production.
- Development teams are rarely security experts and lack time to prioritize secure coding without automation enforcing it.
AWS services
Framework mappings
AWS CAF
Well-Architected
NIST CSF
References
- docs.aws.amazon.com/prescriptive-guidance/latest/designing-a-devsecops-mechanism
- docs.aws.amazon.com/prescriptive-guidance/latest/devops-pipeline-accelerator/introduction.html
- docs.aws.amazon.com/wellarchitected/latest/devops-guidance/devops-guidance.html
- aws.amazon.com/devops-agent
- aws.amazon.com/codepipeline
- www.cisecurity.org/cis-benchmarks
- aws.amazon.com/blogs/security/how-use-ci-cd-deploy-configure-aws-security-services-terraform
Cloud Security Maturity Model