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