DevSecOps
Table of Contents
DevSecOps is a software development approach that integrates security practices into the entire development lifecycle. It emphasizes collaboration between development, security, and operations teams to build and deploy secure applications efficiently. The goal is to embed security into the development process from the outset, rather than as an afterthought.
Related: Infrastructure As Code Software Development Life Cycle Application Security Vulnerability Scanning Tools [[Denote query for ‘20260709T193500’]]
Key Concepts
- Shift-Left Security: Incorporating security activities earlier in the development lifecycle — finding a vulnerability at commit time is far cheaper than finding it in production.
- Automation: Automating security testing and checks throughout the pipeline, so security review isn't a manual gate that gets skipped under deadline pressure.
- Collaboration: Fostering cooperation between development, security, and operations teams — security stops being "someone else's job" checked at the end.
- Security as Code: Treating security configurations (firewall rules, IAM policies, scan thresholds) as version-controlled code rather than manual, undocumented settings.
- Continuous Security: Integrating security into CI/CD pipelines so every build is checked, not just periodic audits.
- Threat Modeling: Identifying potential security risks and vulnerabilities early in the development process, before code is written.
Pipeline Integration — Where Each Check Fits
| Stage | Security Activity |
|---|---|
| Commit | Pre-commit hooks: secret scanning, linting |
| Build | SAST (Static Application Security Testing) |
| Dependency | SCA (Software Composition Analysis) — known-vulnerable libraries |
| Test | DAST (Dynamic Application Security Testing) against a running instance |
| Package | Container image scanning |
| Deploy | IaC scanning (Terraform/CloudFormation misconfigurations) |
| Runtime | Runtime protection, continuous monitoring |
SAST vs DAST — The Core Distinction
- SAST analyzes source code without running it — catches issues like hardcoded credentials or SQL string concatenation early, but can't find runtime-only issues (auth bypass logic that only manifests with real request flow) and tends toward false positives on defensive-but-flagged patterns.
- DAST tests a running application from the outside, black-box — catches genuinely exploitable runtime issues (the same classes covered in your PT1 web app notes) but requires a working deployed instance and runs later in the pipeline, so feedback is slower.
Mature pipelines run both — SAST for fast, early, code-level feedback; DAST for confirming actual runtime exploitability.
Applications
- Secure Coding Practices: Enforcing coding standards and best practices to prevent vulnerabilities
- SAST/DAST: Identifying security flaws in code and running applications (see distinction above)
- Infrastructure As Code Security: Ensuring security configurations for infrastructure resources — a misconfigured Terraform module is functionally the same problem as [[Denote query for ‘20260709T193500’]] found during a pentest, just caught earlier
- Container Security: Securing container images and runtime environments
- Secret Management: Protecting sensitive information through secure storage and access control — the pipeline-side answer to hardcoded credentials showing up in [[Denote query for ‘20260709T193500’]] findings
- Compliance Management: Ensuring adherence to security regulations and standards
- Incident Response Integration: Integrating security incident response into the development workflow
Tips
- On the pentest side, a target with visible DevSecOps maturity (dependency scanning badges, security headers consistently applied across all endpoints, no obvious hardcoded secrets) tends to have fewer Security Misconfiguration and Outdated Software findings — recon signal worth noting, not just an internal engineering concept
- The reverse is a useful heuristic too: inconsistent security posture across different parts of an application (one endpoint well-secured, another clearly bolted on later) often indicates gaps in pipeline coverage rather than uniform effort — worth probing the less-polished-looking areas first
- "Shift-left" is about when a check runs, not how thorough it is — a fast, shallow SAST scan at commit time is still valuable even though it will miss things a full manual review would catch; don't treat pipeline automation as a replacement for periodic deeper review