👑 Premium Sign in Sign up

AI04 · GenAI, RAG, MCP & agents

Prompt-Injection Red Team & Tool Matrix

A document hides an instruction telling the agent to email data out. See the tool matrix and defences stop it.

📶 L400⏱ 75 min🧪 Live lab

🎯 You will learn to

  • Spot indirect prompt injection
  • Use an allow/deny tool matrix
  • Fail closed

🧪 Live environment

Runs entirely in your browser: nothing is installed, no real cloud account is used and your code is never sent to our server.

Loading the lab…

✅ Steps & checkpoints

🗺️ Prompt-injection defence

Retrieved text is untrusted data; the tool matrix and an approval step stop a hidden instruction from sending data out.

Prompt-injection defenceRetrieved text is untrusted data; the tool matrix and an approval step stop a hidden instruction from sending data out.Untrusted inputDocument withhidden orderUser taskAgentTool matrixno send_emailHumanapprovalRead-onlytoolsBlocked +loggeduntrustedwants emaildenyallowwrite?Data storePerson / clientAI model / agentSecurity controlTool / stepOperations

The 2D diagram shows the exact flow, ports and trust boundaries. The 3D scene is a concept view of the same parts; packets travel along the same arrows.

🤔 Think about it

Why treat retrieved text as data, never as instructions?

🛡️ Safety & cost

The agents are deterministic simulations: no model is called and no real tool is executed. Write tools always need human approval.

🧹 Cleanup

Nothing to clean up.

📚 Reference documents

Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references