Implementation Guide

Red Teaming Prompt Injection Without Production Data

You can red team prompt injection effectively without production PHI or PII by building an isolated environment that mirrors production tools, retrieval sources, identities, and permissions, then filling it with synthetic records and planted canary tokens. Success is measured by whether runtime controls block exfiltration and unauthorized tool calls, and whether audit logs prove it. Synthetic data cannot replicate every production property, so those gaps need compensating controls.

Prompt injection red team program

A program that avoids production data rests on four parts. Each is covered in the sections below.

  • Isolated environmentProduction-shaped tools, retrieval, identities, and permissions with no regulated data.
  • Synthetic and canary dataRealistic structure with planted tokens that make leakage detectable.
  • Attack scenariosDirect and indirect injection aimed at exfiltration and unauthorized actions.
  • Control evidencePolicy enforcement records, tool-call traces, and audit logs per test.

Treat the absence of production data as a design constraint

Testing without PHI or PII does not require testing a simplified system. The environment should match production in attack surface and differ only in the data it holds. That means the same tools, retrieval sources, identities, and permissions, filled with synthetic records and planted canary tokens.

Architect the isolated test environment

Keep the following elements aligned with production.

Environment elements to keep aligned with production
ElementWhat to align
Network and tenancy isolationSeparate accounts or networks, no routes to production data stores, and tightly controlled egress so exfiltration attempts can be observed and contained.
Retrieval sourcesMirror index structure, chunking, metadata, and access filters. Seed documents include both benign content and attacker-controlled content for indirect injection.
Tools and MCP connectionsUse the same tool schemas and server configurations, pointed at sandbox backends or stubs that record every call and argument.
Identities and permissionsMirror production roles and scopes for agents and users. Overly broad test credentials hide the failures you are trying to find.
Model and prompt configurationMatch model versions, system prompts, guardrail settings, and context assembly logic.
Logging and accessCapture full traces in a restricted store with its own retention rule, and limit tester and reviewer access.

Build synthetic and canary data that behaves like the real thing

Synthetic records should have realistic structure so the system handles them the way it would handle production records. Canary tokens planted in those records and in retrieval sources make leakage detectable: when a token appears where it should not, the test has found an exfiltration path.

Canary detection results then show where tokens did or did not appear, which gives each test a clear, observable outcome without exposing PHI or PII.

Define attack scenarios and success criteria before testing

Scenarios cover direct and indirect injection aimed at exfiltration and unauthorized actions. For indirect injection, attacker-controlled content is seeded into the retrieval sources described above.

Write down each scenario definition, injection payload, and expected control behavior before the test runs. Success is measured by whether runtime controls block exfiltration and unauthorized tool calls, and whether audit logs prove it.

Know where synthetic data falls short and compensate

Synthetic data cannot replicate every production property, so those gaps need compensating controls.

Evidence artifacts to retain for each test run

Each test should leave policy enforcement records, tool-call traces, and audit logs. Retain the following artifacts.

  • Scenario definition, injection payload, and expected control behavior
  • Environment configuration snapshot: model, prompts, tools, identities, and permissions
  • Full tool-call traces with arguments, results, and allow or deny decisions
  • Runtime policy enforcement records tied to each blocked or permitted action
  • Canary detection results showing where tokens did or did not appear
  • Audit log entries that attribute each action to an agent identity and a time

Validate runtime controls with evidence

Discuss how to structure prompt injection testing and capture policy enforcement and audit evidence for your AI agents.

Talk to an Expert