Opening Framing: Shift-Left Security
Modern security programs are preventive, not reactive. Instead of finding vulnerabilities late, Secure SDLC practices detect them as code is written and tested. This reduces risk, cost, and incident response time.
This week focuses on integrating security into CI/CD pipelines using SAST, DAST, and SCA, plus DevSecOps practices that make security repeatable and measurable.
Key insight: The safest vulnerabilities are the ones never released.
Building on Prior Knowledge
This capstone week brings together defensive concepts from across CSY203:
- CSY101 Week 13: Threat modeling principles applied to secure design review and architecture patterns
- CSY203 Weeks 03-10: All vulnerability classes (auth, SQLi, XSS, etc.) that SAST/DAST tools detect
- CSY203 Defensive Sections: Secure coding patterns and architecture from previous weeks
- CSY302 Week 09: IaC security and CI/CD pipeline hardening for cloud deployments
1) Secure SDLC Overview
Security belongs in every phase of development:
Secure SDLC stages:
1. Requirements - define security objectives and abuse cases
2. Design - threat modeling and architecture review
3. Build - secure coding standards + peer review
4. Test - SAST/DAST/SCA automation
5. Release - security gates + monitoring
6. Operate - patching and continuous improvement
Key insight: Continuous security beats one-time assessments.
2) SAST: Static Application Security Testing
SAST analyzes source code without running it to identify insecure patterns and unsafe APIs.
Common SAST tools:
- Semgrep (language-agnostic rules)
- CodeQL (GitHub Advanced Security)
- SonarQube (quality + security)
- Checkmarx (enterprise)
SAST best practices:
- Run on every pull request
- Baseline existing issues
- Fail builds on critical findings
- Track false positives and tune rules
3) DAST: Dynamic Application Security Testing
DAST tests a running application like an attacker would, scanning endpoints and analyzing responses.
Common DAST tools:
- OWASP ZAP (baseline and active scan)
- Burp Suite CI integration
- Nuclei (template-based scans)
DAST considerations:
- Run against staging environments
- Authenticate scans for deeper coverage
- Use allowlists to prevent unsafe actions
- Record baseline findings per release
4) SCA: Software Composition Analysis
SCA identifies vulnerable dependencies, licensing risks, and supply-chain exposure in third-party code.
SCA tools:
- Snyk
- OWASP Dependency-Check
- GitHub Dependabot
- Syft/Grype + SBOMs
SCA best practices:
- Generate SBOMs
- Block builds on critical CVEs
- Pin and update dependencies regularly
- Monitor dependency confusion risks
5) CI/CD Security Gates
Security gates ensure risky code never ships:
Security gates:
- Secrets scanning (pre-commit + CI)
- SAST/DAST/SCA thresholds
- Approval workflow for high-risk changes
- Audit logs and release provenance
Key insight: Security gates are enforceable policy, not optional guidance.
Real-World Context: SolarWinds 2020
SolarWinds attackers compromised the build pipeline and injected malicious code into signed updates. Lessons learned: secure build systems, enforce least privilege, monitor pipeline integrity, and validate artifact provenance.
Key insight: CI/CD is a high-value target. Protect the pipeline.
Guided Lab: Secure SDLC Integration
Build a secure CI/CD pipeline with automated security checks.