## Software Development Security
Integrating security throughout the Software Development Life Cycle (SDLC) is paramount for building resilient applications. Security should not be an afterthought but an integral part of every phase, from initial requirements gathering to deployment and maintenance. This proactive approach, often termed "Shift Left", significantly reduces vulnerabilities and remediation costs by addressing security early.
## Secure SDLC Phases
- Requirements: Define security requirements and use cases. Conduct Threat Modeling (e.g., STRIDE, DREAD) to identify potential threats and vulnerabilities early.
- Design: Incorporate security architecture principles. Design for least privilege, defense in depth, and secure defaults. Ensure proper segregation of duties.
- Implementation/Coding: Adhere to Secure Coding Practices. This includes robust input validation, proper output encoding to prevent XSS, secure error handling (avoiding verbose error messages), strong authentication and authorization mechanisms, and secure session management. Avoid common vulnerabilities like SQL Injection, Cross-Site Scripting (XSS), and Broken Authentication.
- Testing: Conduct various security tests. Static Application Security Testing (SAST) analyzes source code without execution. Dynamic Application Security Testing (DAST) tests running applications from the outside. Interactive Application Security Testing (IAST) combines SAST and DAST. Penetration Testing simulates real-world attacks. Code Review (manual or automated) is critical.
- Deployment: Secure configuration of servers, databases, and network components. Implement patch management and vulnerability scanning.
- Maintenance: Continuous monitoring, logging, and incident response. Regular security updates and re-assessments.
## Modern Approaches and Acquisition
DevSecOps integrates security into the continuous integration/continuous delivery (CI/CD) pipeline, automating security checks and fostering collaboration. When acquiring Commercial Off-The-Shelf (COTS) or third-party software, thorough vendor assessment and supply chain security due diligence are essential to understand and mitigate inherent risks. APIs require specific security considerations, including strong authentication, authorization, and rate limiting. Database security involves access controls, encryption, and auditing.
What is "Shift Left" in software development security?
Integrating security activities and considerations earlier in the Software Development Life Cycle (SDLC) to proactively identify and address vulnerabilities.
tap to reveal
Name two common types of application security testing.
Static Application Security Testing (SAST) and Dynamic Application Security Testing (DAST).
tap to reveal
What is the primary purpose of input validation?
To ensure that all user-supplied data conforms to expected formats, types, and ranges, preventing injection attacks and other data manipulation vulnerabilities.
tap to reveal
What is Threat Modeling?
A structured approach to identify potential threats, vulnerabilities, and countermeasures for a system or application during the design phase.
tap to reveal
What is DevSecOps?
An approach that integrates security practices into every phase of the DevOps pipeline, automating security checks and fostering collaboration between development, security, and operations teams.
tap to reveal
Give an example of a secure coding practice for preventing Cross-Site Scripting (XSS).
Output encoding (or escaping) all user-supplied data before displaying it in a web page.
tap to reveal
Why is secure error handling important?
To prevent the disclosure of sensitive system information (e.g., stack traces, database errors) to attackers, which could aid in further exploitation.
tap to reveal
What is the risk associated with using COTS or third-party software?
Inheriting unknown vulnerabilities or backdoors from the vendor, requiring thorough vendor assessment and supply chain security due diligence.
tap to reveal