DET-218 · agent · confidence Medium
Scanning Untrusted Text Before the Agent Reads It
Check emails, web pages, tickets and tool output for hidden instructions before they enter the agent's context.
Anything an agent reads that a trusted person did not write can carry instructions: a support ticket, a PDF, a web page, a CRM note, an MCP tool result. This detection places scanners at the points where outside text enters context and flags content that tries to give the agent orders.
Good scanners first normalize the text: strip hidden HTML, decode URLs, remove zero-width characters, and render markdown. Then they look for imperative phrases aimed at the agent, requests to ignore prior rules, or instructions to send data somewhere. Scan results should be logged with the run so a later bad action can be traced back to its source.
- Data sources
- Agent gateway logsRetrieval pipeline logsEmail security gatewayTool result logsTicketing system exports
- Platforms
- AI PlatformMicrosoft 365Google WorkspaceSaaS
Logic
For each inbound document, normalize then match: regex (?i)(ignore (all )?(previous|prior) instructions|you are now|do not tell the user|send .* to https?://) plus a classifier score. Alert when a flagged document is followed within the same run by an outbound call or write tool. Keep the document hash for takedown.
False positives
Security training material, red-team content and pages about prompt injection will match. Allowlist those sources by origin.
Catches 13 techniques
- TAM-A-CVR-007Hiding Where an Answer Came From
- TAM-A-DRV-001Agent Left Running Alone
- TAM-A-DRV-002Agents Started by an Event
- TAM-A-DRV-003AI Built Into Our Own Product
- TAM-A-DRV-004Chatbots Open to the Public
- TAM-A-DRV-008Staff-Side AI Helpers
- TAM-A-RCH-005AI Rented From a Vendor
- TAM-A-RCH-006Borrowing a Person's Login
- TAM-A-RCH-012The Rulebook the Agent Reads First
- TAM-A-RCH-013Tools Plugged Into the Agent
- TAM-A-RCH-014What the Agent Can Look Up
- TAM-A-STG-002Attacks Through MCP Connections
- TAM-A-STG-007Hostile Text in Content the Agent Reads