Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 38 ยท Secure Development Lifecycle

The Secure Development Lifecycle

Build security into every stage of software delivery: requirements, design, coding, testing, release and operations, with shift-left practice and maturity models.

Security added at the end is expensive, partial and often skipped when a deadline arrives. A Secure Software Development Lifecycle (secure SDLC) places security activities in every phase of building software, so that flaws are prevented early or found when they are cheap to fix. The OWASP Top 10 describes what goes wrong; the lifecycle describes how a team stops it going wrong repeatedly.

You have already met individual controls in this track, such as dependency scanning and log monitoring. This chapter connects them into a process, starting here.

The cost of finding a flaw late

A design mistake found in a requirements review costs a conversation. The same mistake found in production costs an emergency fix, an incident, customer trust and sometimes legal exposure. This is the idea behind shift left: move security checks earlier (to the left on a timeline of plan, design, code, test, release, operate).

Shifting left does not mean doing less at the right. It means adding feedback early and keeping the later safety nets.

Security in every phase

Requirements Abuse cases, data classes.
Design Threat model.
Code Standards and review.
Test SAST, DAST, SCA.

Earlier feedback is cheaper.

1 / 2

Activities by phase

Requirements. Classify the data (public, internal, confidential, regulated). Write security requirements alongside functional ones: "Only the account owner can view an invoice", "Login attempts are rate limited". Think about abuse cases: how would someone misuse this feature? See Security Requirements and Code Review.

Design. Draw the system and its trust boundaries, then run a threat model. Choose secure defaults and proven building blocks (a vetted authentication library, not a homegrown one).

Implementation. Follow a secure coding standard, use framework protections correctly, enable linters, keep secrets out of source control, and require peer review on every change.

Verification. Automated checks in the pipeline plus targeted manual testing: SAST, DAST, SCA and IAST and authorized penetration tests.

Release and deployment. Build from a clean pipeline, sign artifacts, scan images, manage secrets properly and deploy with least privilege.

Operations. Patch, monitor, back up, rotate keys and practice incident response.

DevSecOps

DevSecOps is the culture and tooling that make these activities part of normal delivery rather than a gate run by a separate team. A typical pipeline runs on every pull request:

flowchart LR
    A["Commit"] --> B["Secret scan"]
    B --> C["Lint and SAST"]
    C --> D["Unit tests"]
    D --> E["Dependency scan (SCA)"]
    E --> F["Build and sign"]
    F --> G["Container scan"]
    G --> H["Deploy to staging"]
    H --> I["DAST and smoke tests"]

Each stage can stop the pipeline on a serious finding.

Make the secure path the easy path: one command to run the checks locally, fast feedback (minutes, not days), clear messages that say how to fix a finding.

Maturity models: OWASP SAMM and BSIMM

How do you know whether your process is good? OWASP SAMM (Software Assurance Maturity Model) rates an organization across business functions (governance, design, implementation, verification, operations) on maturity levels, and suggests a roadmap. BSIMM records what real organizations actually do. The OWASP ASVS (Application Security Verification Standard) is a detailed checklist of technical requirements at three levels, useful as the source of test cases.

A small team does not need all of them. Pick a few practices, measure and add more.

Measuring a process with a tiny scorecard

The stand-in below turns a checklist into a score per phase. It is a thinking aid, not an official SAMM calculation.

Python Score your lifecycle coverage

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The most useful output is the missing list, which becomes your next sprint's backlog.

A tiny gating policy

Pipelines need a rule for "when do we block a release?" Without one, scanners either block everything or are ignored.

Python A release gate for findings

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The numbers are examples; choose SLAs your team can meet and review them often. A rule with an owner, a time limit and an exception process is better than a long list nobody reads.

Common mistakes

  • Treating security as a single review at the end.
  • Buying tools without owning the triage; unreviewed findings add noise only.
  • Blocking developers with slow, noisy scans, which pushes them to bypass the process.
  • Skipping operations: no patching, no monitoring, no rehearsed response.
  • Not feeding incidents back into requirements and tests.

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. What does shift left mean?

    Earlier checks find flaws when they are cheaper to fix. Later safety nets still stay in place.
  2. 2. Which pair describes OWASP SAMM and ASVS best?

    SAMM helps assess and plan process maturity, while ASVS provides detailed application requirements and test criteria.
  3. 3. Why should a release gate define SLAs and an exception process?

    Clear thresholds keep the pipeline credible; an exception path with expiry handles real-world constraints.

Summary

  • A secure SDLC puts security activities in every phase: requirements, design, code, test, release and operations.
  • Shift left to find flaws cheaply, and keep monitoring and response on the right.
  • DevSecOps automates checks in the pipeline; SAMM, BSIMM and ASVS help measure and plan.
  • Use scorecards and release gates with owners and deadlines.

Next: Threat Modeling with STRIDE