Skip to main content

Security guardrails

Updated on 16 November 2026.

Detect sensitive data and adversarial input in prompts and responses, then monitor, redact, tokenize or block it. Set the basics per app in the app's settings; use the Policy Engine's Data & Adversarial Risks card when you need rules that depend on who is calling, which model, or which part of the request.

Configure this control​

Choose the mode used by your gateway. When the Policy Engine is on, published rules govern this control; classic values saved through Edit anyway apply only after the engine is disabled. See What happens to classic settings.

Going further with the Policy Engine​

  1. Open Govern > Policy Engine > LLM Gateway > Controls > Data & Adversarial Risks.
  2. Choose a recipe or use the add menu in Detection rules, Language Blocking, or Tag matching traffic.
  3. Set Applies to, the conditions and outcome. Check Reads as, then Save to draft.
  4. Use Test > Try a situation for a matching request and an exception, then Review & publish.

Detection rules​

Select data types, a findings threshold, an action, and whether the rule applies to Request, Response or Both. A whole category or individual types can be selected; app custom detections appear in the Custom group. Scan tool-call arguments checks arguments separately and supports Monitor or Block.

SettingDefault
Data typesNone
Findings thresholdAt least 1
ActionMonitor
StageRequest
Scan tool-call argumentsOff

The highest-priority matching action applies to the request or response; the stricter action wins ties. A higher-priority Monitor or Redact can cancel a lower-priority Block, including a block selected by another data type. Non-blocking redaction is selected per data type. Check the panel's How rules combine explanation before adding an exception, and test requests containing several data types together.

Detection rules do not offer Tokenize yet. To tokenize, set the action in the app's settings (Classic settings) or with the Management API.

Without a rule here, nothing is redacted or blocked. A type is scanned only when a rule needs it, so the absence of a finding does not by itself prove that the type was checked.

Language Blocking​

Choose Only allow certain languages to monitor or block passages outside the languages you select. Languages are unrestricted without a matching rule. Highest priority decides; conflicting values at the same priority fail validation. Streamed responses are skipped.

Tag matching traffic​

Add a severity to matching traffic for investigation and reporting. Severity does not change Monitor, Redact or Block. All matching tag rules contribute, and the highest severity is reported regardless of priority.

Hallucination scoring and source IP restrictions have their own controls: Hallucination protection and Identity and network trust.

Endpoint coverage​

The table below describes the text guardrails. Attachment scanning adds request-file protection on supported conversational surfaces and request-side SDK text/messages checks when enabled and available on the deployment. This includes supported data URLs embedded in text; it does not scan model-generated files. SDK callers should inspect attachment results and coverage, separately from message-text predictions.

SurfaceRequestResponse
Chat completions, including Bedrock Converse, Vertex Gemini and Anthropic models reached through translationYesYes
Native Anthropic MessagesYesYes
OpenAI Responses (including xAI's /xai/v1/responses)YesYes
Bedrock Runtime (boto3)YesYes. converse_stream is request only.
Native Vertex / Gemini generateContentYesYes
Embeddings, text-to-speechInput-
Speech-to-text-Output
Sarvam speech synthesisInput-
Sarvam transcription-Output
Sarvam translation, transliteration, language detectionYesYes
Copilot StudioUser context and tool inputs-
OpenAI Realtime (websocket)Not scannedNot scanned
Endpoint families (moderations, images, OCR, completions, files, batches, videos), including the Mistral and xAI vendor routesNot scannedNot scanned
  • Streaming: request-side checks run as normal. Response-side redaction and blocking apply only when the gateway holds the full response, so streamed chunks pass through unmodified. Tokenize placeholders are still restored in streamed chunks.
  • Copilot Studio cannot accept rewritten tool input, so Redact, Partial redact and Tokenize become Block. See Copilot Studio.
  • Realtime sessions log the handshake, byte counters and usage, but do not run DLP. Use SDK Mode to scan Realtime transcripts out of band.