Lesson 01 β DevSecOps Fundamentals
Learning Path
βοΈ Phase 02 β AWS Cloud Security
π Module 11 β DevSecOps & Infrastructure as Code (IaC) Security
π― Lesson Objective
Section titled βπ― Lesson ObjectiveβBy the end of this lesson, you will be able to:
- Understand DevOps and DevSecOps.
- Explain the Secure Software Development Lifecycle (Secure SDLC).
- Understand Shift Left Security.
- Identify DevSecOps roles and responsibilities.
- Design enterprise DevSecOps workflows.
- Explain Continuous Integration and Continuous Delivery.
- Build a security-first software delivery mindset.
π Lesson Information
Estimated Time: 3 Hours
Difficulty: Intermediate
Prerequisites: Module 10 β Backup, Disaster Recovery & Business Continuity
Hands-on Labs: Yes
πΌ Business Scenario
Section titled βπΌ Business ScenarioβCloudNova Technologies develops cloud-native applications for thousands of enterprise customers.
The company has:
- 350 Software Developers
- 60 DevOps Engineers
- 25 Cloud Security Engineers
- Multiple Scrum Teams
- Hundreds of Git Repositories
- Production deployments every day
Historically, CloudNova followed a traditional software delivery process.
Unfortunately, recent security incidents exposed several weaknesses:
- Developers committed AWS Access Keys to GitHub.
- Terraform templates deployed public S3 buckets.
- Vulnerable Docker images reached production.
- Security reviews delayed every release.
- Manual penetration testing found issues after deployment.
- Production rollbacks increased significantly.
Management realised that security was being treated as the final checkpoint instead of being integrated throughout development.
The CTO asks:
βHow can we deliver software faster while making security an automatic part of the development process?β
As the Cloud Security Engineer, your responsibility is to transform CloudNova into a modern DevSecOps organisation.
Why DevSecOps?
Section titled βWhy DevSecOps?βModern software is released continuously.
Traditional security approaches cannot keep pace.
Without automation:
- Developers wait for security reviews.
- Security teams become bottlenecks.
- Vulnerabilities reach production.
- Releases become slower.
DevSecOps enables organisations to build security into every stage of software delivery.
What is DevOps?
Section titled βWhat is DevOps?βDevOps combines Development and Operations to deliver software faster through collaboration and automation.
Traditional model:
Developers
β
Throw code over the wall
β
Operations
β
DeployProblems:
- Slow releases
- Communication gaps
- Manual deployments
- Frequent failures
What is DevSecOps?
Section titled βWhat is DevSecOps?βDevSecOps extends DevOps by integrating Security throughout the Software Development Lifecycle.
Instead of security occurring only before production, security becomes continuous.
Development
β
Security
β
Operations
β
Continuous DeliveryEveryone shares responsibility for security.
Traditional Development Lifecycle
Section titled βTraditional Development LifecycleβRequirements
β
Development
β
Testing
β
Deployment
β
Security Review
β
ProductionProblems:
- Vulnerabilities discovered late.
- Expensive remediation.
- Delayed releases.
- Increased business risk.
Modern Secure SDLC
Section titled βModern Secure SDLCβCloudNova adopts a Secure Software Development Lifecycle.
Plan
β
Design
β
Develop
β
Build
β
Security Scan
β
Testing
β
Approval
β
Deploy
β
Monitor
β
ImproveSecurity exists in every phase.
Shift Left Security
Section titled βShift Left SecurityβOne of the most important DevSecOps principles is Shift Left Security.
Instead of finding vulnerabilities after deployment, they are identified much earlier.
Traditional
Production
β Security Testingβ
DevSecOps
Planning
β
Coding
β
Build
β
Security Testing
β
ProductionThe earlier a vulnerability is found, the cheaper it is to fix.
Shared Responsibility
Section titled βShared ResponsibilityβDevSecOps is a shared responsibility.
| Team | Responsibilities |
|---|---|
| Developers | Secure code, peer reviews |
| DevOps Engineers | Secure CI/CD pipelines |
| Cloud Engineers | Secure infrastructure |
| Security Engineers | Security automation, policies |
| Operations | Monitoring and incident response |
| Leadership | Governance and compliance |
Security is no longer owned by one team.
Enterprise DevSecOps Lifecycle
Section titled βEnterprise DevSecOps LifecycleβCloudNova follows this workflow.
Business Requirements
β
Architecture
β
Coding
β
Git Repository
β
Pull Request
β
Automated Security Scans
β
Build
β
Testing
β
Approval
β
Deployment
β
Monitoring
β
Continuous ImprovementContinuous Integration (CI)
Section titled βContinuous Integration (CI)βContinuous Integration automatically validates code after every change.
Typical CI activities:
- Compile Code
- Run Unit Tests
- Static Code Analysis
- Secret Detection
- Dependency Scanning
- Infrastructure Validation
Developers receive immediate feedback.
Continuous Delivery (CD)
Section titled βContinuous Delivery (CD)βContinuous Delivery automates software deployment.
Pipeline stages include:
Build
β
Package
β
Security Validation
β
Deployment Approval
β
Production ReleaseEvery release should be:
- Repeatable
- Automated
- Secure
DevSecOps Pipeline
Section titled βDevSecOps PipelineβDeveloper
β
Git Commit
β
Pull Request
β
Code Review
β
Static Code Analysis
β
Secret Scanning
β
Dependency Scan
β
Infrastructure Scan
β
Container Scan
β
Build
β
Testing
β
Deployment
β
Cloud MonitoringEnterprise DevSecOps Architecture
Section titled βEnterprise DevSecOps Architectureβ Developers β Git Repository β Pull Request β Code Review β CI/CD Pipeline β βββββββββββββββββΌβββββββββββββββββ β β β Secret Scan SAST Scan IaC Validation β β β Dependency Container Policy Check Scanning Scanning β β βββββββββββββββββΌβββββββββββββββββ β Deployment Approval β AWS Production β CloudWatch β’ CloudTrail β’ Security HubSecurity Gates
Section titled βSecurity GatesβCloudNova prevents insecure software from reaching production.
Every deployment must pass:
β Code Review
β Unit Testing
β Static Code Analysis
β Secret Detection
β Dependency Scan
β IaC Scan
β Container Scan
β Compliance Validation
Only successful builds proceed to deployment.
Security Throughout the SDLC
Section titled βSecurity Throughout the SDLCβ| SDLC Phase | Security Activity |
|---|---|
| Planning | Security Requirements |
| Design | Threat Modelling |
| Development | Secure Coding |
| Build | Static Code Analysis |
| Test | Vulnerability Assessment |
| Deploy | Security Validation |
| Operate | Monitoring |
| Improve | Lessons Learned |
Common DevSecOps Tools
Section titled βCommon DevSecOps ToolsβCloudNova uses the following tools.
| Function | Example Tools |
|---|---|
| Source Control | GitHub, AWS CodeCommit |
| CI/CD | AWS CodePipeline, GitHub Actions |
| Build | AWS CodeBuild |
| Containers | Docker |
| Orchestration | Kubernetes, Amazon EKS |
| Infrastructure | Terraform, CloudFormation |
| Secrets | AWS Secrets Manager |
| Monitoring | CloudWatch |
| Security | Amazon Inspector, Security Hub |
DevSecOps Culture
Section titled βDevSecOps CultureβTechnology alone does not create DevSecOps.
Successful organisations encourage:
- Collaboration
- Automation
- Continuous Learning
- Secure Coding
- Frequent Feedback
- Shared Ownership
- Continuous Improvement
Enterprise Best Practices
Section titled βEnterprise Best PracticesβCloudNova standards include:
- Shift security left.
- Automate every security check.
- Treat infrastructure as code.
- Never hardcode credentials.
- Review every Pull Request.
- Scan every dependency.
- Secure every pipeline.
- Continuously monitor production.
- Train developers regularly.
- Measure and improve continuously.
π Lab 01 β Explore a CI/CD Pipeline
Section titled βπ Lab 01 β Explore a CI/CD PipelineβObjective:
Understand a modern DevSecOps pipeline.
Tasks:
- Identify each pipeline stage.
- Explain its purpose.
- Determine where security checks occur.
- Identify manual approval points.
Deliverable:
Pipeline workflow diagram.
π Lab 02 β Secure SDLC Assessment
Section titled βπ Lab 02 β Secure SDLC AssessmentβReview the following SDLC phases:
- Planning
- Design
- Development
- Testing
- Deployment
- Operations
For each phase identify:
- Security Risks
- Security Controls
- Responsible Teams
π Lab 03 β Identify Security Gates
Section titled βπ Lab 03 β Identify Security GatesβScenario:
A developer commits new application code.
Create a deployment checklist that includes:
- Code Review
- Unit Tests
- Secret Scan
- Dependency Scan
- Infrastructure Scan
- Container Scan
- Security Approval
Explain why each gate is important.
π Lab 04 β DevSecOps Team Responsibilities
Section titled βπ Lab 04 β DevSecOps Team ResponsibilitiesβCreate a RACI matrix for:
- Developers
- DevOps
- Security
- Cloud Engineers
- Operations
Document who is:
- Responsible
- Accountable
- Consulted
- Informed
π» AWS CLI Lab
Section titled βπ» AWS CLI LabβVerify your development environment.
Verify AWS CLI
Section titled βVerify AWS CLIβaws --versionVerify Current Identity
Section titled βVerify Current Identityβaws sts get-caller-identityList AWS Regions
Section titled βList AWS Regionsβaws ec2 describe-regionsList IAM Users
Section titled βList IAM Usersβaws iam list-usersList IAM Roles
Section titled βList IAM Rolesβaws iam list-rolesList CodeCommit Repositories
Section titled βList CodeCommit Repositoriesβaws codecommit list-repositories(If using AWS CodeCommit in your environment.)
β Verification
Section titled ββ VerificationβVerify that you can:
β Explain DevSecOps.
β Differentiate DevOps from DevSecOps.
β Describe the Secure SDLC.
β Explain Shift Left Security.
β Identify security gates.
β Describe CI/CD workflows.
β Explain shared security responsibilities.
π Troubleshooting
Section titled βπ TroubleshootingβProblem
Section titled βProblemβDevelopers bypass security reviews.
Verify:
- Pull Request policies.
- Branch protection rules.
- Required approvals.
- Automated security checks.
Problem
Section titled βProblemβSecurity delays software releases.
Review:
- Manual approvals.
- Automated testing.
- Pipeline optimisation.
- Security tooling integration.
Problem
Section titled βProblemβCredentials appear in source code.
Review:
- Secret scanning.
- Git history.
- Developer training.
- Secrets Manager usage.
π« Common Mistakes
Section titled βπ« Common Mistakesββ Treating security as the responsibility of only the security team.
β Performing security testing only before production.
β Skipping code reviews.
β Ignoring dependency vulnerabilities.
β Hardcoding credentials.
β Manual deployments.
β Not monitoring deployed applications.
π§ͺ DIY Challenge
Section titled βπ§ͺ DIY ChallengeβCloudNova is launching a new cloud-native banking platform.
Design a secure DevSecOps workflow that includes:
- Secure SDLC.
- CI/CD Pipeline.
- Security Gates.
- Code Reviews.
- Secret Management.
- Automated Security Testing.
- Deployment Approvals.
- Continuous Monitoring.
Prepare:
- DevSecOps Architecture
- Secure SDLC Diagram
- Pipeline Workflow
- Team Responsibility Matrix
- Security Control Checklist
π Knowledge Check
Section titled βπ Knowledge Checkβ- What is DevSecOps?
- How does DevSecOps differ from traditional DevOps?
- What is the Secure SDLC?
- What is Shift Left Security?
- Why is Continuous Integration important?
- Why should security be automated?
- What are security gates?
- Why is shared responsibility important?
- Which AWS services support DevSecOps?
- Why should security be integrated into every stage of software development?
π‘ Key Takeaways
Section titled βπ‘ Key TakeawaysβAfter completing this lesson, you should understand:
- DevSecOps integrates security into every stage of the Software Development Lifecycle rather than treating it as a final review.
- Shift Left Security enables organisations to identify and fix vulnerabilities earlier, reducing cost and improving software quality.
- Secure CI/CD pipelines rely on automated security gates such as code reviews, secret detection, dependency scanning and infrastructure validation.
- DevSecOps is built on collaboration between developers, operations, cloud engineers and security teams, with shared ownership of application security.
- Modern cloud organisations use automation, continuous monitoring and continuous improvement to deliver software rapidly without compromising security.
π Next Lesson
Section titled βπ Next Lessonββ‘οΈ Lesson 02 β Secure Infrastructure as Code (IaC)