Design a Graph-Based Risk Scoring Engine
Last updated: December 9, 2025
Quick Overview
Design a system that computes dynamic risk scores for cloud resources by analyzing their relationships, exposure levels, and connected vulnerabilities in a security graph.
Wiz
December 9, 202515
11
1,856 solved
Design a system that computes dynamic risk scores for cloud resources by analyzing their relationships, exposure levels, and connected vulnerabilities in a security graph.
Risk scoring at Wiz is fundamentally a graph problem. A public-facing VM with a critical vulnerability is risky, but a public-facing VM with a critical vulnerability that has a network path to a database containing PII data is catastrophically risky. The system must score risk based on the full graph context, not just individual resource attributes.
What the Interviewer Expects
- Model cloud resources and their relationships as a graph with typed edges
- Design a scoring algorithm that considers path-based risk amplification
- Handle incremental score updates when the graph changes
- Address scale: millions of nodes, billions of edges, scores updated in near real-time
- Discuss how to make risk scores explainable to security teams
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How would you handle a graph update that affects risk scores for thousands of downstream resources?
- How do you make the scoring algorithm tunable by customers without re-engineering?
- What graph database would you choose and why?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Functional Requirements:
- Model cloud resources (VMs, databases, etc.) and their relationships (network paths, security groups) as a directed graph with typed edges.
- Compute dynamic...
Capacity Estimation
- Expected Scale:
- Assume 10 million cloud resources (nodes) at Wiz, including VMs, databases, and storage accounts.
- Each resource can have an average of 100 relationships (edges).
...