DEV Community

Cover image for Threat Modeling vs SDL vs Code Reviews vs SAST vs DAST vs SCA
Shiva Charan
Shiva Charan

Posted on

Threat Modeling vs SDL vs Code Reviews vs SAST vs DAST vs SCA

(Threat Modeling vs SDL vs Code Reviews vs SAST vs DAST vs SCA)


🧠 1️⃣ Threat Modeling

Think before you build
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ What it is

Threat Modeling is a design-time activity where you identify what can go wrong, how attackers might exploit it, and what to protect.

πŸ” Focus

  • Attack surfaces
  • Entry points
  • Trust boundaries
  • Abuse cases

πŸ•’ When

🟒 Before coding starts
🟒 During architecture & design

πŸ›  Common methods

  • STRIDE
  • Attack trees
  • Data Flow Diagrams (DFD)

🎯 Output

  • Identified threats
  • Mitigation strategies
  • Security requirements

βœ” Prevents bad designs
βœ– Does NOT scan code


πŸ”„ 2️⃣ Security Development Lifecycle (SDL)

Security baked into every phase
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ What it is

SDL is a process framework that integrates security into every phase of software development.

πŸ” Focus

  • People
  • Process
  • Technology

πŸ•’ When

🟒 End-to-end lifecycle

🧩 Typical phases

  1. Requirements
  2. Design
  3. Implementation
  4. Verification
  5. Release
  6. Maintenance

🎯 Output

  • Secure-by-design software
  • Repeatable security practices

βœ” Holistic security
⚠ Not a tool


πŸ‘€ 3️⃣ Code Reviews

Humans review logic, not just syntax
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ What it is

Manual or peer review of source code to catch logic flaws, security mistakes, and bad practices.

πŸ” Focus

  • Authentication logic
  • Authorization checks
  • Error handling
  • Secrets handling

πŸ•’ When

🟒 During pull requests
🟒 Before merge

🎯 Output

  • Cleaner code
  • Early bug detection
  • Knowledge sharing

βœ” Finds logic issues
βœ– Slow and human-dependent


πŸ€– 4️⃣ Static Application Security Testing (SAST)

Scan code without running it
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ What it is

Automated analysis of source code or binaries to find vulnerabilities.

πŸ” Focus

  • SQL Injection
  • XSS
  • Hardcoded secrets
  • Insecure APIs

πŸ•’ When

🟒 During build
🟒 CI pipeline

🎯 Output

  • Vulnerability reports
  • Line-level findings

βœ” Early detection
⚠ False positives


🌐 5️⃣ Dynamic Application Security Testing (DAST)

Hack the running app
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ What it is

Automated testing of a running application from the outside.

πŸ” Focus

  • Runtime behavior
  • Misconfigurations
  • Auth/session issues

πŸ•’ When

🟒 After deployment
🟒 Test / staging / prod

🎯 Output

  • Exploit-based findings
  • Real attack scenarios

βœ” Real-world attacks
βœ– No code visibility


πŸ“¦ 6️⃣ Software Composition Analysis (SCA)

Your code is not the only risk
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ What it is

Scans third-party libraries & dependencies for known vulnerabilities.

πŸ” Focus

  • Open-source components
  • License compliance
  • CVEs

πŸ•’ When

🟒 During build
🟒 Continuously

🎯 Output

  • Vulnerable dependency list
  • Upgrade recommendations

βœ” Protects supply chain
βœ– Doesn’t scan your code logic


🧩 How They Fit Together (Big Picture)

Practice Design Code Build Runtime Dependencies
Threat Modeling βœ… ❌ ❌ ❌ ❌
SDL βœ… βœ… βœ… βœ… βœ…
Code Review ❌ βœ… ❌ ❌ ❌
SAST ❌ βœ… βœ… ❌ ❌
DAST ❌ ❌ ❌ βœ… ❌
SCA ❌ ❌ βœ… ❌ βœ…

🏁 Final Takeaway

πŸ‘‰ No single practice is enough

βœ” Threat Modeling prevents bad designs
βœ” SDL ensures security is continuous
βœ” Code Reviews catch logic flaws
βœ” SAST finds code-level bugs early
βœ” DAST finds runtime vulnerabilities
βœ” SCA secures your supply chain

πŸ’₯ Real DevSecOps uses ALL of them together

Top comments (0)