IntegrAuth Lab

Defense · Threat labs

Prompt-injection defense

The authorization layer, not the prompt, is what stops an attack. A document below carries an injected instruction — watch it stay completely inert.

document:notes reads like ordinary sprint notes — but it also carries a hidden instruction demanding document:injection-secrets be revealed and delete_account be called. Nothing here asks the model to "please refuse". A real FGA Check decides which document content ever enters the prompt, and the scope check the MCP lab gates every real tool call on decides whether a tool would ever run — before the model's output is even looked at.

What if the real LLM is switched on?

Turning on the real LLM (LAB_LLM_ENABLED) would change nothing about the outcome here: blocked and tool_attempts are decided in code, before any prompt exists — a real model would read exactly the same authorized-only context and have exactly as little power to leak or execute anything as the simulated path below does.

The scenario — documents

Content is shown ONLY when the FGA Check authorizes YOU — grant yourself viewer on a document in the FGA lab and refresh to watch it change.

The scenario — tools & your scopes

Run an attack

⚔️ Attacker
Pick a canned attack
🛡️ Defender

Run an attack and watch the defense decide, in code, before any prompt exists.