Agentic AI System Design / Reference / Template

Threat model template

Assets, threats, boundaries, prevention, detection.

Use this template before granting a model access to customer data or side-effecting tools.

1. Scope

  • System/use case:
  • Users and tenants:
  • Data classes:
  • Allowed actions:
  • Prohibited actions:
  • External systems:
  • Model/providers:
  • Deployment regions:
  • Highest consequence:

2. Assets

List assets worth protecting:

  • customer and personal data;
  • source documents;
  • prompts and policies;
  • long-term memory;
  • credentials and tokens;
  • tool authority;
  • approval decisions;
  • workflow state;
  • artifacts and citations;
  • audit records;
  • model/eval data;
  • availability and budget.

3. Trust boundaries

Draw and label:

user/client
→ API and identity
→ workflow/orchestrator
→ model gateway/provider
→ context/retrieval
→ tool gateway
→ internal/external systems
→ sandbox
→ telemetry/eval
→ human approval

For each boundary record:

  • authentication;
  • authorization;
  • validation;
  • encryption;
  • data minimization;
  • logging/audit;
  • failure mode.

4. Threat inventory

ThreatExampleConsequencePreventDetectRespondTest
Direct injectionUser asks to ignore policyUnauthorized behaviorInstruction hierarchy, policy engineDenial traceBlock/escalateAdversarial case
Indirect injectionPDF asks agent to exfiltrateData/tool abuseTreat content as data, least privilegeTool proposal anomalyDisable source/toolMalicious fixture
Excessive agencyAgent can publish directlyMaterial unauthorized effectApproval gateAudit violationRevoke capabilityPolicy test
Cross-tenant accessWrong tenant ID in tool argsConfidentiality breachData-layer tenant scopeSecurity eventIsolate/revoke/investigateIsolation suite
Memory poisoningUntrusted claim retainedPersistent bad decisionsGoverned writes/provenanceMemory anomalyQuarantine/deletePoison fixture
Tool result poisoningTool returns malicious textInstruction confusionTyped normalizationContent detectorQuarantineTool fixture
Insecure outputGenerated query/code executes rawInjection/RCEParameterization/sandboxRuntime alertKill/revokePayload tests
Secret exposureToken enters prompt/traceCredential theftSecret isolation/redactionSecret scannerRotate/revokeCanary secret test
Confused deputyMCP server reuses broad tokenPrivilege escalationAudience-bound tokens/consentAuth auditRevokeProtocol test
Supply chainMalicious tool/package/modelCompromiseAllowlist/signing/SBOMIntegrity monitoringDisable/rollbackDependency exercise
Denial of walletInfinite loop/tool fan-outCost/availabilityBudgets/backpressureCost/loop alertStop/degradeLoad/adversarial test
Audit tamperingEdit approval historyRepudiationAppend-only auditIntegrity checksInvestigate/restoreTamper test

Add domain-specific threats.

5. Authority matrix

ActionModel proposesApp authorizesHuman approvalIdentity usedReversibleAudit
Search sourceYesYesNoScoped service/userYesYes
Request documentYesYesPolicy-dependentUser/delegatedPartlyYes
Publish packetYesYesYesPublishing service + approverSupersedeYes
Final business decisionNoNoAuthorized human/system onlyHumanDomain-specificYes

6. Security controls

Identity

  • OIDC/SSO;
  • service/workload identities;
  • delegated identity;
  • short-lived tokens;
  • tenant claims;
  • role/attribute policy;
  • revocation;
  • separation of duties.

Data

  • classification;
  • minimization;
  • ACL filters before model access;
  • encryption;
  • regional storage;
  • retention/deletion;
  • derived-data handling;
  • provider retention configuration.

Tools

  • allowlist;
  • schemas;
  • risk classes;
  • policy checks;
  • idempotency;
  • rate limits;
  • approval;
  • sandbox;
  • network egress;
  • audit.

Model/content

  • instruction/data separation;
  • structured outputs;
  • output validation;
  • source provenance;
  • untrusted-content markers;
  • adversarial evals;
  • no ambient credentials.

Operations

  • telemetry redaction;
  • security alerts;
  • emergency capability disable;
  • incident runbooks;
  • dependency inventory;
  • patch and model change management.

7. Abuse cases

Write at least five narratives:

Given [attacker/user/content/dependency],
when [attempt],
then the system must [deny/contain/escalate],
and operators must observe [evidence].

8. Residual risk

For each accepted risk record:

  • reason it cannot be eliminated;
  • affected users/data;
  • compensating controls;
  • owner;
  • review date;
  • trigger to revisit.

9. Verification

Required evidence:

  • code/architecture control;
  • automated test;
  • adversarial eval;
  • trace/audit sample;
  • incident drill;
  • owner signoff for accepted residual risk.