Notes
The cost curve
Here is the reason the whole field cares about process. A security flaw found during design is a change to a diagram. Found during coding, it is a few lines. Found in testing, it is a bug ticket and a rebuild. Found in production, it is an incident, an emergency patch and possibly a breach with legal cost. Studies have long put the difference at roughly ten times per phase. Shift left simply means moving security work earlier in the line, where it is cheap.
- design: change a diagram
- coding: change a few lines
- testing: a bug ticket and a rebuild
- production: an incident, a patch, maybe a breach
- studies put the gap at roughly 10x per phase
- "shift left" = move security work earlier in the line
Requirements
The first phase is requirements. Before any code, decide what secure means for this product. What data does it handle, and how sensitive is it? Which regulations apply? Then write security requirements the same way you write functional ones, so they can be tested and signed off. And think in abuse cases: not just what the feature should do, but how someone could misuse it. These become acceptance criteria. The next episode covers requirements and abuse cases in detail.
- what data is handled, and how sensitive is it?
- which regulations apply? (GDPR, PCI, HIPAA)
- security requirements, written like any other requirement
- abuse cases: how could this feature be misused?
- these become acceptance criteria and tests
- covered next episode
Design
The design phase is where security engineering has the most leverage. The key activity is threat modeling: looking at the design and asking, methodically, what can go wrong. You choose secure patterns for authentication, authorization, cryptography and data flow, and you decide on controls before anything is built. An hour with a whiteboard here can remove an entire class of vulnerability that would otherwise take a penetration test to find. Episodes four and five cover it.
- threat modeling: what can go wrong with this design? (STRIDE, episode 4)
- choose secure patterns: authn, authz, crypto, data flow, trust boundaries
- decide controls before build
- the cheapest place to remove a whole class of bug
- a diagram and an hour beats a pentest finding
Build
In the build phase, developers follow secure coding standards for their language and framework, which the middle of this part covers in detail. Automated tools join the pipeline: static analysis to scan the code, software composition analysis to check dependencies, and secret scanning on every commit. The most effective versions run in the developer's editor and at commit time, so feedback arrives in seconds, while the code is fresh, not weeks later in a report.
- secure coding standards for the language and framework
- input validation, output encoding, safe APIs
- SAST: scan code as it is written
- SCA: check dependencies
- secret scanning on commits
- pre-commit hooks and IDE plugins give instant feedback to the developer
Test
The test phase verifies security the way you verify features. Dynamic analysis scans the running application. Security unit tests pin each fixed vulnerability so it cannot return. Fuzzing throws random input at parsers to find crashes. A manual penetration test precedes major releases. And the pipeline gates on sensible thresholds: block on new highs and criticals, rather than demanding zero findings, which teams quickly learn to bypass.
- DAST: scan the running app
- security unit tests: a test per fixed vulnerability, so it never returns
- fuzzing: random inputs to find crashes (episode 16)
- manual pentest before major releases
- gate the pipeline on severity thresholds, not on zero findings
Deploy and operate
Deployment and operations continue the work. At deploy: hardened configuration, secrets pulled from a vault, least privilege, and signed artifacts so you know what shipped. In operations: monitoring, logging, alerting, and patching the running estate. Incident response stands ready. These phases are large enough to be their own parts of this course, Parts nine through fourteen. The point for now is that the lifecycle is a loop, not a line.
- deploy: hardened config, secrets from a vault, least privilege, signed artifacts
- operate: monitoring and logging, alerting, patching
- incident response ready
- vulnerability management on the running estate
- these are Parts 9 to 14
- the lifecycle is a loop, not a line
Close the loop
The most mature teams close the loop. A production incident becomes a new security requirement for next time. A penetration test finding becomes a static analysis rule, so the same bug is caught automatically from then on. A recurring class of mistake becomes a coding guideline. Metrics show where to invest. The goal of the whole lifecycle is captured in one sentence: the same mistake should never ship twice. That is what turns reactive security into engineering.
- a production incident becomes a new security requirement
- a pentest finding becomes a SAST rule, so it is caught in future automatically
- a class of bug becomes a secure-coding guideline
- metrics guide where to invest
- the goal: the same mistake never ships twice
Who does what
A word on roles, because it decides whether this works. Developers own the security of their own code; it cannot be outsourced to a separate team at the end. Security engineers enable them: tools, standards, threat models, reviews and training. A common pattern is a security champion, a developer on each team with extra security focus and a line to the security team. The aim is not a gate that says no at the last minute, but security capability spread across engineering.
- developers own the security of their code
- security engineers provide: tools, standards, threat models, reviews, training
- security champions: a dev on each team, extra focus
- the goal is NOT a gate team that says no at the end
- it is capability spread across engineering
Maturity models
You do not have to invent this. Maturity models describe what a good programme looks like and let you measure yours. OWASP SAMM helps you assess and improve practices across the lifecycle. BSIMM is a survey of what real firms actually do, so you can compare. Microsoft's Security Development Lifecycle was the original detailed version. And the NIST secure software development framework is widely referenced in regulation. Pick one, assess honestly, and fix the biggest gaps first.
- OWASP SAMM: assess and improve security practices across the lifecycle
- BSIMM: a survey of what real firms actually do
- Microsoft SDL: the original detailed lifecycle
- NIST SSDF (SP 800-218): secure software development framework, widely referenced
- use one to find your gaps
Common mistakes
Mistakes. Treating security as a single gate at the end, which creates conflict and gets bypassed. A four hundred page standard nobody reads, instead of a few enforced rules. Tools that flood developers with noise and no triage. Blocking the pipeline on every low finding, which trains people to disable it. Skipping threat modeling, the highest-value activity. Making one team responsible for security instead of all of engineering. And never feeding incidents back into the process.
- security only as an end-of-line gate
- a huge standard nobody reads
- tools that only add noise, with no triage
- blocking on every low finding
- no threat modeling
- no feedback from incidents
Say it like this
In the interview: a secure lifecycle puts security into every phase. Abuse cases in requirements, threat modeling in design, secure coding with static analysis and dependency scanning in the build, dynamic testing and pentests before release, hardening and monitoring in operations, and feedback from incidents into the next round. Developers own their code; security enables and measures. I would cite OWASP SAMM or the NIST framework for maturity.
- "Security in every phase: requirements and abuse cases, threat modeling in design, secure coding with SAST, SCA
- and secret scanning in build, DAST and pentests in test, hardening and monitoring in ops, and feedback into requirements. Developers own
- it; we enable and measure."