DEV Community

丁久
丁久

Posted on • Originally published at dingjiu1989-hue.github.io

Secure Software Development Lifecycle

This article was originally published on AI Study Room. For the full version with working code examples and related articles, visit the original post.

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

Secure Software Development Lifecycle

What Is Secure SDLC?

Secure Software Development Lifecycle (Secure SDLC) is the practice of integrating security activities into every phase of the software development process, rather than treating security as a separate phase or an afterthought. The goal is to identify and fix vulnerabilities as early as possible when they are cheapest to remediate.

The Cost of Late Fixes

| Phase Found | Relative Fix Cost | |-------------|-------------------| | Requirements | 1x | | Design | 6x | | Implementation | 15x | | Testing | 40x | | Production | 100x+ |

Finding a vulnerability during requirements costs virtually nothing to fix. Finding the same vulnerability after deployment can cost millions in incident response, legal fees, and reputational damage.

Phase 1: Requirements and Planning

Security Requirements Gathering

Security Requirements Template

Feature: User Authentication

Security Requirements:

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\- [SR-001] Passwords must be hashed with Argon2id

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\- [SR-002] Rate limit login attempts to 5 per 15 minutes

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\- [SR-003] MFA must be available for all accounts

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\- [SR-004] Session tokens must expire after 15 minutes

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\- [SR-005] Failed login attempts must be logged to SIEM

Abuse Case Development

Document how attackers might abuse a feature:

| Use Case | Abuse Case | |----------|------------| | User resets password | Attacker triggers unlimited reset emails | | File upload avatar | Attacker uploads executable masquerading as image | | Search functionality | Attacker injects SQL via search query |

Phase 2: Design

Threat Modeling with STRIDE


Read the full article on AI Study Room for complete code examples, comparison tables, and related resources.

Found this useful? Check out more developer guides and tool comparisons on AI Study Room.

Top comments (0)