Secure Development Lifecycle (SDL) Explained
On this page
Why security belongs in every phase of development
A team builds for six months, then a penetration test finds a design flaw in how accounts link to organizations. Fixing it means reworking half the data model, two weeks before launch. Security found at the end is expensive and rushed; found at design time, it's a whiteboard change.
A secure development lifecycle (SDL) puts the right security activity in each phase. Microsoft formalized one in the 2000s; NIST's Secure Software Development Framework (SSDF, SP 800-218) and OWASP SAMM describe current practice.
Security activities in each SDL phase
| Phase | Activity | Catches |
|---|---|---|
| Requirements | Security and privacy requirements (auth, data classification, compliance) | Missing controls before anyone designs |
| Design | Threat modeling (Days 1 and 28), secure design patterns | Flawed flows and trust assumptions |
| Implementation | Secure coding standards, code review, IDE linters | Injection, unsafe APIs, hardcoded secrets |
| Verification | SAST, dependency and secret scanning, DAST, security tests | Known bug patterns and vulnerable components |
| Release | Signed artifacts, hardened config, final review for high-risk changes | Misconfiguration, tampered builds |
| Operations | Logging, monitoring, patching, incident response (Day 27) | Attacks in progress, new vulnerabilities |
SAST, SCA and DAST in the CI pipeline
Most checks belong in the CI pipeline, where they run on every change. A typical layout (see the CI/CD course for a working GitHub Actions version):
stages:
- build
- test
- secret-scan # gitleaks: blocks committed keys (Day 26)
- sast # Semgrep or CodeQL: blocks high-severity findings
- dependency-scan # npm audit, OSV-Scanner: known-vulnerable libraries (Day 23)
- image-scan # Trivy: vulnerable OS packages in containers
- deploy-staging
- dast # OWASP ZAP baseline scan against staging
- deploy-production- SAST (static analysis) reads code for dangerous patterns, such as string-built SQL.
- SCA (software composition analysis) checks dependencies against vulnerability databases.
- DAST (dynamic testing) attacks the running application from outside, finding issues like missing headers and reflected XSS.
A simple way to remember the three: SAST is proofreading the recipe, SCA is checking the ingredients for recalls, and DAST is tasting the finished dish. Each tool finds different things. None of them finds broken access control or business logic flaws reliably; those need threat modeling, review and specific tests.
Keeping a secure development lifecycle practical
- Scale the effort to risk. A login change or a payment flow gets a threat model and a security reviewer; a copy change doesn't.
- Block only on high-confidence, high-severity findings, and route the rest to the backlog. Noisy gates get bypassed.
- Security champions: a developer on each team with extra training, who brings security into everyday reviews (Day 28).
- Write security tests for every fixed vulnerability, so it can't come back.
- Track findings like bugs, with owners and target dates by severity.
Check yourself
At design time it's a change to a diagram and a plan; after implementation it means rewriting code, data models and tests under deadline pressure.
SAST analyzes source code without running it, finding issues early, sometimes with false positives. DAST tests the running application from outside, like an attacker, finding runtime issues such as misconfiguration, but it can't see the code.
Broken access control and business-logic flaws. Whether user A may see invoice 42 depends on business rules a scanner doesn't know, so these need threat modeling, code review and targeted tests.
Software composition analysis inventories your dependencies, including transitive ones, and checks them against vulnerability databases and license rules, flagging known vulnerable versions with the fixed version to upgrade to. Most of your code is dependencies, so this covers a lot of risk.
Tune out noise and false positives, block builds only on high-severity, fixable findings, and route results to the developers who own the code, in the tools they already use. Tools that cry wolf get switched off.