Security Realities: Threat Modeling for Engineers Who Actually Ship Code
Introduction:
Threat modeling has a reputation problem. In most organisations it is associated with lengthy workshops, complex diagrams, compliance checkboxes, and security teams that engage with engineering only when something has already gone wrong. Engineers who have experienced threat modeling as a bureaucratic exercise are not wrong to be skeptical of it.
But threat modeling at its core is simply the practice of thinking systematically about how a system could be attacked before building it rather than after. Done well and done simply, it is one of the most effective security practices available to engineering teams — not because it catches every vulnerability but because it shifts security thinking to the point in the development process where fixing problems is cheapest.
The version of threat modeling that works for engineers who actually ship code looks nothing like the version that exists in most security frameworks. It is faster, more practical, and integrated into the engineering workflow rather than bolted on as a separate process.
The Goal Is Not to Find Every Vulnerability:
A common misconception about threat modeling is that its purpose is to produce a comprehensive catalogue of every possible attack against a system. This framing makes threat modeling feel impossible — there are always more attack vectors to consider, more edge cases to explore, more sophisticated adversaries to account for.
The practical goal is narrower and more achievable. Threat modeling should identify the threats that matter most for the specific system being built, given its actual risk profile and the realistic capabilities of likely adversaries. A consumer mobile app and a financial trading platform have different threat models. Applying the same level of scrutiny to both wastes engineering time on one and underprotects the other.
Engineering teams that approach threat modeling as a prioritisation exercise — what are the most likely attacks against this system, and which of them would cause the most damage — produce actionable outputs rather than exhaustive catalogues that nobody reads.
Start With What You Are Building, Not With a Framework:
Security frameworks like STRIDE and PASTA provide structured approaches to threat modeling that are valuable in the right contexts. For most engineering teams shipping product features on a regular cadence, starting with a framework introduces overhead that slows adoption without proportionally improving outcomes.
A more practical starting point is three questions that every engineer can answer about the system they are building. What are we building and what data does it handle? Who might want to attack it and what would they gain? What are the most obvious ways an attacker could achieve their goal?
These questions do not require security expertise to answer. They require engineering knowledge of the system being built and a modest amount of adversarial thinking. Most engineers, given permission to think about their system as an attacker would, surface the most significant threats without needing a formal framework to guide them.
Data Flow Diagrams Reveal More Than Architecture Diagrams:
Architecture diagrams show how systems are structured. Data flow diagrams show how data moves through systems — where it enters, where it is stored, where it is processed, and where it leaves. For threat modeling purposes, data flow diagrams are significantly more useful because most attacks target data in transit or at rest rather than system structure.
Drawing a simple data flow diagram for a feature — even a rough sketch on a whiteboard — consistently surfaces trust boundary crossings that are not obvious from an architecture diagram. Every point where data crosses a trust boundary is a potential attack surface. Every place where external data enters the system is a potential injection point. Every storage location is a potential target for unauthorised access.
The diagram does not need to be formal or comprehensive. It needs to be accurate enough to make trust boundaries visible to the engineers who are building the system.
STRIDE Is a Checklist, Not a Process:
For teams that want a structured approach without a full framework, STRIDE provides a useful checklist of threat categories — Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, and Elevation of Privilege. Walking through each category for the system being built ensures that no major threat class is overlooked.
Spoofing asks whether an attacker can impersonate a legitimate user or system. Tampering asks whether data can be modified in transit or at rest without detection. Repudiation asks whether actions can be denied because logging is insufficient. Information disclosure asks whether sensitive data can be accessed by unauthorised parties. Denial of service asks whether an attacker can make the system unavailable. Elevation of privilege asks whether an attacker can gain more access than they should have.
Each category takes minutes to consider rather than hours. The output is a short list of the most relevant threats in each category, ranked by likelihood and impact. This is enough to drive meaningful security decisions without the overhead of a full security review.
Threat Modeling Should Happen During Design, Not After:
The most valuable time to identify a threat is before the system that is vulnerable to it is built. Redesigning an authentication system after it has been integrated into a product is expensive. Noting during design that the authentication approach has a specific weakness and choosing a different approach costs almost nothing.
This means threat modeling needs to happen during the design phase of feature development — not as a separate security review that happens after implementation is complete. A thirty-minute conversation during design planning that asks how this feature could be abused is more valuable than a thorough security review conducted after the code is written and the architecture is fixed.
Teams that integrate threat modeling into their existing design review process — adding a security perspective to conversations that are already happening — achieve adoption without creating new overhead. Teams that treat threat modeling as a separate security activity that happens outside the engineering workflow find that it is consistently deprioritised against delivery pressure.
Document Decisions, Not Just Threats:
The output of a threat modeling exercise should be decisions, not just a list of threats. For each significant threat identified, the team should record what they decided to do about it — mitigate it, accept it, transfer it through insurance or contractual terms, or defer it to a future iteration.
Documenting the decision and its rationale is as important as documenting the threat. A threat that was explicitly accepted because the likelihood is low and the cost of mitigation is high is a defensible decision. A threat that was never considered is not.
This documentation also serves as institutional memory. When a security incident occurs months later, the threat model shows whether the attack vector was considered and what decision was made about it. This is significantly more useful than having no record of the security thinking that went into the system.
Conclusion:
Threat modeling works for engineering teams that ship code when it is treated as a lightweight, integrated practice rather than a heavyweight, compliance-driven process. The goal is not perfection — it is systematic thinking about the most significant risks before they become incidents.
Engineers who spend thirty minutes thinking adversarially about their system during design consistently catch problems that would otherwise surface in production. That thirty minutes, multiplied across a year of feature development, represents a meaningful reduction in security incidents without a meaningful increase in engineering overhead. The version of threat modeling that works is the one that fits into the way engineering teams actually work.
Enjoyed this post?
Stay in the loop
New posts + weekly digest, straight to your inbox.
Create a free account
- Save posts to your vault
- Like posts & build history
- New-post alerts
No comments yet. Be the first to comment!