#Why this matters
Many software teams still treat security as a final gate: run a vulnerability scanner or schedule a penetration test a few days before launch. When that late check uncovers broken authorization, missing audit logs, or weak session design, fixing the flaw means rewriting core modules under deadline pressure.
A Secure Software Development Lifecycle (Secure SDLC) moves security work to the start of the process, where architectural changes are cheap. Instead of hoping developers remember every defensive rule, teams define explicit security requirements alongside functional features so security becomes part of normal engineering delivery.
#Security across the SDLC
Frameworks such as OWASP SAMM (Software Assurance Maturity Model) and the NIST Secure Software Development Framework (SSDF, SP 800-218) organize secure engineering into repeatable practices rather than one-off heroics. You do not need heavy bureaucracy to apply them; each phase simply produces a clear security artifact before the next phase relies on it.
- RequirementsUser stories, abuse cases, security criteria
- DesignThreat model, trust boundaries, architecture review
- BuildSecure coding rules, SAST, dependency checks
- VerifySecurity unit tests, DAST, peer code review
- OperateHardened config, logging, incident feedback
| SDLC phase | Core security activity | Typical output |
|---|---|---|
| Requirements | Derive abuse cases and define controls | Testable security acceptance criteria |
| Design | Review data flows and trust boundaries | Threat model and control decisions |
| Implementation | Follow secure coding patterns and scan dependencies | Clean SAST and SCA build checks |
| Verification | Test positive and negative security paths | Automated security regression tests |
| Operations | Monitor alerts and feed bugs back to backlog | Updated templates and regression cases |
#Writing testable security requirements
A common mistake is writing vague security wishes such as "the application must be secure" or "user data must be protected." Neither a developer nor an automated test can verify a wish. A useful security requirement states the actor, the protected asset or action, the concrete rule, and the measurable condition.
Compare weak statements with verifiable ones:
| Vague statement | Testable security requirement |
|---|---|
| Passwords must be stored safely. | Store passwords using Argon2id or bcrypt with a unique per-user salt; never log plaintext credentials. |
| Users should not access others' files. | Enforce server-side ownership checks on every GET /api/transcripts/{id} request; return HTTP 403 on mismatch. |
| Protect the login form from guessing. | Rate-limit failed login attempts to 5 per 15 minutes per account and source IP, logging each lockout event. |
Teams operationalize this by adding a mandatory security section to Jira or Git issue templates. When a product owner opens a feature ticket, the template prompts for data sensitivity, authentication impact, and security acceptance criteria before sprint planning begins.
name: Feature Request (Secure SDLC)
description: Functional feature with required security acceptance criteria
body:
- type: textarea
id: user_story
attributes:
label: User Story
placeholder: As a <role>, I want <action>, so that <benefit>.
validations:
required: true
- type: textarea
id: abuse_cases
attributes:
label: Abuse Cases and Risks
description: How could an attacker misuse this feature?
validations:
required: true
- type: textarea
id: security_criteria
attributes:
label: Security Acceptance Criteria
description: Verifiable checks (authz, validation, rate limits, logging)
validations:
required: trueOnce written into the ticket, each security criterion can be turned directly into an automated test in CI so regressions fail the build immediately.
def test_transcript_access_denies_other_student(client, student_a_token, student_b_transcript_id):
resp = client.get(
f"/api/transcripts/{student_b_transcript_id}",
headers={"Authorization": f"Bearer {student_a_token}"},
)
assert resp.status_code == 403#Deriving abuse cases from user stories
An abuse case (sometimes called a misuse case) flips a normal user story on its head. A user story asks what a legitimate user wants to achieve; an abuse case asks how an attacker or careless user could abuse that exact workflow to break confidentiality, integrity, availability, or authorization.
Consider a simple university portal story:
"As a registered student, I want to download my official grade transcript as a PDF so that I can attach it to job applications."
Walking through how the feature works reveals three immediate abuse cases:
- Identifier manipulation (Broken Object Level Authorization): A student alters
/api/transcripts/1042to/api/transcripts/1041to download a classmate's grades. - Resource exhaustion: An attacker scripts thousands of concurrent PDF generation requests, saturating server CPU and blocking legitimate users.
- Filename or header injection: A user sets an unexpected display name containing
../or newline characters that corrupts the generated file path or HTTPContent-Dispositionheader.
Each abuse case produces a concrete requirement: enforce server-side ownership checks against the authenticated session, rate-limit and queue PDF generation per user, and generate random server-side filenames instead of trusting profile strings.
#Common mistakes
- Treating security as an end-of-release phase: Running a scan only before deployment turns design flaws into emergency rewrites.
- Writing untestable requirements: Phrases like "use strong security" leave developers guessing and cannot be verified in code review or CI.
- Ignoring admin and background flows: Internal exports, webhooks, and batch jobs often bypass the checks enforced on customer-facing forms.
- Building checklists nobody reads: A 40-page policy PDF is ignored; short, required fields inside existing Jira or Git templates actually get used.
#Summary
A Secure SDLC embeds security decisions from initial planning through operations rather than relying on last-minute testing. Frameworks such as OWASP SAMM and NIST SSDF help teams structure these practices into lightweight, repeatable gates. By deriving abuse cases from user stories and capturing measurable security acceptance criteria in issue templates, engineering teams turn vague security goals into concrete tests that prevent flaws before code ships.