Course contentsShow
← Security
Lesson 2033 of 3,05241. Secure Development LifecycleFree lesson

Data Flow Diagrams for Security

Create data flow diagrams that map trust boundaries, data classification, and identify where security controls are needed.

Data Flow Diagrams for Security

What you'll learn: How to create data flow diagrams that reveal security vulnerabilities by mapping trust boundaries, data sensitivity, and control points in your system.

The Core Idea

A Data Flow Diagram (DFD) for security is a visual blueprint that shows how data moves through your application—but with a security lens. Unlike traditional DFDs that simply show data movement, security-focused DFDs highlight where data crosses trust boundaries (like moving from user input to database), what classification level each data element has (public, confidential, PII), and where security controls must exist to protect that data.

Think of it like mapping a supply chain, but instead of tracking packages, you're tracking sensitive information—and marking every checkpoint where security might fail.

Key Elements to Map

Trust Boundaries: Lines that separate different security zones. Examples include:

  • User browser → Web server (untrusted → semi-trusted)
  • Application → Database (authenticated → privileged access)
  • Internal service → Third-party API (your control → external control)

Data Classification: Label each data flow with its sensitivity level:

  • Public information (product catalog)
  • Internal data (employee directory)
  • Confidential (payment details, health records)

Security Control Points: Where you need protections:

  • Input validation before trust boundaries
  • Encryption at rest and in transit
  • Authentication/authorization checks
  • Audit logging for sensitive data access

Why It Matters in SDL

During the design phase, these diagrams reveal attack surface before code is written. You'll spot missing encryption on sensitive flows, identify where authorization checks are needed, and see where data might leak across boundaries.

Key Takeaway: Data flow diagrams for security transform abstract architecture into a concrete map of trust boundaries and data sensitivity, making it obvious where attackers might strike and where your defenses must be strongest.