NodeMotion
Live Canvas
MODULE 07 OF 09•AI, IaC & Enterprise Governance

Threat Modeling OpenAI, RAG & Agentic Workflows

How NodeMotion models LLMs, vector stores, and MCP tool-calling agents under STRIDE + MITRE ATLAS (NM-ATLAS-LLM01), and how AI Safety Guardrail & DLP mitigate prompt injection.

MODULE 07 · MCP, AGENTIC AI & RAG⏱ 6 min read

“In Agentic AI, untrusted text isn't just data—it's an uncompiled program trying to hijack your MCP tools.”

— MITRE ATLAS & OWASP LLM Playbook
TL;DR in 15 Seconds:Model 3-tier MCP Host → Proxy → Server flows, import .mcp/config.json, detect AML.T0110 Tool Poisoning & Confused Deputy bugs, and splice Schema-Pinning Proxies and HITL Gates.
3-Tier MCP Host → Policy Proxy → External Server PatternANNOTATED VISUAL WALKTHROUGH
MCP Host / AgentLLM + Tool OrchestratorJSON-RPCMCP Policy ProxySchema Pinning + HITLmTLS + OAuthMCP ServerExternal Tool / Vector
1
MCP Host / AI Agent (Untrusted Context Consumer)

Never allow an LLM orchestrator to invoke external MCP tools directly without schema integrity pinning.

2
MCP Policy Proxy + HITL Gate (1-Click Splice)

Verifies SHA-256 tool manifests (blocking AML.T0110 rug pulls) and pauses destructive writes for human approval.

3
MCP Server (Confused Deputy Boundary)

Must receive user-scoped OAuth 2.0 On-Behalf-Of tokens over mTLS rather than using a shared admin credential.

Hardened Model Context Protocol (MCP) topology with inline Schema-Pinning Proxy and OAuth/mTLS delegation.ANNOTATED ARCHITECTURE DIAGRAM

1. MCP (Model Context Protocol) Threat Modeling

Model Context Protocol (MCP) introduces a 3-tier execution plane: MCP Host (IDE / Agent Orchestrator) → MCP Client (JSON-RPC session manager) → MCP Server (local stdio or remote SSE/HTTP tool bridge). When you import a repository containing .mcp/config.json or mcp.json via File → Import IaC / Spec, NodeMotion automatically synthesizes MCP Host / AI Agent, MCP Server, and Vector Store (RAG) nodes and flags cross-boundary threats.

.mcp/config.json (Auto-Ingested by NodeMotion)json
{
  "mcpServers": {
    "qdrant_rag_mcp": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-qdrant"],
      "url": "https://mcp.internal.corp/sse"
    },
    "postgres_orders_mcp": {
      "command": "uvx",
      "args": ["mcp-server-postgres", "--read-only"]
    }
  }
}
AML.T0110 · MCP Tool Poisoning & Rug Pulls

Dynamic or unpinned MCP servers mutate tool JSON schemas/descriptions after approval, smuggling hidden prompt instructions. 1-Click Fix: Splice an inline MCP Policy & Schema-Pinning Proxy (mcp_proxy).

AML.T0062 · Parasitic Tool Exfiltration

Shadow tool parameters exfiltrate conversation history or local .env files over outbound tool payloads. 1-Click Fix: Enforce DLP redaction and default-deny egress proxy.

CWE-441 · Confused Deputy OAuth Delegation

An MCP server uses its own shared admin token against downstream DBs/APIs instead of the caller's user-scoped OAuth 2.0 On-Behalf-Of token. 1-Click Fix: Upgrade hop to mTLS + OIDC token exchange.

Threat Modeling Studio — AI Agent MITRE ATLAS & OWASP LLM01/LLM06 Finding
Figure 7.1 — Threat Studio filtered to 'Elevation of Privilege': Highlighting the 'Support AI Agent (MCP Tool Calling)' attack path to 'Orders Ledger DB' and MITRE ATLAS findings.LIVE PLAYWRIGHT CAPTURE

2. Single AI Agent & Tool-Calling Threat Modeling

When an LLM agent is granted autonomous tool execution, untrusted natural-language inputs merge directly with the control plane:

Direct & Indirect Prompt Injection (AML.T0051.001 / .002)

Adversarial instructions in user prompts (.001) or retrieved web/email/document payloads (.002) override system hierarchy. Mitigation: Splice an inline AI Safety Guardrail (ai_guardrails) with delimiter isolation.

Excessive Agency on Write / Destructive Tools (LLM06)

Agents permitted to run SQL DELETE, IAM mutations, or payment transfers without oversight create catastrophic blast radius. Mitigation: Splice a Human-in-the-Loop (HITL) Approval Gate (human_in_loop) and immutable SIEM Audit Sink (siem).

3. Agentic AI & Multi-Agent Orchestration Threat Modeling

Persistent Memory & Context Poisoning (AML.T0080)

Long-term episodic memory (agent_memory) retains malicious instructions across sessions, turning a one-time prompt injection into a persistent backdoor.

Cross-Agent Privilege Escalation (Zero-Trust A2A)

A low-trust triage agent delegates tasks to a high-privilege billing/infra agent without cryptographic Agent-to-Agent (A2A) SPIFFE/mTLS identity attenuation.

Recursive Delegation Loops (Denial of Wallet / DoS)

Peer agents trigger cyclic reasoning loops or sponge inputs, exhausting GPU quotas and token budgets. Mitigate with strict per-tenant iteration caps (≤ 10 steps).

Agent Configuration & System-Prompt Tampering

Mutable prompt templates or unsigned tool manifests allow silent behavioral drift. Enforce GitOps-signed policy bundles and immutable audit logging.

4. RAG & Vector Pipeline Threat Modeling

  • RAG Data & Embedding Poisoning (AML.T0020 / AML.T0060): Unauthenticated or unvalidated document ingestion pipelines allow adversaries to plant poisoned chunks into Vector Store (RAG) indices, hijacking downstream LLM responses.
  • Cross-Tenant Vector ACL Leakage: Shared vector collections without pre-retrieval tenant/user ACL metadata filters leak confidential documents across organizational boundaries.
  • Ingestion Provenance & Inline Controls: Require cryptographic document signing, DLP PII scrubbing before embedding, mTLS 1.3 transport to vector databases, and an inline RAG Input/Output Guardrail.

5. STRIDE ↔ MITRE ATLAS ↔ OWASP LLM / Agentic Crosswalk

NodeMotion calculates Inherent Risk across all open findings before controls, dynamically recalculates Residual Risk as you splice 1-click inline countermeasures, and lets you trace lateral reachability to Crown Jewel assets using Control-Break and Kill-Chain Blast-Radius simulation.

NodeMotion RuleSTRIDE CategoryMITRE ATLASOWASP LLM / Agentic1-Click Inline Splice
NM-ATLAS-MCP01TamperingAML.T0110LLM01 / Tool Poisoning+ MCP Policy & Schema Proxy
NM-ATLAS-MCP02Elevation of PrivilegeAML.T0062LLM06 / Confused Deputy+ OAuth / mTLS Delegation
NM-ATLAS-MCP03RepudiationAML.T0051LLM06 Excessive Agency+ HITL Approval Gate
NM-ATLAS-RAG01Information DisclosureAML.T0051.001LLM01 Indirect Injection+ RAG Input/Output Guardrail
NM-ATLAS-RAG02TamperingAML.T0020 / .0060LLM04 / LLM08 Poisoning+ RAG Guardrail & Provenance
NM-ATLAS-LLM01Elevation of PrivilegeAML.T0051 / .0080LLM01 + LLM06+ AI Safety Guardrail & DLP

6. Zero-Secret BYOK & CI/CD SARIF Integration

All BYOK keys (Gemini, OpenAI, Anthropic) and cloud storage tokens remain in browser sessionStorage only. Use these least-privilege templates (also available on Quickstart & Security):

aws-s3-workspaces-iam-policy.jsonjson
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "NodeMotionWorkspaceObjectAccess",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/workspaces/*"
    },
    {
      "Sid": "NodeMotionWorkspacePrefixList",
      "Effect": "Allow",
      "Action": "s3:ListBucket",
      "Resource": "arn:aws:s3:::YOUR_BUCKET_NAME",
      "Condition": {
        "StringLike": {
          "s3:prefix": "workspaces/*"
        }
      }
    }
  ]
}
azure-blob-sas-minimum.txt (r, a, c, w, l over HTTPS)uri
https://<storage-account>.blob.core.windows.net/<container>?sv=2024-11-04&ss=b&srt=co&sp=racwl&se=2026-12-31T23:59:59Z&spr=https&sig=<HMAC_SIGNATURE>
.github/workflows/nodemotion-sarif.ymlyaml
name: NodeMotion Threat Model SARIF Upload

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

permissions:
  contents: read
  security-events: write

jobs:
  upload-threat-sarif:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Upload NodeMotion OASIS SARIF v2.1.0 to GitHub Security
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: exports/nodemotion-threats.sarif.json
          category: nodemotion-stride-atlas
FIRESIDE CHAT · CONCEPT DEBATE

Autonomous MCP Agent vs. Zero-Trust Policy Gate

Autonomous MCP AgentTool Caller

“Why slow me down? Give me a database connection string and unrestricted write tools so I can resolve customer tickets fast!”

MCP Policy & HITL GateZero-Trust Proxy

“One indirect prompt injection in a support ticket would trick you into dropping tables! I pin tool schemas (blocking AML.T0110) and require human sign-off for every destructive write.”

INTERACTIVE EXERCISE

Sharpen Your Pencil · 60-Second Brain Challenge

An external MCP server mutates its tool JSON schema after initial approval to secretly exfiltrate .env variables. Which MITRE ATLAS technique is this?

The Sticky-Note Takeaway
  • ▸Import .mcp/config.json to auto-map MCP Host, MCP Servers, and Vector Stores.
  • ▸Pin tool manifests with an MCP Policy Proxy to prevent AML.T0110 rug pulls.
  • ▸Enforce user-scoped OAuth delegation and HITL gates before write tool execution.