Security & Privacy · 3 to 4 hours
Threat-model an agent with private data
Threat-model a multi-tenant assistant that reads private documents, keeps conversation summaries, and sends approved notifications, naming where each control is enforced and what risk remains.
4 h
Used in interview rounds:
AI System Design (Hard)Overview
Threat-model an agent that reads private documents and can perform external actions. A strong answer identifies assets, attacker-controlled inputs, trust boundaries, concrete enforcement points, residual risks, and tests that observe actual data flows and effects.
Study time: 3 to 4 hours
Interview format: System design
By the end you can
- Define the system, the attacker's capabilities, and their objectives so each threat is testable
- Inventory assets and trace private data through every model, tool, cache, memory, and log
- State security invariants and the exact component that enforces each one
- Separate untrusted reading from privileged execution, and bind external sends to approved recipients and payloads
- Handle revocation, deletion, restores, and in-flight work without promising more than the system can guarantee
- Plan security tests and incident response, and state the residual risk after each mitigation
Prerequisites
Helpful background: Comfort with authentication, authorization, and asynchronous job processing helps.
This topic covers technical attack and exposure controls. Responsible AI & Governance covers oversight, impact, and release accountability.
In this guide
- The system and the adversary
- Connect capabilities to objectives
- Inventory assets and data flows
- Define security invariants
- Threat table
- Separate untrusted reading from privileged execution
- Control information leaving the system
- Time-of-check and time-of-use
- Memory, caches, and deletion
- Supply chain and tool descriptions
- Security evaluation plan
- Worked incident: an injected notification
- Incident response and residual risk
Hard questions are part of Premium: the study guide, reference answer, rubric, and exercises unlock with Premium.
Related on CodeSnatch
Lessons, problems, and articles that build the skills this question uses.
System Design
Covers SSRF defenses that check resolved addresses, secrets management, least privilege, and incident runbooks.
System Design
Traces erasure through warehouses, backups, logs, and caches, and adds data classification for an asset inventory.
System Design
Teaches versioned keys and event-driven invalidation, ways to stop cached copies outliving a permission or deletion change.
AI Engineering
Applies this kind of threat model to a coding agent, with sandboxing, scoped credentials, hooks, and audit logs.
AI Engineering
Reviews what a newly installed tool server can do, a concrete case of the connector and supply chain threats here.
Practice the interview question
Answer it in your own words before you look at the reference answer.
