The secure software development lifecycle: building security into every step instead of waiting until the end

  1. Introduction
  2. Phase 1: security requirements
  3. Phase 2: design and threat modeling
  4. Phase 3: coding and code review
  5. Phase 4: testing, including penetration testing
  6. Phase 5: acceptance before release
  7. Phase 6: operations and response
  8. Where to start
  9. Summary
  10. References

Introduction

Many teams treat security as a "checkpoint" at the end of a project: finish the feature, then ask someone to hunt for bugs before release day. This usually gets expensive.

A design flaw found late forces a rework of the whole processing flow, and with the deadline close, people tend to accept "temporary" risk.

The idea behind a secure software development lifecycle (SSDLC) is simple: put a few small security tasks into each familiar phase of the project.

This article walks through each phase in plain language, with generic examples that are not tied to anyone's own systems.

Two public documents are worth reading as a frame of reference:

You do not need to adopt everything. Choosing a few practices that fit your team size and doing them consistently works far better than a huge process nobody follows.

Phase 1: security requirements

When you write functional requirements, write the non-functional security requirements too. Some useful questions:

OWASP ASVS (Application Security Verification Standard) is a checklist split into three levels (1, 2, 3) of increasing strictness.

A team can choose one level as its target and use its items as verifiable requirements, instead of writing a vague "the system must be secure".

Phase 2: design and threat modeling

Threat modeling sounds heavy, but a light version needs only a short meeting and a data flow diagram:

  1. Draw the components: users, the application, the database, external services.

  2. Draw the trust boundaries, the places where data moves from a less trusted zone (browser, internet) into a more trusted one (internal servers).

  1. For each flow that crosses a boundary, ask the questions suggested by STRIDE: Spoofing identity, Tampering with data, Repudiation, Information disclosure, Denial of service, Elevation of privilege.

  1. Record the risks and the decision for each: mitigate, accept, transfer or drop the feature.

Example: an API that lets users upload files. STRIDE quickly leads to questions like "are the file type and size checked?", "who may upload?", "where is the file stored and can it be executed?".

These questions are cheap at design time and expensive after an incident.

Phase 3: coding and code review

During coding, three habits bring the most benefit:

Human review catches logic and design flaws that tools do not understand; tools do not get tired and do not miss repeated patterns. The two complement each other.

Phase 4: testing, including penetration testing

Beyond normal unit and integration tests, a project can add:

One important note: only run penetration tests on your own systems or systems you are explicitly allowed to test, and preferably in a test environment or at pre-announced times so live service is not disrupted.

Test results should be recorded as a list of findings with severity, an owner and a deadline.

Phase 5: acceptance before release

Acceptance is the moment to answer "is it safe enough to release?" with evidence, not gut feeling. A compact checklist may include:

Item

Requirements

Question

Are the chosen security requirements met?

Item

Risks

Question

Have high risks from the threat model been handled or accepted in writing?

Item

Defects

Question

Are serious findings from scans and the penetration test closed?

Item

Secrets

Question

Do the code and configuration contain keys or passwords? (see Secrets in code repositories and CI/CD: never commit keys, scan for leaks and rotate on exposure)

Item

Operations

Question

Are there enough logs to investigate, and a way to roll back?

A decision to "accept the risk" should carry a name and a review deadline, because a risk that is ignored without an owner gets forgotten.

Phase 6: operations and response

Software does not stop needing security at release.

SSDF devotes a whole set to responding to vulnerabilities: having a channel to receive vulnerability reports, a process to assess and patch, and lessons learned so the same kind of flaw does not recur.

For a small team this may be just a clear security contact address, one responsible person and a post-incident note template.

Where to start

Do not try to do everything in one quarter. A practical path:

  1. Add a "security" section to the requirements template and the code review template.

  2. Turn on automated scanning (SAST, SCA, secret scanning) in CI, at first warning only, not blocking.

  3. Hold a light threat modeling session for the next important feature.

  1. Schedule penetration testing periodically or before major releases.

  2. After a few months, use OWASP SAMM to see how far you have come.

Summary

Secure development is not a tool but a habit of spreading security work across the whole lifecycle.

Clear requirements, light threat modeling, code review with a checklist, automated scanning, scoped penetration testing and evidence-based acceptance: each link is small, but together they significantly reduce the number of flaws that reach users.

References

The secure software development lifecycle: building security into every step instead of waiting until the end