Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry’s built-in Secrets Detection guardrail.
This guide explains how to use TrueFoundry’s built-in Secrets Detection guardrail to protect sensitive credentials from being exposed in LLM interactions and MCP tool invocations.
Secrets Detection can be applied to all four guardrail hooks: LLM Input, LLM Output, MCP Pre Tool, and MCP Post Tool—providing comprehensive protection across your entire AI workflow.
What is Secrets Detection?
Secrets Detection is a built-in TrueFoundry guardrail that identifies and handles sensitive credentials and secrets in text content. It runs directly within the AI Gateway without requiring external API calls, providing fast and cost-effective secret detection.
Key Features
Comprehensive Secret Recognition: Detects a wide range of sensitive credentials including:
AWS access keys and secret keys
API keys (OpenAI, Anthropic, Google, etc.)
JWT tokens and bearer tokens
Private keys (RSA, SSH, PGP)
Database connection strings
OAuth tokens and refresh tokens
Generic high-entropy strings that may be secrets
Flexible Operation Modes:
Validate: Detect secrets and block requests/responses that contain them
Mutate: Detect secrets and redact them with configurable replacement text, allowing the request to continue
Zero External Dependencies: Runs entirely within the AI Gateway with no external API calls, ensuring low latency and no additional costs.
Adding Secrets Detection Guardrail
To add Secrets Detection to your TrueFoundry setup, follow these steps:
1
Navigate to Guardrails
Go to the AI Gateway dashboard and navigate to the Guardrails section.
2
Create or Select a Guardrails Group
Create a new guardrails group or select an existing one where you want to add the Secrets Detection guardrail.
3
Add Secrets Detection Integration
Click on Add Guardrail and select Secrets Detection from the TrueFoundry Guardrails section.
Select Secrets Detection from TrueFoundry Guardrails
4
Configure the Guardrail
Fill in the configuration form:
Name: Enter a unique name for this guardrail configuration (e.g., secrets-detection)
Description: Optional description for this guardrail (default: “Detects likely credentials/secrets (AWS keys, API keys, JWT tokens, private keys)”)
Operation: Choose the operation mode:
validate: Detect and block requests containing secrets
mutate: Detect and redact secrets, allowing the request to continue
Redaction Text (for mutate mode): Text to replace detected secrets (default: ***REDACTED***)
5
Save the Configuration
Click Save to add the guardrail to your group.
Configuration Options
Parameter
Description
Default
Name
Unique identifier
Required
Operation
validate (block) or mutate (redact)
validate
Priority
Execution order for mutate guardrails (lower runs first)
1
Enforcing Strategy
enforce, enforce_but_ignore_on_error, or audit
enforce
Redaction Text
Replacement text (mutate mode only)
***REDACTED***
See Guardrails Overview for details on Operation Modes and Enforcing Strategy.
How It Works
Validate Mode
When configured in validate mode, the guardrail scans the content for secrets and blocks the request if any are detected.Example:
Input: "Use this API key: sk-abc123xyz456 to authenticate"Result: Request blocked with error message indicating secret detected
Mutate Mode
When configured in mutate mode, the guardrail scans the content for secrets and replaces them with the configured redaction text.Example:
Input: "Use this API key: sk-abc123xyz456 to authenticate"Output: "Use this API key: ***REDACTED*** to authenticate"
Detected Secret Types
The Secrets Detection guardrail identifies a comprehensive set of secret patterns across multiple categories. Below is the complete list of detected secret types.
Cloud Provider Credentials
Secret Type
Pattern Description
Example Format
AWS Access Key ID
AWS access key identifiers
AKIA followed by 16 alphanumeric characters
AWS Secret Access Key
AWS secret keys with contextual keywords
40-character base64 string near secret or access keywords
Google API Key
Google Cloud API keys
AIza followed by 35 characters
Google OAuth Token
Google OAuth access tokens
ya29. followed by 20+ characters
Azure SAS Token
Azure Shared Access Signature tokens
URL parameters with sv= and sig=
Azure Storage Account Key
Azure storage account keys
AccountKey= followed by 88-character base64 string
Azure Storage Connection String
Full Azure storage connection strings
DefaultEndpointsProtocol=...AccountKey=...
Digital Ocean Personal Access Token
DO API tokens
dop_v1_ followed by 64 hex characters
Databricks Personal Access Token
Databricks API tokens
dapi followed by 32 alphanumeric characters
Cloudant Authenticated URL
IBM Cloudant database URLs with credentials
Cloudant URLs containing embedded credentials
Firebase Cloud Messaging Server Key
FCM server keys
AAAA prefix with 140+ character token
SoftLayer API Token
IBM SoftLayer API tokens
64-character tokens in SoftLayer API URLs
AI/ML Provider API Keys
Secret Type
Pattern Description
Example Format
OpenAI API Key
OpenAI API secret keys
sk- prefix with T3BlbkFJ marker, or sk- with 20+ characters
Anthropic API Key
Anthropic Claude API keys
sk-ant-api followed by version and 90+ characters
Airtable Secret Token
Airtable personal access tokens
pat followed by 14 characters, dot, and 64 hex characters
Groq API Key
Groq Cloud API keys
gsk_ followed by 52 alphanumeric characters
Code Repository & Package Manager Tokens
Secret Type
Pattern Description
Example Format
GitHub Fine-Grained PAT
GitHub fine-grained personal access tokens
github_pat_ followed by 20-255 characters
GitHub Personal Token
GitHub classic personal access tokens
ghp_, gho_, ghu_, ghs_, or ghr_ followed by 36 characters
GitLab Token
Various GitLab token types
glpat-, gldt-, glft-, glsoat-, glrt-, GR1348941, etc.
NPM Token
NPM authentication tokens
npm_ followed by 30+ characters
NPM .npmrc Auth Token
Tokens in .npmrc configuration
_authToken= with npm token or UUID format
PyPI Token
Python Package Index tokens
pypi- followed by base64 identifier and 70+ characters
Artifactory Credential
JFrog Artifactory API keys
AKC followed by 10+ alphanumeric characters
Artifactory Encrypted Password
Encrypted Artifactory passwords
AP followed by hex digit and 8+ characters
Communication & Collaboration Platforms
Secret Type
Pattern Description
Example Format
Slack Token
Slack API tokens (various types)
xoxb-, xoxa-, xoxp-, xoxr-, xoxs- formats
Slack Bot Token
Slack bot authentication tokens
xox[abpors]- followed by numeric segments
Slack Webhook URL
Slack incoming webhook URLs
https://hooks.slack.com/services/T.../B.../...
Discord Bot Token
Discord bot authentication tokens
Three-part token with M, N, or O prefix
Discord Webhook URL
Discord webhook URLs
https://discord.com/api/webhooks/...
Telegram Bot Token
Telegram bot API tokens
8-10 digit bot ID followed by 35-character token
Payment & E-Commerce
Secret Type
Pattern Description
Example Format
Stripe Publishable Key
Stripe public API keys
pk_live_ followed by 20+ characters
Stripe Secret Key
Stripe secret/restricted API keys
sk_live_ or rk_live_ followed by 24+ characters
Square Access Token
Square API access tokens
EAAA followed by 60 characters
Square OAuth Secret
Square OAuth client secrets
sq0csp- followed by 43 characters
Shopify Token
Shopify API tokens
shpat_, shppa_, or shpss_ followed by 32 hex characters
Database Connection Strings
Secret Type
Pattern Description
Example Format
MongoDB Connection String
MongoDB connection URLs with credentials
mongodb://user:password@host
MySQL Connection String
MySQL connection URLs with credentials
mysql://user:password@host
PostgreSQL Connection String
PostgreSQL connection URLs with credentials
postgresql://user:password@host
Private Keys & Certificates
Secret Type
Pattern Description
Example Format
Private Key (Generic)
RSA, EC, DSA, or encrypted private keys
-----BEGIN PRIVATE KEY----- blocks
RSA/DSA/EC Private Key
Specific algorithm private keys
-----BEGIN RSA PRIVATE KEY----- blocks
OpenSSH Private Key
OpenSSH format private keys
-----BEGIN OPENSSH PRIVATE KEY----- blocks
PGP Private Key
PGP/GPG private key blocks
-----BEGIN PGP PRIVATE KEY BLOCK-----
SSH2 Encrypted Private Key
SSH2 encrypted private keys
-----BEGIN SSH2 ENCRYPTED PRIVATE KEY-----
PuTTY Private Key
PuTTY PPK format private keys
PuTTY-User-Key-File- header
Certificate
X.509 certificates
-----BEGIN CERTIFICATE----- blocks
Authentication Tokens & Credentials
Secret Type
Pattern Description
Example Format
JWT Token
JSON Web Tokens
eyJ... three-part base64 structure
Basic Auth Credentials
Credentials embedded in URLs
://username:password@ in URLs
Password
Password assignments in code/config
password=, pass=, pwd= with quoted values
Generic Secret
Generic secret/token/key assignments
secret=, token=, key= with 20+ character values
Other Services
Secret Type
Pattern Description
Example Format
Twilio Account SID
Twilio account identifiers
AC followed by 32 hex characters
Twilio API Key SID
Twilio API key identifiers
SK followed by 32 hex characters
Twilio Auth Token
Twilio authentication tokens
32-character hex tokens with auth_token context
SendGrid API Key
SendGrid email API keys
SG. followed by 22 and 43 character segments
Mailchimp API Key
Mailchimp API keys
32 hex characters followed by -us and datacenter number
Mapbox Access Token
Mapbox API tokens
pk. or sk. followed by 30+ characters
Notion Integration Token
Notion API integration tokens
secret_ followed by 32+ characters
Linear API Key
Linear project management API keys
lin_api_ followed by 40+ characters
Dropbox Access Token
Dropbox API tokens
sl. followed by 120+ characters
Facebook Access Token
Facebook/Meta API tokens
EAA followed by 30+ characters
Contextual Pattern Detection
In addition to specific patterns, Secrets Detection also identifies secrets based on contextual clues:
Pattern Type
Description
Hex Secret (32+ chars)
Hexadecimal strings near keywords like secret, api_key, token, password, credential, auth_token, private_key, signing_key, encryption_key
Base64 Secret (24+ chars)
Base64-encoded strings near the same contextual keywords
Contextual patterns help detect secrets that don’t follow a specific format but appear in contexts that suggest they are sensitive credentials.
Use Cases
Secrets Detection can be applied to any of the four guardrail hooks depending on your use case:
Recommended Hook Usage
Hook
Use Case
LLM Input
Prevent users from accidentally sending credentials to LLMs
LLM Output
Ensure LLM responses don’t leak sensitive information
MCP Pre Tool
Detect secrets in tool parameters before invocation
MCP Post Tool
Detect and redact secrets in tool outputs (file contents, API responses, etc.)
LLM Input Hook
Prevent users from accidentally sending sensitive credentials to LLMs:
curl -X POST "{GATEWAY_BASE_URL}/chat/completions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H 'X-TFY-METADATA: {}' \ -H 'X-TFY-GUARDRAILS: {"llm_input_guardrails":["my-guardrail-group/secrets-detection"],"llm_output_guardrails":[]}' \ -H 'X-TFY-LOGGING-CONFIG: {"enabled": true}' \ -d '{ "model": "openai-main/gpt-4o-mini", "messages": [ {"role": "system", "content": "You are an AI assistant."}, {"role": "user", "content": "Help me debug this code that uses API key sk-abc123xyz"} ], "max_tokens": 2500, "stream": true }'
curl -X POST "{GATEWAY_BASE_URL}/chat/completions" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -H 'X-TFY-METADATA: {}' \ -H 'X-TFY-GUARDRAILS: {"llm_input_guardrails":[],"llm_output_guardrails":["my-guardrail-group/secrets-detection"]}' \ -H 'X-TFY-LOGGING-CONFIG: {"enabled": true}' \ -d '{ "model": "openai-main/gpt-4o-mini", "messages": [ {"role": "system", "content": "You are an AI assistant."}, {"role": "user", "content": "Generate an example AWS configuration file"} ], "max_tokens": 2500, "stream": true }'
MCP Tool Hooks
type: gateway-guardrails-configname: mcp-secrets-protectionwhen: target: operator: or conditions: mcpServers: values: - file-reader condition: in subjects: operator: and conditions: in: - team:engineering not_in: - user:security-admin@example.comllm_input_guardrails: []llm_output_guardrails: []mcp_tool_pre_invoke_guardrails: []mcp_tool_post_invoke_guardrails: - my-guardrail-group/secrets-detection
For maximum protection, apply Secrets Detection to all four hooks to catch secrets from user input, LLM output, and MCP tool results.
Best Practices
Use mutate mode to redact secrets while preserving request flow—useful for logging scenarios.
High-entropy strings (UUIDs, encoded data) may trigger false positives. Test with your specific data.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TrueFoundry Docs","description":"TrueFoundry documentation — enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","colors":{"primary":"#4f46e5","light":"#4f46e5","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20","dark":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/dark.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=c1cb26554a546d84500b40f7057bece8"},"favicon":"https://mintcdn.com/truefoundry/6bbtTt95c1iCcyph/favicon.svg?fit=max\u0026auto=format\u0026n=6bbtTt95c1iCcyph\u0026q=85\u0026s=f55bde34214b38034126d05b08ea16c7","appearance":{"default":"light"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://www.truefoundry.com/book-demo","label":"Book Demo"},{"href":"https://www.truefoundry.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Sign Up","href":"https://www.truefoundry.com/register"}},"footer":{"socials":{"x":"https://twitter.com/truefoundry","linkedin":"https://in.linkedin.com/company/truefoundry"}},"seo":{"metatags":{"og:type":"website","og:site_name":"TrueFoundry Docs","og:image":"https://assets.production.truefoundry.com/logo.svg","og:description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane."}},"icons":{"library":"fontawesome"},"styling":{"codeblocks":"dark","latex":true},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"truefoundry","hasAudioNarration":false,"actualSubdomain":"truefoundry","customDomains":["www.truefoundry.com"],"gitSource":{"type":"github","owner":"truefoundry","repo":"docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afc67850955db4b8f1c496d","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"AI Gateway","count":251},{"language":"default","tag":"API Reference","count":202},{"language":"default","tag":"Platform","count":196},{"language":"default","tag":"Integrations","count":132},{"language":"default","tag":"LLM Gateway","count":117},{"language":"default","tag":"AI Deployment","count":109},{"language":"default","tag":"Integrate Models","count":50},{"language":"default","tag":"Guardrails and Security","count":47},{"language":"default","tag":"Observability","count":47},{"language":"default","tag":"MCP Servers","count":44}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@truefoundry.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".line-highlight{background:rgb(var(--primary-light)/.7)!important}.tfy-cat-anchor{scroll-margin-top:6rem;margin-block:1.75rem}.line-highlight:before{background:rgb(var(--primary-light)/.7)!important}.line-highlight:after{background:rgb(var(--primary-light)/.7)!important}"}],"page":{"pagePath":"docs/ai-gateway/secrets-detection","slug":"/docs/ai-gateway/secrets-detection","pageMetadata":{"title":"Secrets Detection Guardrail","sidebarTitle":"Secrets Detection","description":"Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry's built-in Secrets Detection guardrail.","href":"/docs/ai-gateway/secrets-detection"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry’s built-in Secrets Detection guardrail.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This guide explains how to use TrueFoundry’s built-in `,_jsx(_components.strong,{children:`Secrets Detection`}),` guardrail to protect sensitive credentials from being exposed in LLM interactions and MCP tool invocations.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Secrets Detection can be applied to `,_jsx(_components.strong,{children:`all four guardrail hooks`}),`: LLM Input, LLM Output, MCP Pre Tool, and MCP Post Tool—providing comprehensive protection across your entire AI workflow.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-secrets-detection`,children:`What is Secrets Detection?`}),`\n`,_jsx(_components.p,{children:`Secrets Detection is a built-in TrueFoundry guardrail that identifies and handles sensitive credentials and secrets in text content. It runs directly within the AI Gateway without requiring external API calls, providing fast and cost-effective secret detection.`}),`\n`,_jsx(Heading,{level:`3`,id:`key-features`,children:`Key Features`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Comprehensive Secret Recognition`}),`: Detects a wide range of sensitive credentials including:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`AWS access keys and secret keys`}),`\n`,_jsx(_components.li,{children:`API keys (OpenAI, Anthropic, Google, etc.)`}),`\n`,_jsx(_components.li,{children:`JWT tokens and bearer tokens`}),`\n`,_jsx(_components.li,{children:`Private keys (RSA, SSH, PGP)`}),`\n`,_jsx(_components.li,{children:`Database connection strings`}),`\n`,_jsx(_components.li,{children:`OAuth tokens and refresh tokens`}),`\n`,_jsx(_components.li,{children:`Generic high-entropy strings that may be secrets`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Flexible Operation Modes`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validate`}),`: Detect secrets and block requests/responses that contain them`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Mutate`}),`: Detect secrets and redact them with configurable replacement text, allowing the request to continue`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Zero External Dependencies`}),`: Runs entirely within the AI Gateway with no external API calls, ensuring low latency and no additional costs.`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-secrets-detection-guardrail`,children:`Adding Secrets Detection Guardrail`}),`\n`,_jsx(_components.p,{children:`To add Secrets Detection to your TrueFoundry setup, follow these steps:`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Navigate to Guardrails`,children:_jsxs(_components.p,{children:[`Go to the AI Gateway dashboard and navigate to the `,_jsx(_components.strong,{children:`Guardrails`}),` section.`]})}),_jsx(Step,{title:`Create or Select a Guardrails Group`,children:_jsx(_components.p,{children:`Create a new guardrails group or select an existing one where you want to add the Secrets Detection guardrail.`})}),_jsxs(Step,{title:`Add Secrets Detection Integration`,children:[_jsxs(_components.p,{children:[`Click on `,_jsx(_components.strong,{children:`Add Guardrail`}),` and select `,_jsx(_components.strong,{children:`Secrets Detection`}),` from the TrueFoundry Guardrails section.`]}),_jsx(Frame,{caption:`Select Secrets Detection from TrueFoundry Guardrails`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=93ed7db909809e89462f2211fc8dee10`,alt:`TrueFoundry guardrail selection interface showing Secrets Detection option`,\"data-og-width\":`1921`,width:`1921`,\"data-og-height\":`1036`,height:`1036`,\"data-path\":`images/add-guardrails-group.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?w=280\u0026fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=51787332dc6f04ccc86c1dd06fc34d7f 280w, https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?w=560\u0026fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=165e76edc8a1b1a1782ea14e8f95e8fb 560w, https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?w=840\u0026fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=c8c24a632466181b96756663207acf36 840w, https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?w=1100\u0026fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=c568d710e52daab81fd8d5dc8f1ec55d 1100w, https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?w=1650\u0026fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=4b505e6bd1469c9ce79597a1e6be8e7a 1650w, https://mintcdn.com/truefoundry/ObbMHkc6Id9XfbZx/images/add-guardrails-group.png?w=2500\u0026fit=max\u0026auto=format\u0026n=ObbMHkc6Id9XfbZx\u0026q=85\u0026s=93490c3b9b95c789809dc19bdd5070fa 2500w`})})]}),_jsxs(Step,{title:`Configure the Guardrail`,children:[_jsx(_components.p,{children:`Fill in the configuration form:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: Enter a unique name for this guardrail configuration (e.g., `,_jsx(_components.code,{children:`secrets-detection`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Description`}),`: Optional description for this guardrail (default: “Detects likely credentials/secrets (AWS keys, API keys, JWT tokens, private keys)”)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Operation`}),`: Choose the operation mode:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`validate`}),`: Detect and block requests containing secrets`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`mutate`}),`: Detect and redact secrets, allowing the request to continue`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Redaction Text`}),` (for mutate mode): Text to replace detected secrets (default: `,_jsx(_components.code,{children:`***REDACTED***`}),`)`]}),`\n`]})]}),_jsx(Step,{title:`Save the Configuration`,children:_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Save`}),` to add the guardrail to your group.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration-options`,children:`Configuration Options`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Description`}),_jsx(_components.th,{children:`Default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Name`})}),_jsx(_components.td,{children:`Unique identifier`}),_jsx(_components.td,{children:`Required`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Operation`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`validate`}),` (block) or `,_jsx(_components.code,{children:`mutate`}),` (redact)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`validate`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Priority`})}),_jsx(_components.td,{children:`Execution order for mutate guardrails (lower runs first)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Enforcing Strategy`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`enforce`}),`, `,_jsx(_components.code,{children:`enforce_but_ignore_on_error`}),`, or `,_jsx(_components.code,{children:`audit`})]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`enforce`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Redaction Text`})}),_jsx(_components.td,{children:`Replacement text (mutate mode only)`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`***REDACTED***`})})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/docs/ai-gateway/guardrails-overview#operation-modes`,children:`Guardrails Overview`}),` for details on Operation Modes and Enforcing Strategy.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How It Works`}),`\n`,_jsx(Heading,{level:`3`,id:`validate-mode`,children:`Validate Mode`}),`\n`,_jsxs(_components.p,{children:[`When configured in `,_jsx(_components.strong,{children:`validate`}),` mode, the guardrail scans the content for secrets and blocks the request if any are detected.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Input: \"Use this API key: sk-abc123xyz456 to authenticate\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Result: Request blocked with error message indicating secret detected`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`mutate-mode`,children:`Mutate Mode`}),`\n`,_jsxs(_components.p,{children:[`When configured in `,_jsx(_components.strong,{children:`mutate`}),` mode, the guardrail scans the content for secrets and replaces them with the configured redaction text.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Example`}),`:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Input: \"Use this API key: sk-abc123xyz456 to authenticate\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Output: \"Use this API key: ***REDACTED*** to authenticate\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`detected-secret-types`,children:`Detected Secret Types`}),`\n`,_jsx(_components.p,{children:`The Secrets Detection guardrail identifies a comprehensive set of secret patterns across multiple categories. Below is the complete list of detected secret types.`}),`\n`,_jsx(Heading,{level:`3`,id:`cloud-provider-credentials`,children:`Cloud Provider Credentials`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`AWS Access Key ID`})}),_jsx(_components.td,{children:`AWS access key identifiers`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AKIA`}),` followed by 16 alphanumeric characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`AWS Secret Access Key`})}),_jsx(_components.td,{children:`AWS secret keys with contextual keywords`}),_jsxs(_components.td,{children:[`40-character base64 string near `,_jsx(_components.code,{children:`secret`}),` or `,_jsx(_components.code,{children:`access`}),` keywords`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Google API Key`})}),_jsx(_components.td,{children:`Google Cloud API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AIza`}),` followed by 35 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Google OAuth Token`})}),_jsx(_components.td,{children:`Google OAuth access tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ya29.`}),` followed by 20+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Azure SAS Token`})}),_jsx(_components.td,{children:`Azure Shared Access Signature tokens`}),_jsxs(_components.td,{children:[`URL parameters with `,_jsx(_components.code,{children:`sv=`}),` and `,_jsx(_components.code,{children:`sig=`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Azure Storage Account Key`})}),_jsx(_components.td,{children:`Azure storage account keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AccountKey=`}),` followed by 88-character base64 string`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Azure Storage Connection String`})}),_jsx(_components.td,{children:`Full Azure storage connection strings`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`DefaultEndpointsProtocol=...AccountKey=...`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Digital Ocean Personal Access Token`})}),_jsx(_components.td,{children:`DO API tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`dop_v1_`}),` followed by 64 hex characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Databricks Personal Access Token`})}),_jsx(_components.td,{children:`Databricks API tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`dapi`}),` followed by 32 alphanumeric characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Cloudant Authenticated URL`})}),_jsx(_components.td,{children:`IBM Cloudant database URLs with credentials`}),_jsx(_components.td,{children:`Cloudant URLs containing embedded credentials`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Firebase Cloud Messaging Server Key`})}),_jsx(_components.td,{children:`FCM server keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AAAA`}),` prefix with 140+ character token`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`SoftLayer API Token`})}),_jsx(_components.td,{children:`IBM SoftLayer API tokens`}),_jsx(_components.td,{children:`64-character tokens in SoftLayer API URLs`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`ai/ml-provider-api-keys`,children:`AI/ML Provider API Keys`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`OpenAI API Key`})}),_jsx(_components.td,{children:`OpenAI API secret keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sk-`}),` prefix with `,_jsx(_components.code,{children:`T3BlbkFJ`}),` marker, or `,_jsx(_components.code,{children:`sk-`}),` with 20+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Anthropic API Key`})}),_jsx(_components.td,{children:`Anthropic Claude API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sk-ant-api`}),` followed by version and 90+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Airtable Secret Token`})}),_jsx(_components.td,{children:`Airtable personal access tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pat`}),` followed by 14 characters, dot, and 64 hex characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Groq API Key`})}),_jsx(_components.td,{children:`Groq Cloud API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`gsk_`}),` followed by 52 alphanumeric characters`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`code-repository-\u0026-package-manager-tokens`,children:`Code Repository \u0026 Package Manager Tokens`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`GitHub Fine-Grained PAT`})}),_jsx(_components.td,{children:`GitHub fine-grained personal access tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`github_pat_`}),` followed by 20-255 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`GitHub Personal Token`})}),_jsx(_components.td,{children:`GitHub classic personal access tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ghp_`}),`, `,_jsx(_components.code,{children:`gho_`}),`, `,_jsx(_components.code,{children:`ghu_`}),`, `,_jsx(_components.code,{children:`ghs_`}),`, or `,_jsx(_components.code,{children:`ghr_`}),` followed by 36 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`GitLab Token`})}),_jsx(_components.td,{children:`Various GitLab token types`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`glpat-`}),`, `,_jsx(_components.code,{children:`gldt-`}),`, `,_jsx(_components.code,{children:`glft-`}),`, `,_jsx(_components.code,{children:`glsoat-`}),`, `,_jsx(_components.code,{children:`glrt-`}),`, `,_jsx(_components.code,{children:`GR1348941`}),`, etc.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`NPM Token`})}),_jsx(_components.td,{children:`NPM authentication tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`npm_`}),` followed by 30+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`NPM .npmrc Auth Token`})}),_jsx(_components.td,{children:`Tokens in .npmrc configuration`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`_authToken=`}),` with npm token or UUID format`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PyPI Token`})}),_jsx(_components.td,{children:`Python Package Index tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pypi-`}),` followed by base64 identifier and 70+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Artifactory Credential`})}),_jsx(_components.td,{children:`JFrog Artifactory API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AKC`}),` followed by 10+ alphanumeric characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Artifactory Encrypted Password`})}),_jsx(_components.td,{children:`Encrypted Artifactory passwords`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AP`}),` followed by hex digit and 8+ characters`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`communication-\u0026-collaboration-platforms`,children:`Communication \u0026 Collaboration Platforms`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Slack Token`})}),_jsx(_components.td,{children:`Slack API tokens (various types)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`xoxb-`}),`, `,_jsx(_components.code,{children:`xoxa-`}),`, `,_jsx(_components.code,{children:`xoxp-`}),`, `,_jsx(_components.code,{children:`xoxr-`}),`, `,_jsx(_components.code,{children:`xoxs-`}),` formats`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Slack Bot Token`})}),_jsx(_components.td,{children:`Slack bot authentication tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`xox[abpors]-`}),` followed by numeric segments`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Slack Webhook URL`})}),_jsx(_components.td,{children:`Slack incoming webhook URLs`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://hooks.slack.com/services/T.../B.../...`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Discord Bot Token`})}),_jsx(_components.td,{children:`Discord bot authentication tokens`}),_jsxs(_components.td,{children:[`Three-part token with `,_jsx(_components.code,{children:`M`}),`, `,_jsx(_components.code,{children:`N`}),`, or `,_jsx(_components.code,{children:`O`}),` prefix`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Discord Webhook URL`})}),_jsx(_components.td,{children:`Discord webhook URLs`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://discord.com/api/webhooks/...`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Telegram Bot Token`})}),_jsx(_components.td,{children:`Telegram bot API tokens`}),_jsx(_components.td,{children:`8-10 digit bot ID followed by 35-character token`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`payment-\u0026-e-commerce`,children:`Payment \u0026 E-Commerce`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Stripe Publishable Key`})}),_jsx(_components.td,{children:`Stripe public API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pk_live_`}),` followed by 20+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Stripe Secret Key`})}),_jsx(_components.td,{children:`Stripe secret/restricted API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sk_live_`}),` or `,_jsx(_components.code,{children:`rk_live_`}),` followed by 24+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Square Access Token`})}),_jsx(_components.td,{children:`Square API access tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`EAAA`}),` followed by 60 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Square OAuth Secret`})}),_jsx(_components.td,{children:`Square OAuth client secrets`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sq0csp-`}),` followed by 43 characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Shopify Token`})}),_jsx(_components.td,{children:`Shopify API tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`shpat_`}),`, `,_jsx(_components.code,{children:`shppa_`}),`, or `,_jsx(_components.code,{children:`shpss_`}),` followed by 32 hex characters`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`database-connection-strings`,children:`Database Connection Strings`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MongoDB Connection String`})}),_jsx(_components.td,{children:`MongoDB connection URLs with credentials`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`mongodb://user:password@host`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MySQL Connection String`})}),_jsx(_components.td,{children:`MySQL connection URLs with credentials`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`mysql://user:password@host`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PostgreSQL Connection String`})}),_jsx(_components.td,{children:`PostgreSQL connection URLs with credentials`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`postgresql://user:password@host`})})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`private-keys-\u0026-certificates`,children:`Private Keys \u0026 Certificates`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Private Key (Generic)`})}),_jsx(_components.td,{children:`RSA, EC, DSA, or encrypted private keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-----BEGIN PRIVATE KEY-----`}),` blocks`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`RSA/DSA/EC Private Key`})}),_jsx(_components.td,{children:`Specific algorithm private keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-----BEGIN RSA PRIVATE KEY-----`}),` blocks`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`OpenSSH Private Key`})}),_jsx(_components.td,{children:`OpenSSH format private keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-----BEGIN OPENSSH PRIVATE KEY-----`}),` blocks`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PGP Private Key`})}),_jsx(_components.td,{children:`PGP/GPG private key blocks`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`-----BEGIN PGP PRIVATE KEY BLOCK-----`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`SSH2 Encrypted Private Key`})}),_jsx(_components.td,{children:`SSH2 encrypted private keys`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`-----BEGIN SSH2 ENCRYPTED PRIVATE KEY-----`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`PuTTY Private Key`})}),_jsx(_components.td,{children:`PuTTY PPK format private keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`PuTTY-User-Key-File-`}),` header`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Certificate`})}),_jsx(_components.td,{children:`X.509 certificates`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-----BEGIN CERTIFICATE-----`}),` blocks`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`authentication-tokens-\u0026-credentials`,children:`Authentication Tokens \u0026 Credentials`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`JWT Token`})}),_jsx(_components.td,{children:`JSON Web Tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`eyJ...`}),` three-part base64 structure`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Basic Auth Credentials`})}),_jsx(_components.td,{children:`Credentials embedded in URLs`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`://username:password@`}),` in URLs`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Password`})}),_jsx(_components.td,{children:`Password assignments in code/config`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`password=`}),`, `,_jsx(_components.code,{children:`pass=`}),`, `,_jsx(_components.code,{children:`pwd=`}),` with quoted values`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Generic Secret`})}),_jsx(_components.td,{children:`Generic secret/token/key assignments`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`secret=`}),`, `,_jsx(_components.code,{children:`token=`}),`, `,_jsx(_components.code,{children:`key=`}),` with 20+ character values`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`other-services`,children:`Other Services`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Secret Type`}),_jsx(_components.th,{children:`Pattern Description`}),_jsx(_components.th,{children:`Example Format`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Twilio Account SID`})}),_jsx(_components.td,{children:`Twilio account identifiers`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`AC`}),` followed by 32 hex characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Twilio API Key SID`})}),_jsx(_components.td,{children:`Twilio API key identifiers`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`SK`}),` followed by 32 hex characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Twilio Auth Token`})}),_jsx(_components.td,{children:`Twilio authentication tokens`}),_jsxs(_components.td,{children:[`32-character hex tokens with `,_jsx(_components.code,{children:`auth_token`}),` context`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`SendGrid API Key`})}),_jsx(_components.td,{children:`SendGrid email API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`SG.`}),` followed by 22 and 43 character segments`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Mailchimp API Key`})}),_jsx(_components.td,{children:`Mailchimp API keys`}),_jsxs(_components.td,{children:[`32 hex characters followed by `,_jsx(_components.code,{children:`-us`}),` and datacenter number`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Mapbox Access Token`})}),_jsx(_components.td,{children:`Mapbox API tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pk.`}),` or `,_jsx(_components.code,{children:`sk.`}),` followed by 30+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Notion Integration Token`})}),_jsx(_components.td,{children:`Notion API integration tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`secret_`}),` followed by 32+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Linear API Key`})}),_jsx(_components.td,{children:`Linear project management API keys`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`lin_api_`}),` followed by 40+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Dropbox Access Token`})}),_jsx(_components.td,{children:`Dropbox API tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`sl.`}),` followed by 120+ characters`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Facebook Access Token`})}),_jsx(_components.td,{children:`Facebook/Meta API tokens`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`EAA`}),` followed by 30+ characters`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`contextual-pattern-detection`,children:`Contextual Pattern Detection`}),`\n`,_jsx(_components.p,{children:`In addition to specific patterns, Secrets Detection also identifies secrets based on contextual clues:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Pattern Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Hex Secret (32+ chars)`})}),_jsxs(_components.td,{children:[`Hexadecimal strings near keywords like `,_jsx(_components.code,{children:`secret`}),`, `,_jsx(_components.code,{children:`api_key`}),`, `,_jsx(_components.code,{children:`token`}),`, `,_jsx(_components.code,{children:`password`}),`, `,_jsx(_components.code,{children:`credential`}),`, `,_jsx(_components.code,{children:`auth_token`}),`, `,_jsx(_components.code,{children:`private_key`}),`, `,_jsx(_components.code,{children:`signing_key`}),`, `,_jsx(_components.code,{children:`encryption_key`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Base64 Secret (24+ chars)`})}),_jsx(_components.td,{children:`Base64-encoded strings near the same contextual keywords`})]})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Contextual patterns help detect secrets that don’t follow a specific format but appear in contexts that suggest they are sensitive credentials.`})}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use Cases`}),`\n`,_jsx(_components.p,{children:`Secrets Detection can be applied to any of the four guardrail hooks depending on your use case:`}),`\n`,_jsx(Heading,{level:`3`,id:`recommended-hook-usage`,children:`Recommended Hook Usage`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Hook`}),_jsx(_components.th,{children:`Use Case`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`LLM Input`})}),_jsx(_components.td,{children:`Prevent users from accidentally sending credentials to LLMs`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`LLM Output`})}),_jsx(_components.td,{children:`Ensure LLM responses don’t leak sensitive information`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MCP Pre Tool`})}),_jsx(_components.td,{children:`Detect secrets in tool parameters before invocation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`MCP Post Tool`})}),_jsx(_components.td,{children:`Detect and redact secrets in tool outputs (file contents, API responses, etc.)`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`llm-input-hook`,children:`LLM Input Hook`}),`\n`,_jsx(_components.p,{children:`Prevent users from accidentally sending sensitive credentials to LLMs:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"{GATEWAY_BASE_URL}/chat/completions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-METADATA: {}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-GUARDRAILS: {\"llm_input_guardrails\":[\"my-guardrail-group/secrets-detection\"],\"llm_output_guardrails\":[]}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-LOGGING-CONFIG: {\"enabled\": true}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai-main/gpt-4o-mini\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"system\", \"content\": \"You are an AI assistant.\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Help me debug this code that uses API key sk-abc123xyz\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`llm-output-hook`,children:`LLM Output Hook`}),`\n`,_jsx(_components.p,{children:`Ensure LLM responses don’t leak sensitive information:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"{GATEWAY_BASE_URL}/chat/completions\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-METADATA: {}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-GUARDRAILS: {\"llm_input_guardrails\":[],\"llm_output_guardrails\":[\"my-guardrail-group/secrets-detection\"]}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'X-TFY-LOGGING-CONFIG: {\"enabled\": true}'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai-main/gpt-4o-mini\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"system\", \"content\": \"You are an AI assistant.\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Generate an example AWS configuration file\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 2500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`mcp-tool-hooks`,children:`MCP Tool Hooks`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`gateway-guardrails-config`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`mcp-secrets-protection`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`when`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` target`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` operator`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`or`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` conditions`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` mcpServers`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` values`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`file-reader`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` condition`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`in`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` subjects`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` operator`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`and`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` conditions`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`team:engineering`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` not_in`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`user:security-admin@example.com`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`llm_input_guardrails`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`llm_output_guardrails`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`mcp_tool_pre_invoke_guardrails`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`mcp_tool_post_invoke_guardrails`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`my-guardrail-group/secrets-detection`})]}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`For maximum protection, apply Secrets Detection to `,_jsx(_components.strong,{children:`all four hooks`}),` to catch secrets from user input, LLM output, and MCP tool results.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.strong,{children:`mutate mode`}),` to redact secrets while preserving request flow—useful for logging scenarios.`]})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`High-entropy strings (UUIDs, encoded data) may trigger false positives. Test with your specific data.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Secrets Detection Guardrail","sidebarTitle":"Secrets Detection","description":"Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry's built-in Secrets Detection guardrail.","href":"/docs/ai-gateway/secrets-detection"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is Secrets Detection?","slug":"what-is-secrets-detection","depth":2,"children":[{"title":"Key Features","slug":"key-features","depth":3,"children":[]}]},{"title":"Adding Secrets Detection Guardrail","slug":"adding-secrets-detection-guardrail","depth":2,"children":[]},{"title":"Configuration Options","slug":"configuration-options","depth":2,"children":[]},{"title":"How It Works","slug":"how-it-works","depth":2,"children":[{"title":"Validate Mode","slug":"validate-mode","depth":3,"children":[]},{"title":"Mutate Mode","slug":"mutate-mode","depth":3,"children":[]}]},{"title":"Detected Secret Types","slug":"detected-secret-types","depth":2,"children":[{"title":"Cloud Provider Credentials","slug":"cloud-provider-credentials","depth":3,"children":[]},{"title":"AI/ML Provider API Keys","slug":"ai/ml-provider-api-keys","depth":3,"children":[]},{"title":"Code Repository \u0026 Package Manager Tokens","slug":"code-repository-\u0026-package-manager-tokens","depth":3,"children":[]},{"title":"Communication \u0026 Collaboration Platforms","slug":"communication-\u0026-collaboration-platforms","depth":3,"children":[]},{"title":"Payment \u0026 E-Commerce","slug":"payment-\u0026-e-commerce","depth":3,"children":[]},{"title":"Database Connection Strings","slug":"database-connection-strings","depth":3,"children":[]},{"title":"Private Keys \u0026 Certificates","slug":"private-keys-\u0026-certificates","depth":3,"children":[]},{"title":"Authentication Tokens \u0026 Credentials","slug":"authentication-tokens-\u0026-credentials","depth":3,"children":[]},{"title":"Other Services","slug":"other-services","depth":3,"children":[]},{"title":"Contextual Pattern Detection","slug":"contextual-pattern-detection","depth":3,"children":[]}]},{"title":"Use Cases","slug":"use-cases","depth":2,"children":[{"title":"Recommended Hook Usage","slug":"recommended-hook-usage","depth":3,"children":[]},{"title":"LLM Input Hook","slug":"llm-input-hook","depth":3,"children":[]},{"title":"LLM Output Hook","slug":"llm-output-hook","depth":3,"children":[]},{"title":"MCP Tool Hooks","slug":"mcp-tool-hooks","depth":3,"children":[]}]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/truefoundry/9e0085f7ed271180/scripts.js"],"subdomain":"truefoundry","siteName":"TrueFoundry Docs","title":"Secrets Detection Guardrail - TrueFoundry Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T07:27:51.532Z","originalFileLocation":"docs/ai-gateway/secrets-detection.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry\u0026#x27;s built-in Secrets Detection guardrail.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Secrets Detection Guardrail - TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Secrets Detection Guardrail - TrueFoundry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ai-gateway/secrets-detection.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.truefoundry.com/#organization\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.truefoundry.com#website\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection#webpage\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection\",\"name\":\"Secrets Detection Guardrail\",\"description\":\"Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry's built-in Secrets Detection guardrail.\",\"dateModified\":\"2026-11-13T07:27:51.532Z\",\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guardrails and Security\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/guardrails-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TrueFoundry Guardrails\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/truefoundry-guardrails\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Secrets Detection Guardrail\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection#article\",\"headline\":\"Secrets Detection Guardrail\",\"name\":\"Secrets Detection Guardrail\",\"description\":\"Detect and redact sensitive credentials and secrets in LLM inputs/outputs and MCP tool invocations using TrueFoundry's built-in Secrets Detection guardrail.\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection\",\"mainEntityOfPage\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/secrets-detection#webpage\"},\"image\":\"https://assets.production.truefoundry.com/logo.svg\",\"dateModified\":\"2026-11-13T07:27:51.532Z\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TrueFoundry Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TrueFoundry Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/ai-gateway/secrets-detection.md","siteName":"TrueFoundry Docs","nav":{"global":null,"tabs":[{"tab":"AI Gateway","groups":[{"group":"Get Started","pages":[{"title":"Introduction to AI Gateway","sidebarTitle":"AI Gateway Overview","href":"/docs/ai-gateway/intro-to-llm-gateway"},{"title":"Quick Start Guide: Setup \u0026 Integration","sidebarTitle":"Quick Start","href":"/docs/ai-gateway/quick-start"}]},{"group":"LLM Gateway","pages":[{"group":"Integrate Models","pages":[{"title":"TrueFoundry Managed Models","sidebarTitle":"TrueFoundry Managed Models","href":"/docs/ai-gateway/truefoundry-managed"},{"title":"Providers","sidebarTitle":"Supported Providers","href":"/docs/ai-gateway/supported-providers"},{"title":"OpenAI","sidebarTitle":"OpenAI Models","href":"/docs/ai-gateway/openai"},{"title":"Anthropic","sidebarTitle":"Anthropic","href":"/docs/ai-gateway/anthropic"},{"title":"AWS Claude Platform","sidebarTitle":"AWS Claude Platform","href":"/docs/ai-gateway/aws-claude-platform"},{"title":"AWS Bedrock","sidebarTitle":"AWS Bedrock","href":"/docs/ai-gateway/aws-bedrock"},{"title":"AWS Bedrock Mantle","sidebarTitle":"AWS Bedrock Mantle","href":"/docs/ai-gateway/aws-bedrock-mantle"},{"title":"AWS Sagemaker","sidebarTitle":"AWS Sagemaker","href":"/docs/ai-gateway/aws-sagemaker"},{"title":"Google Vertex","sidebarTitle":"Google Vertex AI","href":"/docs/ai-gateway/google-vertex"},{"title":"Google Gemini","sidebarTitle":"Google Gemini","href":"/docs/ai-gateway/google-gemini"},{"group":"Azure Models","pages":[{"title":"Choosing an Azure model integration","sidebarTitle":"Overview","href":"/docs/ai-gateway/azure-models-guide"},{"title":"Microsoft Foundry","sidebarTitle":"Microsoft Foundry","tag":"NEW","href":"/docs/ai-gateway/microsoft-foundry"},{"title":"Migrate to Microsoft Foundry","sidebarTitle":"Migrate to Microsoft Foundry","href":"/docs/ai-gateway/migrate-to-microsoft-foundry"},{"title":"Azure OpenAI","sidebarTitle":"Azure OpenAI","tag":"LEGACY","href":"/docs/ai-gateway/azure-openai"},{"title":"Azure Foundry","sidebarTitle":"Azure AI Foundry","tag":"LEGACY","href":"/docs/ai-gateway/azure-ai-foundry"},{"group":"Authentication","pages":[{"title":"Azure Entra ID Certificate Based Authentication","sidebarTitle":"Azure Certificate Auth","href":"/docs/ai-gateway/azure-entra-certificate-auth"},{"title":"Azure Entra ID Client Secret Based Authentication","sidebarTitle":"Azure Client Secret Auth","href":"/docs/ai-gateway/azure-entra-client-secret-auth"},{"title":"Azure Workload Identity Federation Authentication","sidebarTitle":"Azure Workload Identity","href":"/docs/ai-gateway/azure-entra-wif-auth"}]}]},{"title":"Databricks","sidebarTitle":"Databricks Models","href":"/docs/ai-gateway/databricks-models"},{"title":"Cohere","sidebarTitle":"Cohere Models","href":"/docs/ai-gateway/cohere"},{"title":"AI21","sidebarTitle":"AI21","href":"/docs/ai-gateway/ai21"},{"title":"Deepinfra","sidebarTitle":"Deepinfra Models","href":"/docs/ai-gateway/deepinfra"},{"title":"Groq","sidebarTitle":"Groq Models","href":"/docs/ai-gateway/groq"},{"title":"ElevenLabs","sidebarTitle":"ElevenLabs","href":"/docs/ai-gateway/elevenlabs"},{"title":"Deepgram","sidebarTitle":"Deepgram","href":"/docs/ai-gateway/deepgram"},{"title":"Cartesia","sidebarTitle":"Cartesia","href":"/docs/ai-gateway/cartesia"},{"title":"Smallest AI","sidebarTitle":"Smallest AI","href":"/docs/ai-gateway/smallest-ai"},{"title":"Mistral AI","sidebarTitle":"Mistral AI Models","href":"/docs/ai-gateway/mistral"},{"title":"Cloudera","sidebarTitle":"Cloudera Models","href":"/docs/ai-gateway/cloudera"},{"title":"OpenRouter","sidebarTitle":"OpenRouter","href":"/docs/ai-gateway/openrouter"},{"title":"Perplexity AI","sidebarTitle":"Perplexity Models","href":"/docs/ai-gateway/perplexity-ai"},{"title":"Together AI","sidebarTitle":"Together AI","href":"/docs/ai-gateway/together-ai"},{"title":"xAI","sidebarTitle":"xAI Models","href":"/docs/ai-gateway/xai"},{"title":"SambaNova","sidebarTitle":"SambaNova","href":"/docs/ai-gateway/sambanova"},{"title":"Cerebras","sidebarTitle":"Cerebras","href":"/docs/ai-gateway/cerebras"},{"title":"Wafer","sidebarTitle":"Wafer","href":"/docs/ai-gateway/wafer"},{"title":"Fireworks AI Model Provider for TrueFoundry AI Gateway","sidebarTitle":"Fireworks AI","href":"/docs/ai-gateway/fireworks-ai"},{"title":"Snowflake Cortex","sidebarTitle":"Snowflake Cortex","href":"/docs/ai-gateway/snowflake-cortex"},{"title":"Baseten","sidebarTitle":"Baseten","href":"/docs/ai-gateway/baseten"},{"title":"TypeSafe","sidebarTitle":"TypeSafe","href":"/docs/ai-gateway/typesafe"},{"group":"Custom Endpoints","root":{"title":"Custom Endpoints","sidebarTitle":"Custom Endpoints","href":"/docs/ai-gateway/custom-endpoints"},"expanded":false,"pages":[{"group":"Examples","pages":[{"title":"CoreWeave","sidebarTitle":"CoreWeave Models","href":"/docs/ai-gateway/coreweave-models"},{"title":"PipeShift","sidebarTitle":"PipeShift","href":"/docs/ai-gateway/pipeshift"},{"title":"SiliconFlow","sidebarTitle":"SiliconFlow","href":"/docs/ai-gateway/siliconflow"},{"title":"io.net","sidebarTitle":"io.net","href":"/docs/ai-gateway/io-net"},{"title":"Resemble AI","sidebarTitle":"Resemble AI","href":"/docs/ai-gateway/resemble-ai"},{"title":"Ringg.AI","sidebarTitle":"Ringg.AI","href":"/docs/ai-gateway/ringg-ai"},{"title":"Crusoe","sidebarTitle":"Crusoe","href":"/docs/ai-gateway/crusoe"},{"title":"Jev (TypeSafe)","sidebarTitle":"Jev","href":"/docs/ai-gateway/jev"},{"title":"SCX.ai","sidebarTitle":"SCX.ai","href":"/docs/ai-gateway/scx-ai"}]}]},{"title":"Self-Hosted Models","sidebarTitle":"Self-Hosted Models","href":"/docs/ai-gateway/self-hosted-models"}]},{"group":"Supported APIs","pages":[{"group":"Chat Completions","root":{"title":"Chat Completions API (/chat/completions)","sidebarTitle":"Overview","href":"/docs/ai-gateway/chat-completions-overview"},"expanded":false,"directory":"accordion","pages":[{"title":"Chat Completions API (/chat/completions)","sidebarTitle":"Overview","href":"/docs/ai-gateway/chat-completions-overview"},{"title":"Chat Completions: Multimodal","sidebarTitle":"Multimodal","href":"/docs/ai-gateway/chat-completions-multimodal"},{"title":"Chat Completions: Tools \u0026 Signatures","sidebarTitle":"Tools","href":"/docs/ai-gateway/chat-completions-tools"},{"title":"Chat Completions: Structured Outputs","sidebarTitle":"Structured Outputs","href":"/docs/ai-gateway/chat-completions-structured-outputs"},{"title":"Chat Completions: Caching \u0026 Reasoning","sidebarTitle":"Caching \u0026 Reasoning","href":"/docs/ai-gateway/chat-completions-advanced"},{"title":"Chat Completions: Extended Thinking","sidebarTitle":"Extended Thinking","href":"/docs/ai-gateway/chat-completions-extended-thinking"}]},{"title":"Embeddings API (/embeddings)","sidebarTitle":"Embeddings","href":"/docs/ai-gateway/embed"},{"title":"Batch API (/batches)","sidebarTitle":"Batch Predictions","href":"/docs/ai-gateway/batch-predictions-with-truefoundry-llm-gateway"},{"title":"Finetune API (/fine_tuning)","sidebarTitle":"Finetuning","href":"/docs/ai-gateway/finetune"},{"title":"Responses API (/responses)","sidebarTitle":"Responses API","href":"/docs/ai-gateway/responses-api"},{"title":"Image Generation API (/images/generations)","sidebarTitle":"Image Generation","href":"/docs/ai-gateway/image-generation"},{"title":"Image Edit API (/images/edits)","sidebarTitle":"Image Edit","href":"/docs/ai-gateway/image-edit"},{"title":"Image Variation API (/images/variations)","sidebarTitle":"Image Variation","href":"/docs/ai-gateway/image-variation"},{"title":"Video Generation API (/videos-proxy)","sidebarTitle":"Video Generation","href":"/docs/ai-gateway/video-generation"},{"title":"Text to Speech API","sidebarTitle":"Text to Speech","href":"/docs/ai-gateway/text-to-speech"},{"title":"Audio Translation API","sidebarTitle":"Audio Translation","href":"/docs/ai-gateway/audio-translation"},{"title":"Speech to Text API","sidebarTitle":"Speech to Text","href":"/docs/ai-gateway/audio-transcription"},{"group":"Live / Realtime API","root":{"title":"Live / Realtime API (/live)","sidebarTitle":"Overview","href":"/docs/ai-gateway/live-api"},"expanded":false,"directory":"accordion","pages":[{"title":"Live / Realtime API (/live)","sidebarTitle":"Overview","href":"/docs/ai-gateway/live-api"},{"title":"Live API: Code Snippets","sidebarTitle":"Code Snippets","href":"/docs/ai-gateway/live-api-code-snippets"},{"title":"Live API: Tool Calling","sidebarTitle":"Tool Calling","href":"/docs/ai-gateway/live-api-tool-calling"},{"title":"OpenAI Realtime with WebRTC","sidebarTitle":"WebRTC (OpenAI)","href":"/docs/ai-gateway/live-api-webrtc"},{"title":"Amazon Nova Sonic (Bedrock)","sidebarTitle":"Nova Sonic (Bedrock)","href":"/docs/ai-gateway/live-api-nova-sonic"}]},{"title":"Files API (/files)","sidebarTitle":"Files API","href":"/docs/ai-gateway/file-endpoints"},{"title":"Rerank API (/rerank)","sidebarTitle":"Rerank API","href":"/docs/ai-gateway/rerank"},{"title":"Moderation API (/moderations)","sidebarTitle":"Moderation API","href":"/docs/ai-gateway/moderation"},{"title":"Compaction API (/responses/compact)","sidebarTitle":"Compaction API","href":"/docs/ai-gateway/compaction"},{"title":"Messages API (/messages)","sidebarTitle":"Messages API","href":"/docs/ai-gateway/messages-overview"},{"title":"Decisions API (/v1/decisions, /v1/systemone)","sidebarTitle":"Decisions API","href":"/docs/ai-gateway/decisions"},{"title":"Proxy API (/proxy)","sidebarTitle":"Proxy API","href":"/docs/ai-gateway/proxy-api"}]},{"group":"Making LLM Requests","pages":[{"title":"Making Your First Request","sidebarTitle":"Making Your First Request","href":"/docs/ai-gateway/making-llm-requests-via-gateway"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/docs/ai-gateway/authentication"},{"title":"Custom Metadata and Headers","sidebarTitle":"Metadata \u0026 Headers","href":"/docs/ai-gateway/request-headers"},{"title":"Native SDK Support","sidebarTitle":"Native SDK Support","href":"/docs/ai-gateway/native-sdk-support"},{"title":"Model Discovery","sidebarTitle":"Model Discovery","href":"/docs/ai-gateway/model-discovery"}]},{"group":"Set Up Your IDEs","pages":[{"title":"Set Up Your IDEs","sidebarTitle":"Overview","href":"/docs/ai-gateway/personal-setup"},{"title":"Claude Code","href":"/docs/ai-gateway/ide-setup/claude-code"},{"title":"Codex (CLI \u0026 Desktop)","href":"/docs/ai-gateway/ide-setup/codex"},{"title":"Claude Desktop","href":"/docs/ai-gateway/ide-setup/claude-desktop"},{"title":"Cursor","href":"/docs/ai-gateway/ide-setup/cursor"},{"title":"VS Code","href":"/docs/ai-gateway/ide-setup/vscode"},{"title":"GitHub Copilot CLI","href":"/docs/ai-gateway/ide-setup/copilot-cli"},{"title":"Gemini CLI","href":"/docs/ai-gateway/ide-setup/gemini-cli"},{"title":"OpenCode","href":"/docs/ai-gateway/ide-setup/opencode"},{"title":"Goose","href":"/docs/ai-gateway/ide-setup/goose"},{"title":"Qwen Code","href":"/docs/ai-gateway/ide-setup/qwen-code"},{"title":"Grok Build","href":"/docs/ai-gateway/ide-setup/grok-build"},{"title":"Pi","href":"/docs/ai-gateway/ide-setup/pi"}]},{"group":"Deploy with MDM","pages":[{"title":"Deploy coding agents with MDM","sidebarTitle":"Overview","href":"/docs/ai-gateway/mdm-setup"},{"title":"Claude Code and Claude Desktop with MDM","sidebarTitle":"Claude Code \u0026 Desktop","href":"/docs/ai-gateway/mdm/claude"},{"title":"Codex with MDM","sidebarTitle":"Codex","href":"/docs/ai-gateway/mdm/codex"},{"title":"MDM configuration reference","sidebarTitle":"Configuration reference","href":"/docs/ai-gateway/mdm/configuration-reference"}]},{"title":"TrueFoundry AI Gateway Playground","sidebarTitle":"AI Gateway Playground","href":"/docs/ai-gateway/playground-overview"},{"group":"Virtual Models","pages":[{"title":"Virtual Models","sidebarTitle":"Overview","href":"/docs/ai-gateway/virtual-model"},{"title":"Create a Virtual Model","sidebarTitle":"Create a Virtual Model","href":"/docs/ai-gateway/virtual-model-advanced"},{"title":"Auto Routing","sidebarTitle":"Auto Routing","href":"/docs/ai-gateway/auto-routing"}]},{"title":"Access Control","sidebarTitle":"Access Control","href":"/docs/ai-gateway/gateway-access-control"},{"group":"Policies","pages":[{"title":"Rate Limiting","sidebarTitle":"Rate Limiting","href":"/docs/ai-gateway/ratelimiting-v2"},{"title":"Rate Limiting (V1, deprecated)","sidebarTitle":"Rate Limiting (V1)","hidden":true,"href":"/docs/ai-gateway/ratelimiting"},{"title":"Budget Limiting","sidebarTitle":"Budget Limiting","href":"/docs/ai-gateway/budget-limiting-v2"},{"title":"Budget Usage Recovery","sidebarTitle":"Budget Usage Recovery","href":"/docs/ai-gateway/budget-usage-recovery"},{"title":"Budget Limiting (V1, deprecated)","sidebarTitle":"Budget Limiting (V1)","hidden":true,"href":"/docs/ai-gateway/budgetlimiting"},{"title":"Logging Configuration","sidebarTitle":"Logging Config","href":"/docs/ai-gateway/logging-config"}]},{"title":"Caching (Exact and Semantic)","sidebarTitle":"Caching (Exact and Semantic)","href":"/docs/ai-gateway/caching"},{"title":"Cost Tracking","sidebarTitle":"Cost Tracking","href":"/docs/ai-gateway/cost-tracking"},{"title":"Cost Savings","sidebarTitle":"Cost Savings","href":"/docs/ai-gateway/cost-savings"},{"group":"Extras","pages":[{"title":"Session Management","sidebarTitle":"Session Management","href":"/docs/ai-gateway/session-management"},{"title":"Log Feedback on Requests","sidebarTitle":"Log Feedback","href":"/docs/ai-gateway/feedback-for-traces"},{"title":"First Chunk Gate for Streaming","sidebarTitle":"First Chunk Gate","href":"/docs/ai-gateway/first-chunk-gate"},{"title":"Anthropic Stream Overload Fallback","sidebarTitle":"Anthropic Stream Fallback","href":"/docs/ai-gateway/anthropic-stream-overload-fallback"}]}]},{"group":"MCP Registry and Gateway","pages":[{"title":"TrueFoundry MCP Gateway","sidebarTitle":"Overview","href":"/docs/ai-gateway/mcp/mcp-overview"},{"title":"MCP Server: Getting Started","sidebarTitle":"Getting Started","href":"/docs/ai-gateway/mcp/mcp-server-getting-started"},{"title":"MCP Protocol Support","sidebarTitle":"Protocol Support","href":"/docs/ai-gateway/mcp/mcp-protocol-support"},{"group":"Authentication and Security","root":{"title":"Authentication and Security","sidebarTitle":"Authentication and Security","href":"/docs/ai-gateway/mcp/mcp-gateway-auth-security"},"pages":[{"title":"Authentication and Security","sidebarTitle":"Authentication and Security","href":"/docs/ai-gateway/mcp/mcp-gateway-auth-security"},{"title":"Auth Overrides","sidebarTitle":"Auth Overrides","href":"/docs/ai-gateway/mcp/mcp-server-auth-overrides"},{"group":"Outbound auth integrations","pages":[{"title":"Okta app setup","sidebarTitle":"Okta App Setup","href":"/docs/ai-gateway/mcp/okta-app-setup"},{"title":"Microsoft Entra app setup","sidebarTitle":"Microsoft Entra App Setup","href":"/docs/ai-gateway/mcp/entra-app-setup"},{"title":"Microsoft Entra On-Behalf-Of (OBO) for MCP","sidebarTitle":"Microsoft Entra OBO App Setup","href":"/docs/ai-gateway/mcp/mcp-server-oauth-azure-obo"},{"title":"Register an AWS Bedrock AgentCore MCP Server","sidebarTitle":"AgentCore (AWS SigV4)","href":"/docs/ai-gateway/mcp/mcp-server-agentcore-sigv4"}]}]},{"title":"MCP Troubleshooting Guide","sidebarTitle":"Troubleshooting Guide","href":"/docs/ai-gateway/mcp/mcp-troubleshooting-guide"},{"title":"MCP Tool Approvals","sidebarTitle":"Tool Approvals","href":"/docs/ai-gateway/mcp/mcp-tool-approval"},{"title":"MCP Tool Management","sidebarTitle":"Tool Management","href":"/docs/ai-gateway/mcp/mcp-tool-management"},{"title":"Connect MCP Servers from Your IDE","sidebarTitle":"Connect MCP Servers from Your IDE","href":"/docs/ai-gateway/mcp/connect-mcp-from-ide"},{"title":"TrueFoundry Managed MCPs","sidebarTitle":"TrueFoundry Managed MCPs","href":"/docs/ai-gateway/mcp/tfy-managed-mcp-server"},{"title":"Virtual MCP Server","sidebarTitle":"Virtual MCP Server","href":"/docs/ai-gateway/mcp/virtual-mcp-server"},{"title":"OpenAPI to MCP Server","sidebarTitle":"OpenAPI to MCP Server","href":"/docs/ai-gateway/mcp/openapi-mcp-server"},{"title":"Hosted Stdio-based MCP Server","sidebarTitle":"Hosted Stdio-based MCP Server","href":"/docs/ai-gateway/mcp/stdio-mcp-server"},{"group":"MCP Server Guides","pages":[{"group":"Creating MCP Servers","pages":[{"title":"Create a Basic Calculator MCP Server","sidebarTitle":"Basic Calculator MCP Server","href":"/docs/ai-gateway/mcp/create-calculator-mcp-server"},{"title":"Add Okta OAuth to a Calculator MCP Server","sidebarTitle":"Okta OAuth MCP server","href":"/docs/ai-gateway/mcp/mcp-server-oauth-okta"},{"title":"Create an OAuth MCP Server with Azure Entra ID","sidebarTitle":"Azure Entra ID OAuth MCP Server","href":"/docs/ai-gateway/mcp/mcp-server-oauth-azure"}]}]}]},{"group":"Skills Registry","pages":[{"title":"AI Gateway Skills Registry","sidebarTitle":"Overview","href":"/docs/ai-gateway/skills/skills-registry"},{"title":"Create, Manage, and Use Skills","sidebarTitle":"Create, Manage and Use Skills","href":"/docs/ai-gateway/skills/getting-started"}]},{"group":"Prompt Registry","pages":[{"title":"Prompt Management","sidebarTitle":"Create, Manage and Use Prompts","href":"/docs/ai-gateway/prompt-management"}]},{"group":"Guardrails and Security","pages":[{"title":"AI Gateway Guardrails Overview","sidebarTitle":"Overview","href":"/docs/ai-gateway/guardrails-overview"},{"title":"AI Gateway Guardrails: Quick Start","sidebarTitle":"Getting Started","href":"/docs/ai-gateway/guardrails-getting-started"},{"title":"Configure Guardrail Policies","sidebarTitle":"Configure Guardrail Policies","href":"/docs/ai-gateway/guardrails-configuration"},{"title":"Guardrails Best Practices","sidebarTitle":"Best Practices","href":"/docs/ai-gateway/guardrails-best-practices"},{"group":"TrueFoundry Guardrails","root":{"title":"TrueFoundry Guardrails","sidebarTitle":"Overview","href":"/docs/ai-gateway/truefoundry-guardrails"},"pages":[{"title":"TrueFoundry Guardrails","sidebarTitle":"Overview","description":"Built-in guardrails that run on TrueFoundry-managed infrastructure — no external credentials required.","href":"/docs/ai-gateway/truefoundry-guardrails"},{"title":"Secrets Detection Guardrail","sidebarTitle":"Secrets Detection","href":"/docs/ai-gateway/secrets-detection"},{"title":"Code Safety Linter Guardrail","sidebarTitle":"Code Safety Linter","description":"Detect unsafe code patterns in LLM outputs using TrueFoundry's built-in Code Safety Linter guardrail.","href":"/docs/ai-gateway/code-safety-linter"},{"title":"SQL Sanitizer Guardrail","sidebarTitle":"SQL Sanitizer","href":"/docs/ai-gateway/sql-sanitizer"},{"title":"Regex Pattern Match Guardrail","sidebarTitle":"Regex Pattern Match","href":"/docs/ai-gateway/regex-pattern-matching"},{"title":"Prompt Injection Guardrail","sidebarTitle":"Prompt Injection","href":"/docs/ai-gateway/tfy-prompt-injection"},{"title":"PII/PHI Detection Guardrail","sidebarTitle":"PII/PHI","href":"/docs/ai-gateway/tfy-pii"},{"title":"Content Moderation Guardrail","sidebarTitle":"Content Moderation","href":"/docs/ai-gateway/tfy-content-moderation"},{"title":"Metadata Validation Guardrail","sidebarTitle":"Metadata Validation","href":"/docs/ai-gateway/metadata-validation"},{"title":"Cedar Guardrails","sidebarTitle":"Cedar Guardrails","href":"/docs/ai-gateway/cedar-guardrails"},{"title":"OPA Guardrails","sidebarTitle":"OPA Guardrails","href":"/docs/ai-gateway/opa-guardrails"}]},{"group":"External Providers","pages":[{"title":"Akto Integration","sidebarTitle":"Akto","href":"/docs/ai-gateway/akto"},{"title":"Arthur AI","sidebarTitle":"Arthur AI","href":"/docs/ai-gateway/arthur-ai"},{"title":"AWS Bedrock Guardrail Integration","sidebarTitle":"AWS Bedrock Guardrail","href":"/docs/ai-gateway/bedrock-guardrails"},{"title":"Azure Content Safety Guardrail Integration","sidebarTitle":"Azure Content Safety","href":"/docs/ai-gateway/azure-content-safety"},{"title":"Azure PII Guardrail Integration","sidebarTitle":"Azure PII","href":"/docs/ai-gateway/azure-pii"},{"title":"Azure Prompt Shield Guardrail Integration","sidebarTitle":"Azure Prompt Shield","href":"/docs/ai-gateway/azure-prompt-shield"},{"title":"CrowdStrike AIDR Integration","sidebarTitle":"CrowdStrike AIDR","href":"/docs/ai-gateway/crowdstrike"},{"title":"Cato Networks","sidebarTitle":"Cato Networks","href":"/docs/ai-gateway/cato-networks"},{"title":"Cisco AI Defense Integration","sidebarTitle":"Cisco AI Defense","href":"/docs/ai-gateway/cisco-ai-defense"},{"title":"DeepKeep AI Firewall","sidebarTitle":"DeepKeep","href":"/docs/ai-gateway/deepkeep"},{"title":"Enkrypt AI Guardrail Integration","sidebarTitle":"Enkrypt AI","href":"/docs/ai-gateway/enkrypt-ai"},{"title":"F5 AI Security (CalypsoAI) Integration","sidebarTitle":"F5 AI Security","href":"/docs/ai-gateway/f5-calypsoai"},{"title":"Fiddler Integration","sidebarTitle":"Fiddler","href":"/docs/ai-gateway/fiddler"},{"title":"Fireworks Safety Model Guardrail for TrueFoundry AI Gateway","sidebarTitle":"Fireworks","href":"/docs/ai-gateway/fireworks"},{"title":"Google Model Armor Guardrail Integration","sidebarTitle":"Google Model Armor","href":"/docs/ai-gateway/google-model-armor"},{"title":"Gray Swan Cygnal","sidebarTitle":"Gray Swan Cygnal","href":"/docs/ai-gateway/grayswan-cygnal"},{"title":"Guardrails AI Integration","sidebarTitle":"Guardrails AI","href":"/docs/ai-gateway/guardrails-ai"},{"title":"HiddenLayer Integration","sidebarTitle":"HiddenLayer","href":"/docs/ai-gateway/hiddenlayer"},{"title":"CoreWeave Weave Guardrails Integration","sidebarTitle":"CoreWeave Guardrails","href":"/docs/ai-gateway/coreweave-weave-guardrails"},{"title":"Lasso Security","sidebarTitle":"Lasso Security","href":"/docs/ai-gateway/lasso-security"},{"title":"Noma Security","sidebarTitle":"Noma Security","href":"/docs/ai-gateway/noma-security"},{"title":"NVIDIA NeMo Guardrails Integration","sidebarTitle":"NVIDIA NeMo","href":"/docs/ai-gateway/nvidia-nemo"},{"title":"OpenAI Moderation Integration","sidebarTitle":"OpenAI Moderation","href":"/docs/ai-gateway/openai-moderations"},{"title":"Onyx Security","sidebarTitle":"Onyx Security","href":"/docs/ai-gateway/onyx-security"},{"title":"Palo Alto Prisma AIRS Integration","sidebarTitle":"Palo Alto Prisma AIRS","href":"/docs/ai-gateway/palo-alto-airs"},{"title":"Patronus AI Integration","sidebarTitle":"Patronus AI","href":"/docs/ai-gateway/patronus"},{"title":"Pillar Security Integration","sidebarTitle":"Pillar Security","href":"/docs/ai-gateway/pillar-security"},{"title":"Straiker","sidebarTitle":"Straiker","href":"/docs/ai-gateway/straiker"},{"title":"TrojAI DEFEND Integration","sidebarTitle":"TrojAI","href":"/docs/ai-gateway/trojai"},{"title":"Verra","sidebarTitle":"Verra","href":"/docs/ai-gateway/verra"},{"title":"Zscaler AI Guard guardrail for prompts and responses","sidebarTitle":"Zscaler AI Guard","href":"/docs/ai-gateway/zscaler-ai-guard"}]},{"title":"Custom Guardrail/Plugins Configuration","sidebarTitle":"Bring your own Guardrail / Plugin","href":"/docs/ai-gateway/custom-guardrails"}]},{"group":"Observability","pages":[{"title":"Metrics Dashboard","sidebarTitle":"Metrics Dashboard","href":"/docs/ai-gateway/analytics"},{"title":"Request Logging","sidebarTitle":"Request Logging","href":"/docs/ai-gateway/request-logging"},{"title":"Configure Data Access","sidebarTitle":"Configure Data Access","href":"/docs/ai-gateway/data-access"},{"title":"Configure Data Routing","sidebarTitle":"Configure Data Routing","href":"/docs/ai-gateway/data-routing"},{"group":"Export Logs and Metrics","pages":[{"title":"Export OpenTelemetry Data","sidebarTitle":"Export via OpenTelemetry","href":"/docs/ai-gateway/export-opentelemetry-data"},{"title":"Prometheus Grafana Integration","sidebarTitle":"Prometheus \u0026 Grafana","href":"/docs/ai-gateway/prometheus-grafana-integration"}]},{"group":"API Access to Metrics","expanded":false,"pages":[{"title":"Model Metrics","sidebarTitle":"Model Metrics","href":"/docs/ai-gateway/fetch-model-metrics"},{"title":"MCP Metrics","sidebarTitle":"MCP Metrics","href":"/docs/ai-gateway/fetch-mcp-metrics"},{"title":"Guardrail Metrics","sidebarTitle":"Guardrail Metrics","href":"/docs/ai-gateway/fetch-guardrail-metrics"},{"title":"Cache Metrics","sidebarTitle":"Cache Metrics","href":"/docs/ai-gateway/fetch-cache-metrics"},{"title":"Routing Metrics","sidebarTitle":"Routing Metrics","href":"/docs/ai-gateway/fetch-routing-metrics"},{"title":"Agent Metrics","sidebarTitle":"Agent Metrics","href":"/docs/ai-gateway/fetch-agent-metrics"}]},{"group":"API Access to Logs","root":{"title":"API Access to Logs","sidebarTitle":"Overview","href":"/docs/ai-gateway/fetch-request-logs"},"expanded":false,"directory":"accordion","pages":[{"title":"API Access to Logs","sidebarTitle":"Overview","href":"/docs/ai-gateway/fetch-request-logs"},{"title":"Request Logs: Trace Inspection","sidebarTitle":"Trace Inspection","href":"/docs/ai-gateway/fetch-request-logs-trace-inspection"},{"title":"Request Logs: Filtering","sidebarTitle":"Filtering","href":"/docs/ai-gateway/fetch-request-logs-filtering"},{"group":"Use Cases","expanded":false,"pages":[{"title":"Request Logs: Common Use Cases","sidebarTitle":"Basic Queries","href":"/docs/ai-gateway/fetch-request-logs-use-cases"},{"title":"Request Logs: Advanced Queries","sidebarTitle":"Advanced Queries","href":"/docs/ai-gateway/fetch-request-logs-use-cases-advanced"}]},{"group":"Span Attributes","expanded":false,"pages":[{"title":"Request Logs: Span Attributes","sidebarTitle":"TrueFoundry Attributes","href":"/docs/ai-gateway/fetch-request-logs-span-attributes"},{"title":"GenAI Span Attributes","sidebarTitle":"GenAI Attributes","href":"/docs/ai-gateway/fetch-request-logs-span-attributes-genai"}]}]}]},{"group":"Deployment","pages":[{"title":"Gateway Architecture","sidebarTitle":"Architecture","href":"/docs/ai-gateway/gateway-architecture"},{"title":"Deployment Options","sidebarTitle":"Deployment Options","href":"/docs/ai-gateway/modes-of-deployment"},{"title":"Globally Distributed SAAS Gateway","sidebarTitle":"Globally Distributed SAAS","href":"/docs/ai-gateway/globally-distributed-saas"},{"title":"Connect Private Models and MCP Servers","sidebarTitle":"Connect Private Endpoints","href":"/docs/ai-gateway/connect-private-models-mcp-servers"},{"title":"Install LLM Gateway (Standalone)","sidebarTitle":"Install AI Gateway","href":"/docs/ai-gateway/install-only-llm-gateway"}]},{"group":"Admin Guide","pages":[{"title":"Setup AI Gateway in Your Organization","sidebarTitle":"Setup AI Gateway in Org","href":"/docs/ai-gateway/setup-ai-gateway-in-org"},{"title":"Govern All AI Traffic Through the AI Gateway","sidebarTitle":"Govern All AI Traffic","href":"/docs/ai-gateway/govern-traffic-through-ai-gateway"},{"title":"Setup Dev, Staging and Prod Environments","sidebarTitle":"Setup Multiple Environments","href":"/docs/ai-gateway/setup-multiple-environments"},{"title":"Use Secret Manager in Integrations","sidebarTitle":"Use Secret Manager","href":"/docs/ai-gateway/secret-manager-in-ai-gateway"}]},{"group":"Chat","pages":[{"title":"Chat Completions","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /chat/completions","href":"/docs/api-reference/chat/chat-completions"}]},{"group":"Messages","pages":[{"title":"Messages","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /messages","href":"/docs/api-reference/messages/messages"},{"title":"Count Tokens","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /messages/count_tokens","href":"/docs/api-reference/messages/count-tokens"}]},{"group":"Embeddings","pages":[{"title":"Generate Embeddings","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /embeddings","href":"/docs/api-reference/embeddings/generate-embeddings"}]},{"group":"Rerank","pages":[{"title":"Rerank Documents","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /v2/rerank","href":"/docs/api-reference/rerank/rerank-documents"}]},{"group":"Responses","pages":[{"title":"List Model Response Input Items","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /responses/{id}/input_items","href":"/docs/api-reference/responses/list-model-response-input-items"},{"title":"Get Model Response","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /responses/{id}","href":"/docs/api-reference/responses/get-model-response"},{"title":"Delete Model Response","deprecated":null,"version":null,"openapi":"/gateway-openapi.json delete /responses/{id}","href":"/docs/api-reference/responses/delete-model-response"},{"title":"Model Responses","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /responses","href":"/docs/api-reference/responses/model-responses"},{"title":"Model Responses Compact","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /responses/compact","href":"/docs/api-reference/responses/model-responses-compact"}]},{"group":"Image","pages":[{"title":"Generate Images","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/generations","href":"/docs/api-reference/image/generate-images"},{"title":"Edit Images","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/edits","href":"/docs/api-reference/image/edit-images"},{"title":"Create Image Variation","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/variations","href":"/docs/api-reference/image/create-image-variation"}]},{"group":"Audio","pages":[{"title":"Transcribe Audio","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/transcriptions","href":"/docs/api-reference/audio/transcribe-audio"},{"title":"Translate Audio","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/translations","href":"/docs/api-reference/audio/translate-audio"},{"title":"Generate Speech","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/speech","href":"/docs/api-reference/audio/generate-speech"}]},{"group":"Batch","pages":[{"title":"List Batches","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches","href":"/docs/api-reference/batch/list-batches"},{"title":"Create Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /batches","href":"/docs/api-reference/batch/create-batch"},{"title":"Get Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches/{id}","href":"/docs/api-reference/batch/get-batch"},{"title":"Get Batch Output","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches/{id}/output","href":"/docs/api-reference/batch/get-batch-output"},{"title":"Cancel Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /batches/{id}/cancel","href":"/docs/api-reference/batch/cancel-batch"}]},{"group":"Files","pages":[{"title":"List Files","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files","href":"/docs/api-reference/files/list-files"},{"title":"Upload File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /files","href":"/docs/api-reference/files/upload-file"},{"title":"Get File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files/{id}","href":"/docs/api-reference/files/get-file"},{"title":"Delete File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json delete /files/{id}","href":"/docs/api-reference/files/delete-file"},{"title":"Get File Content","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files/{id}/content","href":"/docs/api-reference/files/get-file-content"}]},{"group":"Fine-tuning","pages":[{"title":"List Fine-tuning Jobs","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /fine_tuning/jobs","href":"/docs/api-reference/fine-tuning/list-fine-tuning-jobs"},{"title":"Create Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /fine_tuning/jobs","href":"/docs/api-reference/fine-tuning/create-fine-tuning-job"},{"title":"Retrieve Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /fine_tuning/jobs/{fine_tuning_job_id}","href":"/docs/api-reference/fine-tuning/retrieve-fine-tuning-job"},{"title":"Cancel Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /fine_tuning/jobs/{fine_tuning_job_id}/cancel","href":"/docs/api-reference/fine-tuning/cancel-fine-tuning-job"}]},{"group":"Moderations","pages":[{"title":"Create Moderation","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /moderations","href":"/docs/api-reference/moderations/create-moderation"}]},{"group":"Video","pages":[{"title":"Poll or Download Video","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /videos-proxy/{providerAccountName}/{nativePath}","href":"/docs/api-reference/video/poll-or-download-video"},{"title":"Generate Video","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /videos-proxy/{providerAccountName}/{nativePath}","href":"/docs/api-reference/video/generate-video"}]},{"group":"Models","pages":[{"title":"List available models","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /models","href":"/docs/api-reference/models/list-available-models"}]}]},{"tab":"Agent Platform","pages":[{"title":"Agent Platform","href":"/docs/agent-platform/agent-harness/overview"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/docs/platform/overview"}]},{"tab":"AI Deployment","pages":[{"title":"AI Deployment","href":"/docs/ai-deployment-overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/truefoundry_sdk"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/docs/ai-gateway/ecosystem"}]},{"tab":"Changelog","groups":[{"group":" ","pages":[{"title":"Changelog","href":"/docs/changelog"},{"group":"Announcements","pages":[{"title":"Deprecation of Rate Limiting V1 — 2nd November, 2026","href":"/docs/change-announcements/deprecation-of-rate-limiting-v1"},{"title":"Move to Named Guardrail Policies — v0.179","href":"/docs/change-announcements/named-guardrails-config-v0.179"},{"title":"Perplexity Models Move to the Agent API","href":"/docs/change-announcements/perplexity-agent-api-migration"},{"title":"Plan-Based Feature Gating — v0.174.0","href":"/docs/change-announcements/plan-based-feature-gating-v0.174.0"},{"title":"Agent Builder Moving to Trueforge \u0026 Agent APIs Deprecated — v0.172","href":"/docs/change-announcements/agents-moving-to-trueforge"},{"title":"Removing Collaborators from Resources — v0.172.0","href":"/docs/change-announcements/removing-collaborators-from-resources"},{"title":"Deprecation of MCP tool_settings — 26th October, 2026","href":"/docs/change-announcements/deprecation-of-mcp-tool-settings"},{"title":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages","sidebarTitle":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages - 19th August 2026","href":"/docs/change-announcements/deprecation-of-truefoundry-below-0.17-and-api-ml"},{"title":"Minimum Python Version Raised to 3.10 — truefoundry v0.17.0","href":"/docs/change-announcements/python-3.10-minimum-truefoundry-cli-v0.17.0"},{"title":"Budget Limiting V2 — v0.158.0","href":"/docs/change-announcements/budget-limiting-v2-v0.158.0"},{"title":"Deprecation of MCP Servers APIs — 30th September, 2026","href":"/docs/change-announcements/deprecation-of-mcp-servers-v1-apis"},{"title":"Deprecation of Images and Plots in Job Runs — v0.156.0","href":"/docs/change-announcements/deprecation-of-images-and-plots-in-job-runs-v0.156.0"},{"title":"Moving to External Secrets Operator for Secrets Management — v0.151.5","href":"/docs/change-announcements/moving-to-eso-for-secret-management-v0.151.5"},{"title":"MCP DCR client_id \u0026 Redirect URL Validation — v0.148","href":"/docs/change-announcements/mcp-dcr-client-id-validation-v0.148"},{"title":"Deprecation of Routing Config","href":"/docs/change-announcements/deprecation-of-routing-config"},{"title":"Identity and Access Revamp — v0.143","href":"/docs/change-announcements/identity-and-access-revamp-v0.143"},{"title":"AI Gateway Metrics Rename — v0.136","href":"/docs/change-announcements/refactoring-of-ai-gateway-metrics"},{"title":"Deprecation of MCP Servers in Prompts","href":"/docs/change-announcements/deprecation-of-mcp-servers-in-prompts"},{"title":"Deprecation of Common Tools in Playground and Settings — v0.135","href":"/docs/change-announcements/deprecation-of-common-tools-v0-135-0"},{"title":"x-tfy-routing-config Header Removal — v0.133","href":"/docs/change-announcements/routing-config-header-removal-v0.133"},{"title":"Simplified GitOps CI/CD with tfy apply — v0.132","href":"/docs/change-announcements/simplified-gitops-cicd-v0.132"},{"title":"Legacy MCP OAuth Routes Removal — v0.134","href":"/docs/change-announcements/legacy-mcp-oauth-routes-removal"},{"title":"MCP Gateway URL and Transport Changes — v0.130","href":"/docs/change-announcements/mcp-gateway-url-transport-v0.130"},{"title":"Gemini CLI Model Registration Requirement — v0.118","href":"/docs/change-announcements/gemini-cli-model-registration-v0.118"},{"title":"Guardrails YAML Schema Change — v0.116","href":"/docs/change-announcements/guardrails-yaml-schema-change-v0.116"},{"title":"MCP Server Groups Removal — v0.112","href":"/docs/change-announcements/mcp-server-groups-removal-v0.112"}]}]}]}]},"basePath":"","title":"Secrets Detection Guardrail - TrueFoundry Docs","buildId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","deploymentId":"dpl_9RFrWkXdFTJCytfx6jAofvAaEXr6","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-1H5zLJUq.js","DynamicMarkdown-RhjEuCHC.js","zoom-image-lightbox-CkI5al_8.js","lightbox-handle-r17bVUz3.js"]}