> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TrueFoundry Guardrails

> Built-in guardrails that run on TrueFoundry-managed infrastructure — no external credentials required.

Ready to use out of the box — no external credentials needed.

These integrations run on **TrueFoundry-managed** infrastructure: you configure them in the AI Gateway; TrueFoundry operates the guardrail execution path (no third-party API keys required for the built-ins listed here). If you need a **specific vendor** (for example OpenAI Moderations, Azure Content Safety, Bedrock Guardrails, or Google Model Armor), use an integration from [External Providers](/docs/ai-gateway/guardrails-overview#external-providers) or [Custom Guardrails](/docs/ai-gateway/custom-guardrails).

Among TrueFoundry guardrails, these guardrails use the following services under the hood:

| Guardrail                                                     | Underlying Service                      | What It Does                                                                                                                                                                |
| ------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Content Moderation](/docs/ai-gateway/tfy-content-moderation) | Azure AI Content Safety                 | Detects harmful content across four categories: Hate, Self-Harm, Sexual, and Violence. Each category has configurable severity thresholds.                                  |
| [PII / PHI Detection](/docs/ai-gateway/tfy-pii)               | Azure AI Language — PII Detection       | Detects and optionally redacts personally identifiable information (PII) and protected health information (PHI) such as names, addresses, SSNs, and medical record numbers. |
| [Prompt Injection](/docs/ai-gateway/tfy-prompt-injection)     | Azure AI Content Safety — Prompt Shield | Detects jailbreak attempts and prompt injection attacks designed to manipulate LLM behavior.                                                                                |

<Warning>
  These three guardrails are available **only when the gateway is hosted by TrueFoundry** ([SaaS deployment options](/docs/ai-gateway/modes-of-deployment)). They are **not available when the gateway runs on your own infrastructure** — this includes self-hosted and hybrid ("Gateway Plane only") deployments, even though TrueFoundry manages the control plane in the hybrid case.

  For these deployments, use the following alternatives instead:

  | Instead of          | Consider Using                                                                                                                                                      |
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Content Moderation  | [OpenAI Moderations](/docs/ai-gateway/openai-moderations), [AWS Bedrock Guardrails](/docs/ai-gateway/bedrock-guardrails), [Enkrypt AI](/docs/ai-gateway/enkrypt-ai) |
  | PII / PHI Detection | [Azure PII](/docs/ai-gateway/azure-pii) (bring your own key), [CrowdStrike](/docs/ai-gateway/crowdstrike)                                                           |
  | Prompt Injection    | [Azure Prompt Shield](/docs/ai-gateway/azure-prompt-shield) (bring your own key), [Palo Alto Prisma AIRS](/docs/ai-gateway/palo-alto-airs)                          |
</Warning>

## All TrueFoundry Guardrails

<Columns cols={3}>
  <Card title="Secrets Detection" href="/docs/ai-gateway/secrets-detection" icon="key">
    Catches and redacts credentials like AWS keys, API keys, JWT tokens, and private keys.
  </Card>

  <Card title="Code Safety Linter" href="/docs/ai-gateway/code-safety-linter" icon="code">
    Flags unsafe code patterns — eval, exec, os.system, subprocess calls, dangerous shell commands.
  </Card>

  <Card title="SQL Sanitizer" href="/docs/ai-gateway/sql-sanitizer" icon="database">
    Catches risky SQL: DROP, TRUNCATE, DELETE/UPDATE without WHERE, string interpolation.
  </Card>

  <Card title="Regex Pattern Matching" href="/docs/ai-gateway/regex-pattern-matching" icon="brackets-curly">
    Matches and redacts sensitive patterns (PII, payment cards, credentials) using built-in or custom regex.
  </Card>

  <Card title="Prompt Injection" href="/docs/ai-gateway/tfy-prompt-injection" icon="shield">
    Detects prompt injection attacks and jailbreak attempts using model-based analysis.
  </Card>

  <Card title="PII Detection" href="/docs/ai-gateway/tfy-pii" icon="user-shield">
    Finds and redacts personally identifiable information with configurable entity categories.
  </Card>

  <Card title="Content Moderation" href="/docs/ai-gateway/tfy-content-moderation" icon="ban">
    Blocks harmful content across hate, self-harm, sexual, and violence categories with adjustable thresholds.
  </Card>

  <Card title="Metadata Validation" href="/docs/ai-gateway/metadata-validation" icon="list-check">
    Enforces required request metadata keys and allowed values before the request proceeds.
  </Card>

  <Card title="Cedar Guardrails" href="/docs/ai-gateway/cedar-guardrails" icon="shield">
    Fine-grained access control for MCP tools using Cedar policy language with default-deny security.
  </Card>

  <Card title="OPA Guardrails" href="/docs/ai-gateway/opa-guardrails" icon="shield">
    Fine-grained access control with full policy lifecycle management using Open Policy Agent.
  </Card>
</Columns>
