Threat modeling matters in DevSecOps because it finds design flaws while they are cheap to fix, and scanners cannot see missing controls that were never designed. Ask four questions of each feature: what are we building, what can go wrong, what will we do about it, and did we do enough.
What is threat modeling?
The Threat Modeling Manifesto defines it as analysing representations of a system to highlight concerns about security and privacy characteristics. At the highest level, it says, you ask four key questions: what are we working on, what can go wrong, what are we going to do about it, and did we do a good enough job.
OWASP's threat modeling page covers the same ground with a diagram-first approach. You draw the system, mark trust boundaries, and look for threats at each crossing.
Why can't scanners replace it?
Scanners find implementation flaws in code that exists. A threat model finds problems in the design: an admin function with no second check, a service that trusts any caller on the internal network, a file upload that is stored and later executed. Static analysis cannot flag a control nobody thought to build.
NIST's Secure Software Development Framework (SP 800-218) includes a practice about designing software to meet security requirements and identifying risks during design. Threat modeling is the usual way to do that.
How does it fit a fast pipeline?
The Manifesto's values read like a DevSecOps charter: a culture of finding and fixing design issues over checkbox compliance, people and collaboration over processes and tools, doing threat modeling over talking about it, and continuous refinement over a single delivery. The point is small and frequent, not a quarterly workshop.
A pattern that works: a short model when a feature is designed, a quick update when it changes, and the output captured as tickets in the backlog. The threats become work items with owners, not a document nobody reads.
What does a session look like?
A constructed example, one hour, five people: a feature that lets customers invite teammates by email.
- What are we building? Draw it: browser, API, database, email service. Mark where the user crosses from untrusted to trusted.
- What can go wrong? Go around the diagram. Someone invites themselves to another customer's account by changing an identifier. The invite link never expires. An invited person gets admin rights by default. The email service logs invite tokens.
- What will we do? Check ownership server side on every request. Expire links after a short time and make them single use. Default new members to the lowest role. Mask tokens in logs.
- Did we do enough? Add test cases for each threat to the acceptance criteria and decide whether any risk is accepted, with a name beside it.
Four of those threats took ten minutes to find. Each would have been a production bug.
What prompts help find threats?
Use a checklist so the group does not drift. Common prompts include spoofing identity, tampering with data, repudiation, information disclosure, denial of service and elevation of privilege. For AI features, add the OWASP LLM risks such as prompt injection and excessive agency.
What are the common mistakes?
Modeling the whole company at once. Producing a diagram and no tickets. Only security staff in the room, so developers do not learn. Never updating the model after the design changes.
How to check or apply this
- Pick the next feature with new data flows or new permissions.
- Book one hour with the developer, a tester, and someone who knows security.
- Draw the system on one page and mark trust boundaries.
- List threats, choose responses, and write them as backlog items with owners.
- Turn each response into a test or an automated check where possible.
- Revisit the model when the design changes, and track how many findings came from design versus code scanning.
Policies and gates in your pipeline then check that the controls your model required, such as dependency scanning, are actually running.
Quick check
Does threat modeling need special software?
No. A whiteboard or a shared drawing is enough. Tools can help with larger systems, but the thinking matters more.
How often should we threat model?
When you design a feature or change one in a way that alters data flows, trust boundaries or permissions. Keep each session short.
Sources
- Threat Modeling Manifesto
- OWASP, Threat Modeling
- NIST SP 800-218, Secure Software Development Framework
- OWASP Top 10 for LLM Applications 2025
Last reviewed: 18 October 2026.