Skip to content

Interview question · Security Foundations & Threat Modeling

Walk me through threat modeling with data-flow diagrams and STRIDE. When do you do it, and what do you produce?

Reciting the six letters earns little. What scores is a diagram drawn aloud, one boundary walked in depth, and a list of threats with owners.

easyEssentialNewPreparation tags: Amazon, Microsoft, MetaUpdated Nov 2026

TL;DR: Answer four questions: what are we building, what can go wrong, what will we do about it, did we do it well. Draw a data-flow diagram with external entities, processes, stores, flows and trust boundaries; walk the boundary-crossing flows and each element through STRIDE (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege); and produce a short list of specific threats, each with a decision, an owner and a test. Do it at design time and again whenever a trust boundary changes.

How to approach it

Show the process rather than define it. Pick a small system the interviewer will recognise, such as a file-sharing service, and narrate the four questions as you go. Ask one clarifying question about scope ("the upload path, or the whole product?") so the walk-through stays deep rather than wide.

A strong answer

FIG · THREAT MODELLING WITH A DFD AND STRIDE · FOUR QUESTIONS
Walk every flow that crosses a trust boundary

What are we building?

DFD, trust boundaries

What can go wrong?

STRIDE per element

What will we do?

mitigations, owners

Did we do it well?

review, tests

STRIDE

One threat class per letter

SpoofingTamperingRepudiationInfo disclosureDoSElevation

1. What are we building? Draw the data-flow diagram. External entities (users, partner APIs, the email provider), processes (the upload API, a thumbnail worker), data stores (the file store, the metadata database) and data flows between them. Then draw trust boundaries: internet to service, service to third party, and any internal line where components are trusted differently, such as the worker that parses untrusted files.

2. What can go wrong? Walk STRIDE, starting with flows that cross boundaries. For the upload flow:

ThreatConcrete versionMitigation
SpoofingUploading as another user with a stolen or forged sessionAuthenticated sessions, short-lived tokens
TamperingChanging a file's owner field in the requestOwner set server-side from the session, never from input
RepudiationA user denies uploading illegal contentAudit log tying upload, account and source
Information disclosureFetching /files/{id} for someone else's fileOwnership check on every read
Denial of serviceUploading huge or many filesSize limits, per-user quotas
Elevation of privilegeA crafted image exploits the thumbnail parserParser runs in a sandbox with no credentials or network

STRIDE-per-element keeps it fast: external entities are mainly spoofed, stores are tampered with, disclosed and exhausted, and processes get all six.

3. What are we going to do about it? Every threat gets a decision: mitigate, accept with an owner and a reason, transfer, or remove the feature. Mitigations are specific enough to test: "a request for another user's file returns 403" can become an automated test; "use access control" cannot.

4. Did we do a good job? Check that the diagram matches what was built, that mitigations shipped, and that the tests exist. Reopen the model when a boundary changes, such as adding a model provider or a new integration.

When. At design review, while changes are cheap; before introducing a new trust boundary; and on significant changes. A one-page model kept current is worth more than a long document written once.

What interviewers probe next

  • "How do you threat-model something you did not design?" Interview its owners, trace one real request, and draw the diagram from what is deployed rather than from the design document.
  • "How do you prioritise thirty findings?" By impact on the asset and how reachable the entry point is; fix cheap high-impact items first and accept low ones explicitly.
  • "Now the service summarises uploads with an LLM. What changes?" The file content becomes a writer into the model's context, so every action the summariser can take becomes reachable by whoever uploads a file.

What if?

What if · interview follow-ups

Hold your answer as the constraints change

Your team is building a file-sharing feature: users upload documents, share links, and recipients download them.

  1. Start here

    What four questions structure threat modelling?

How it's scored

Weak: Recites STRIDE's letters without a diagram, or lists generic controls such as "encryption and access control" for every row.

Hire: Draws the diagram, marks trust boundaries, walks one flow through STRIDE with concrete threats and mitigations.

Strong Hire: Produces decisions with owners and tests, explains when to redo the model, and adapts it when the interviewer adds a component.

Common mistakes

  • Skipping trust boundaries, so every box gets the same scrutiny.
  • Listing threats with no decision attached.
  • Treating the threat model as a one-time document.
  • Confusing a vulnerability scan with a threat model.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 10, and we keep track of how far you get in every topic.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in doubles your free answers, from 5 to 10 per topic, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

No comments yet. Share a correction or a different way to answer it.