Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Security
Securitymedium

What is threat modeling, and how do you run a lightweight threat model for a feature?

Tags
#threat-modeling#risk#security
Back to categoryPractice quiz

Answer

Threat modeling is a structured way to identify assets, threats, and mitigations by mapping actors, entry points, and trust boundaries. A lightweight model uses a quick data-flow diagram, lists likely threats (e.g., STRIDE), and prioritizes mitigations by risk.

Advanced answer

Deep dive

A lightweight model should be fast enough for every feature and still expose real risks:

  • Define assets: data, money, credentials, availability, reputation.
  • Identify actors and entry points (UI, API, webhooks, integrations).
  • Draw data flows and trust boundaries (browser -> API -> DB, third-party callbacks).
  • Enumerate threats (STRIDE) and rank by impact x likelihood.
  • Pick mitigations and assign owners; track as tasks and revisit.

Examples

A tiny example (payment webhook):

Browser -> API -> DB
               ^
             Webhook (3rd-party)

Threats: spoofed webhook, replay, tampering
Mitigations: HMAC signature, idempotency key, allowlisted IPs

Common pitfalls

  • Treating it as a one-time document instead of a living artifact.
  • Ignoring trust boundaries and third-party integrations.
  • Not ranking threats, so everything becomes "high".

Interview follow-ups

  • How would you prioritize mitigations with a tight deadline?
  • What changes when the feature becomes public?

Related questions

Security
How should passwords be stored securely?
#passwords#hashing#security
Security
Authentication vs authorization — what’s the difference, with examples?
#authn#authz#security
DevOps
What are best practices for secure and small Docker images?
#docker#containers
  • How do you validate that mitigations work?
  • #security
    DevOps
    Configuration vs secrets — how should you manage them in DevOps?
    #secrets#config#security