Lab 23 – DevSecOps Pipeline Integration
Integrate automated security scanning, compliance checks, and policy enforcement into CI/CD pipelines using GitHub Actions or Azure DevOps.
Objective Lab goal
This lab introduces DevSecOps practices by integrating automated security scanning into your CI/CD pipelines. You’ll configure code scanning, dependency checks, container scanning, and compliance validation.
- Outcome 1: CI/CD pipeline created or updated.
- Outcome 2: Automated code‑scanning tools integrated.
- Outcome 3: Dependency and container scanning enabled.
- Outcome 4: Compliance checks added to pipeline.
Lab 23: Integrating automated security scanning and compliance checks into CI/CD pipelines.
Deliverables End‑of‑lab checklist
- DL23.1: CI/CD pipeline configured.
- DL23.2: Code scanning integrated (SAST).
- DL23.3: Dependency scanning enabled (SCA).
- DL23.4: Container scanning configured.
- DL23.5: Compliance checks added and validated.
Lab Steps Step‑by‑step instructions
Step 1 – Create or Update CI/CD Pipeline
~45 minutes- Choose platform:
- GitHub Actions
- Azure DevOps Pipelines
- Create a new pipeline or modify an existing one.
- Add build and test stages.
Step 2 – Integrate Code Scanning (SAST)
~45 minutes- Enable:
- GitHub CodeQL
- or Azure DevOps SAST extensions
- Configure scanning on pull requests and main branch merges.
- Review findings and document results.
Step 3 – Enable Dependency Scanning (SCA)
~45 minutes- Enable:
- Dependabot (GitHub)
- OWASP Dependency‑Check
- Configure alerts for vulnerable libraries.
- Document dependency‑risk findings.
Step 4 – Add Container Scanning
~45 minutes- Use:
- Trivy
- Azure Container Registry scanning
- Scan Docker images during build.
- Fail pipeline on critical vulnerabilities.
Step 5 – Add Compliance & Policy Checks
~30 minutes- Integrate:
- Terraform compliance checks
- Azure Policy validation
- Security baseline checks
- Document compliance results.
Reflection What you should understand now
- Automation: How security scanning fits into CI/CD workflows.
- Shift‑left security: How early detection reduces risk.
- Compliance: How pipelines enforce standards automatically.
With DevSecOps pipelines integrated, you’re ready to automate cloud compliance and auditing in Week 24.