AI Security & LLM Governance | December 2026 | 8 min read

Threat Modelling Enterprise LLM and RAG Architectures Before Production

How UK security architects apply the OWASP Top 10 for LLM Applications to control indirect prompt injection, RAG permission bypass, Shadow AI exfiltration, and unsafe agentic tool calls.

By Muzammil Sher December 2, 2026 10 min read
Executive Summary
  • RAG Identity Is Usually the Weakest Link: Vector databases routinely flatten SharePoint or Confluence ACLs into global embeddings, exposing M&A or payroll docs to any authenticated employee.
  • Treat Retrieved Text as Untrusted Input: Indirect prompt injection inside retrieved emails, tickets, or PDFs can hijack agentic LLM tool calls unless instruction and data planes stay segregated.
  • Pair Private Endpoints With SIEM Logging: Route Bedrock, Azure OpenAI, and Vertex AI traffic exclusively via private VPC endpoints with zero-data-retention contracts and centralised audit logs.

As engineering and product teams ship Retrieval-Augmented Generation (RAG) assistants, coding copilots, and tool-using AI agents into enterprise workflows, traditional network perimeters provide almost no protection against AI-specific failure paths. Threat modelling generative AI before production requires examining five concrete trust boundaries rather than relying on vague Acceptable Use policy banners.

1. Five Critical Trust Boundaries in Enterprise RAG & Agentic AI

Architecture Layer Primary Threat Scenario Mandatory Engineering Control
1. Document Ingestion & Vector Store Flat indexation strips source SharePoint/Drive ACLs, leaking HR or board data across queries Enforce caller-identity ACL metadata filtering pre-retrieval + DSPM permission remediation prior to launch
2. User & Indirect Prompt Plane Adversarial instructions hidden inside support tickets, PDFs, or web pages override system rules Strict prompt-data structural separation, input/output guardrail classifiers, and minimal context permissions
3. Tool Execution & MCP Agency LLM invokes write APIs, SQL mutations, or external webhooks under tricked instructions Scoped read-only IAM tokens by default + deterministic human confirmation gates on write actions
4. Model Provider API & Network Customer PII/IP sent over public internet to consumer endpoints retained for training PrivateLink / Private Endpoint VPC routing to Bedrock/Azure OpenAI/Vertex with signed Zero Data Retention
5. Observability & SOC Audit Trail Security team has zero attribution linking prompt inputs, retrieved docs, and tool calls during incidents Log user ID, guardrail triggers, and API tool invocations cleanly to SIEM / immutable audit archive

2. Solving the "Pre-Launch Oversharing" Problem

Before deploying Microsoft 365 Copilot or indexing Confluence and Google Drive into a custom vector database, Data Security Posture Management (DSPM) discovery almost always reveals years of broken inheritance links and company-wide `"Everyone except external users"` folders. An LLM does not create a permission vulnerability, it turns hidden oversharing into instant conversational search.

Structured pre-rollout assessments run automated discovery across SharePoint, OneDrive, and S3 buckets, quarantine public/org-wide shares containing regulated PII or financial records, apply Purview or cloud sensitivity labels, and verify conditional access boundaries before pilot users receive licences.

3. Integrating AI Risk Into ISO 27001 & SIEM Monitoring

Enterprise AI security works best inside existing governance loops rather than isolated innovation committees. Register production GenAI applications in your ISMS asset risk register, evaluate external AI SaaS vendors during Third-Party Risk Management (checking model training opt-outs and UK/EU data residency), and feed guardrail block telemetry directly into your SIEM/SOC detection workflows.

4. Controlling Excess Agency in Tool-Calling & MCP Systems

The fastest-growing architectural risk in 2026 GenAI systems is no longer chatbots hallucinating text, it is autonomous agents invoking internal REST APIs, database queries, or MCP server tools. Threat modelling agentic workflows applies four deterministic guardrails:

  • Least-Privilege Caller Impersonation: Tool APIs must execute under the requesting user’s delegated scoped OAuth/OIDC token, never a shared high-privilege service account.
  • Read-Before-Write Segregation: Separate read/search tools from state-mutating operations (`delete`, `transfer`, `grant_access`) behind mandatory human confirmation UI steps.
  • Schema & Allowlist Validation: Validate every argument passed by an LLM against strict JSON schemas, enumerations, and authorised destination domains before executing network or filesystem calls.
  • Immutable Prompt-Tool Correlation Logs: Record user ID, conversation/session reference, invoked tool arguments, and outcome codes into SIEM pipelines so anomalous tool bursts fire SOC alerts.

5. Mapping OWASP Top 10 for LLM Applications to Engineering Controls

Mapping high-likelihood OWASP Top 10 for LLM Applications categories directly to cloud networks, identity protocols, and CI/CD gates ensures controls remain testable rather than purely policy-based:

OWASP LLM Risk Category Real Enterprise Attack Vector Mandatory Technical & CI Control
Prompt Injection (LLM01) Adversarial payload embedded inside retrieved emails, support tickets, or uploaded PDFs overrides system instructions Structural separation of system directives vs untrusted retrieved data + input/output classifier checks + disabled untrusted markdown image rendering
Sensitive Info Disclosure (LLM02) Internal RAG assistant or M365 Copilot retrieves salary, board M&A, or customer PII from over-shared repositories Pre-rollout SharePoint/Drive DSPM clean-up + sensitivity labels + mandatory query-time caller OIDC permission checks inside vector search
Excessive Agency (LLM06) Tool-calling LLM / MCP agent triggers state-mutating DB writes, emails, or cloud IAM modifications under coerced instructions Scoped read-only IAM / OAuth tokens by default + JSON schema validation + deterministic human approval before destructive write actions
Supply Chain & Unbounded Consumption Compromised third-party model weights, insecure packages, or recursive API loops spiking cloud inference bills Vetted private endpoints (Bedrock / Azure OpenAI / Vertex), SBOM & SHA pinning, per-user token/rate limits & cloud budget alerts

6. Pre-Production LLM Architecture Sign-Off Questions

  1. Have underlying SharePoint, Google Drive, or S3 data permissions been cleaned up before RAG or Copilot indexing?
  2. Does vector retrieval re-verify caller document-level ACLs at query time?
  3. Are foundation model endpoints isolated inside private VPC networks with contractual zero-data-retention commitments?
  4. Is red-teaming executed against indirect prompt injection payloads inside retrieved HTML, emails, or uploaded PDFs?
Muzammil Sher Principal Cybersecurity Consultant | United Kingdom, Ireland, Germany & Europe | Google SecOps | Multi-Cloud | vCISO

Need Independent Guidance on This Architecture?

Discuss your current environment, cost model, or regulatory timeline directly with M.Sher under mutual NDA.

Book 30-Min Scoping Call AI Security Consulting & LLM Assessments Cloud Security Architecture