Plan and write
The software development life cycle (SDLC) is the path every change takes: plan, write code, check, review, release, run. A secure SDLC builds security into each stage, instead of testing for it once at the end.
The team is adding a search by user name. First they write a security requirement: queries must pass user text as a parameter, never paste it into the SQL. A threat model marks the search box as untrusted input.
In a hurry, a developer writes find_user. Line 3 uses an f-string to paste the name straight into the SQL text. That breaks the requirement: a quote in a name changes what the query means. This weakness is called injection.
Checks catch the mistake
Every push runs automatic checks, called continuous integration (CI). A unit test looks up the name O'Brien, and its quote breaks the query. A scanner flags SQL built from strings. Both fail, so the change is blocked.
The fix uses a placeholder. The ? marks where a value goes, and the name travels separately, in a tuple. The database treats it only as data, never as SQL. Python's sqlite3 documentation and OWASP both recommend this.
The developer pushes again, and the same checks rerun. The O'Brien test passes and the scanner finds nothing. The test stays in the suite for good, so the mistake cannot quietly return. That makes it a regression test.
Review, release, respond
A second person reviews the change before it merges. They compare it with the requirement and the threat model, and look for logic flaws that tools miss. Tools and people together catch more than either alone.
The pipeline builds the release, lists every component inside it in a software bill of materials (SBOM), and signs the package. Users can check the signature to confirm the software is genuine and unchanged.
Flaws can still slip through. A researcher reports one through the team's published disclosure policy. The team confirms it, ships a fixed release, tells users, and asks why their process missed it: root cause analysis.
The frameworks
NIST's Secure Software Development Framework (SSDF, SP 800-218) sorts this work into four groups: Prepare the Organization, Protect the Software, Produce Well-Secured Software, and Respond to Vulnerabilities.
Better still, remove whole classes of flaws. CISA's Secure by Design alert urges makers to end SQL injection with parameterized queries everywhere, and SSDF asks teams to hunt for similar flaws before anyone reports them.
What happens
;; step 1/11 · sdlc SDLC the stages every change goes through plan → code → CI checks → review → release → run secure SDLC a security task at every stage, not one test just before release
The figure shows one tidy path. Real teams vary it: CI and review usually run side by side on a pull request, and many checks run before code is ever pushed. Bandit 1.9.4 reports this pattern as B608 (CWE-89) with low confidence. Scanners give hints, not proof, and miss some flaws, which is why tests and human review are still needed.