← All Exercises
Map Threats to STRIDE Categories
intermediatejavascript
Background
Threat modeling stalls when every risk is treated as generic. STRIDE categories force the team to ask which property of the system is actually violated.
Problem
Classify each threat statement into a STRIDE category using the dominant signal in the description, and mark anything unrecognized as unclassified.
Input
JSON object: { threats: string[] }Output
JSON array of { description, category } in input orderSample tests
Sample 1
Input: {"threats":["An attacker spoofs a service token","A user escalates to admin","A log entry is deleted after an action"]}Expected: [{"description":"An attacker spoofs a service token","category":"spoofing"},{"description":"A user escalates to admin","category":"elevation-of-privilege"},{"description":"A log entry is deleted after an action","category":"repudiation"}]Sample 2
Input: {"threats":["Traffic floods the login endpoint","An intern reads another tenant report"]}Expected: [{"description":"Traffic floods the login endpoint","category":"denial-of-service"},{"description":"An intern reads another tenant report","category":"information-disclosure"}]Your solution
Learning objective
Classify a threat list with explicit evidence instead of intuition.