Configure the content policy declaratively in config.json, through the plugins array.
There is noguardrails_config top-level block. Earlier revisions of this
page described one, along with per-provider blocks for AWS Bedrock Guardrails,
Azure Content Safety, Google Model Armor and others. None of that is read by the
gateway.A config.json containing guardrails_config parses, the gateway boots and the
block is discarded — so a deployment that declares its entire content policy that
way runs with no guardrails. As of this release the gateway logs every
top-level section it does not read at startup, so the situation is at least
visible. Configure guardrails through the plugins array as shown below.
Apply only to these keys, by id or name. Empty means all.
teams
string[]
all
Apply only to these teams.
models
string[]
all
Apply only to these models. Accepts provider/*.
action
string
keyword, regex, pii
block (default) or redact. Redaction masks the matched span and lets the exchange continue. Rejected on llm and injection, which locate no span.
injection_threshold
int
injection
Score at which the rule blocks. 0 uses the default (100). Raise it on traffic that legitimately discusses prompts and roles; lower it for a high-assurance path.
fail_open
bool
llm
false by default — an unreachable classifier blocks. Set true to prefer availability over enforcement.
api_key is a plain string. Unlike provider credentials it cannot yet be given
as "env.VAR_NAME" or read from a secret manager.
Dimensions are ANDed, values within one are ORed — the example applies to
the legal team, and only on OpenAI models. Virtual keys match on id or name,
because operators think in names and automation carries ids.This exists because one policy for the whole gateway ends up set to whatever the
most permissive consumer can tolerate, leaving the strict consumer unprotected.
A scoped rule applies only when the scope is known. A request carrying no
virtual key escapes every scoped rule and is covered only by the unscoped ones.That is safe when client.enforce_auth_on_inference is set, because there is
then no such thing as a request without a virtual key. With it unset, an
anonymous caller was already reaching the model with no governance at all.The alternative — applying scoped rules when identity is unknown — sounds safer
and is worse: one team’s rule would start blocking every other team’s traffic the
moment identity resolution failed.
The provider receives [CUSTOMER PII REDACTED] in place of the address; the rest
of the message is untouched.This exists because blocking alone is blunt in the way that gets a rule
disabled: a support transcript containing one customer email is refused
entirely, so the team switches the PII rule off and ends with no coverage rather
than partial coverage. A rule people leave on is worth more than a stricter one
they turn off.The mask is a fixed marker, not a same-length run of asterisks: preserving the
length leaks how long the secret was, which narrows a search for a credential and
is most of the information for a phone number.
redact is rejected at validation on llm and injection rules. Those judge the
whole text rather than locating a span, so redacting them would delete everything
or nothing — and a policy that says “redact” while blocking is doing something
other than what it says.
The injection type scores weighted signals — instruction override, role
hijack, named jailbreaks, policy subversion, system-prompt extraction, chat
delimiter injection — and blocks when they pass a threshold.
It normalises before matching, so zero-width characters, full-width forms and
base64-encoded payloads do not evade it. It also inspects tool results, since
extract walks every message regardless of role — which is the MCP attack where
a malicious server returns instructions rather than data.
This is a detector, not a solution. Prompt injection is not solvable by pattern
matching: an attacker who knows the rules can phrase around them. It catches the
large majority of real attempts — copied jailbreak prompts, encoded payloads,
injected tool results — and raises the cost of the rest. It does not remove the
need for least privilege on tools, or the rule that model output is never
authorization.
Signals are calibrated in two classes. Conclusive signals block alone —
phrasings with no legitimate use, like “ignore all previous instructions”.
Ambiguous signals need corroboration, because they occur in ordinary traffic:
a line beginning system: is how people paste a transcript. A test suite of 24
legitimate messages that talk about instructions, roles and prompts guards the
false-positive rate, and a held-out corpus checks that it generalises.
A policy the gateway could not fully enforce is rejected rather than saved:
an invalid RE2 pattern, an unknown PII category, a rule left with nothing to
match, an llm rule missing its endpoint or model, or an unrecognised
apply_to. Over the API that is a 400; at startup the affected element is
dropped, the rest of the policy runs, and the plugin reports status degraded.
Guardrails — what the policy does, what it covers,
and what it does not do.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Vikat","colors":{"primary":"#0C3B43","light":"#07C983"},"logo":{"light":"https://mintcdn.com/vikat-ai/Xw_qzY8whhWmfPh3/media/vikat-logo.png?fit=max\u0026auto=format\u0026n=Xw_qzY8whhWmfPh3\u0026q=85\u0026s=1bce49f93b955ed9b64346a96466adfd","dark":"https://mintcdn.com/vikat-ai/dtGbonSkiZn6zZKE/media/vikat-logo-dark.png?fit=max\u0026auto=format\u0026n=dtGbonSkiZn6zZKE\u0026q=85\u0026s=97f9b62ceea92c66a50178a7a9d91a0e"},"favicon":"https://mintcdn.com/vikat-ai/NdGPuqWLiDOdPaJ6/favicon.ico?fit=max\u0026auto=format\u0026n=NdGPuqWLiDOdPaJ6\u0026q=85\u0026s=e571d9644566f9530b0f3d4fa084753f","navbar":{"links":[{"icon":"github","href":"https://vikat.local","label":"GitHub"}]},"footer":{"socials":{"github":"https://vikat.local"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vikat-ai","hasAudioNarration":false,"actualSubdomain":"vikat-ai","customDomains":["docs.vikat.ai"],"gitSource":{"type":"github","owner":"vikat-ai","repo":"vikat-gateway","deployBranch":"rebrand/vikat-gateway","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"}},"buildId":"6ab6c9d4dcef7527f446a72e","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API","count":404},{"language":"default","tag":"API Reference","count":404},{"language":"default","tag":"OSS","count":103},{"language":"default","tag":"Governance","count":49},{"language":"default","tag":"OpenAI Integration","count":47},{"language":"default","tag":"Integrations","count":43},{"language":"default","tag":"Providers \u0026 Guides","count":38},{"language":"default","tag":"Deployment Guides","count":36},{"language":"default","tag":"Logging","count":30},{"language":"default","tag":"Supported Providers","count":29}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"llms-txt-v2","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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".nav-logo{height:1.50rem}#sidebar-group>li>button>div{line-height:normal}"}],"page":{"pagePath":"deployment-guides/config-json/guardrails","slug":"/deployment-guides/config-json/guardrails","pageMetadata":{"title":"Guardrails","description":"Configure the content policy declaratively in config.json, through the plugins array.","icon":"shield-halved","href":"/deployment-guides/config-json/guardrails"},"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: \"Configure the content policy declaratively in config.json, through the plugins array.\"\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`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`There is `,_jsx(_components.strong,{children:`no`}),` `,_jsx(_components.code,{children:`guardrails_config`}),` top-level block. Earlier revisions of this\npage described one, along with per-provider blocks for AWS Bedrock Guardrails,\nAzure Content Safety, Google Model Armor and others. None of that is read by the\ngateway.`]}),_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`config.json`}),` containing `,_jsx(_components.code,{children:`guardrails_config`}),` parses, the gateway boots and the\nblock is discarded — so a deployment that declares its entire content policy that\nway runs with `,_jsx(_components.strong,{children:`no`}),` guardrails. As of this release the gateway logs every\ntop-level section it does not read at startup, so the situation is at least\nvisible. Configure guardrails through the `,_jsx(_components.code,{children:`plugins`}),` array as shown below.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`where-guardrails-are-configured`,children:`Where guardrails are configured`}),`\n`,_jsxs(_components.p,{children:[`Guardrails are a plugin. Everything about the policy lives in that plugin’s\n`,_jsx(_components.code,{children:`config`}),` object.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"$schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://schema.vikat.ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"plugins\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"guardrails\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"blocked_keywords\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"project-atlas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"acquisition-target\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"block_message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This request was blocked by the content policy.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"providers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`fields`,children:`Fields`}),`\n`,_jsx(Heading,{level:`3`,id:`top-level`,children:`Top level`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`blocked_keywords`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`[]`})}),_jsx(_components.td,{children:`Case-insensitive substrings that block a match.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`block_message`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`built-in`}),_jsx(_components.td,{children:`Returned when the blocklist matches.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apply_to`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"input\"`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`input`}),`, `,_jsx(_components.code,{children:`output`}),` or `,_jsx(_components.code,{children:`both`}),` — which side the blocklist inspects.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`providers`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`object[]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`[]`})}),_jsx(_components.td,{children:`Named rules, evaluated in order.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`a-provider`,children:`A provider`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Applies to`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`id`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`all`}),_jsx(_components.td,{children:`Stable identifier.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`all`}),_jsx(_components.td,{children:`Label, also used in the default block message.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`all`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`keyword`}),`, `,_jsx(_components.code,{children:`regex`}),`, `,_jsx(_components.code,{children:`pii`}),`, `,_jsx(_components.code,{children:`injection`}),` or `,_jsx(_components.code,{children:`llm`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enabled`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bool`})}),_jsx(_components.td,{children:`all`}),_jsx(_components.td,{children:`A disabled provider is not compiled or evaluated.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apply_to`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`all`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`input`}),` (default), `,_jsx(_components.code,{children:`output`}),` or `,_jsx(_components.code,{children:`both`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`all`}),_jsx(_components.td,{children:`Overrides the block message for this rule.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`keywords`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`keyword`})}),_jsx(_components.td,{children:`Case-insensitive substrings.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`patterns`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`regex`})}),_jsx(_components.td,{children:`RE2 expressions.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`categories`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`pii`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`email`}),`, `,_jsx(_components.code,{children:`ssn`}),`, `,_jsx(_components.code,{children:`credit_card`}),`, `,_jsx(_components.code,{children:`phone`}),`, `,_jsx(_components.code,{children:`ip`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`endpoint`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`llm`})}),_jsx(_components.td,{children:`Chat-completions URL for the classifier.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`llm`})}),_jsx(_components.td,{children:`Classifier model.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`llm`})}),_jsx(_components.td,{children:`Optional bearer token. Masked in API responses.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`virtual_keys`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:`all`}),_jsx(_components.td,{children:`Apply only to these keys, by id or name. Empty means all.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`teams`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:`all`}),_jsx(_components.td,{children:`Apply only to these teams.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`models`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string[]`})}),_jsx(_components.td,{children:`all`}),_jsxs(_components.td,{children:[`Apply only to these models. Accepts `,_jsx(_components.code,{children:`provider/*`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`action`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`keyword`}),`, `,_jsx(_components.code,{children:`regex`}),`, `,_jsx(_components.code,{children:`pii`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`block`}),` (default) or `,_jsx(_components.code,{children:`redact`}),`. Redaction masks the matched span and lets the exchange continue. Rejected on `,_jsx(_components.code,{children:`llm`}),` and `,_jsx(_components.code,{children:`injection`}),`, which locate no span.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`injection_threshold`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`int`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`injection`})}),_jsx(_components.td,{children:`Score at which the rule blocks. 0 uses the default (100). Raise it on traffic that legitimately discusses prompts and roles; lower it for a high-assurance path.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`fail_open`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bool`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`llm`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`false`}),` by default — an unreachable classifier `,_jsx(_components.strong,{children:`blocks`}),`. Set `,_jsx(_components.code,{children:`true`}),` to prefer availability over enforcement.`]})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`api_key`}),` is a plain string. Unlike provider credentials it cannot yet be given\nas `,_jsx(_components.code,{children:`\"env.VAR_NAME\"`}),` or read from a secret manager.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`scoping-a-rule`,children:`Scoping a rule`}),`\n`,_jsx(_components.p,{children:`A rule with no scope applies to everything. Naming virtual keys, teams or models\nnarrows it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"legal-only\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"teams\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"team-legal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"models\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/*\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"categories\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ssn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Dimensions are `,_jsx(_components.strong,{children:`ANDed`}),`, values within one are `,_jsx(_components.strong,{children:`ORed`}),` — the example applies to\nthe legal team, and only on OpenAI models. Virtual keys match on id or name,\nbecause operators think in names and automation carries ids.`]}),`\n`,_jsx(_components.p,{children:`This exists because one policy for the whole gateway ends up set to whatever the\nmost permissive consumer can tolerate, leaving the strict consumer unprotected.`}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`A scoped rule applies only when the scope is `,_jsx(_components.strong,{children:`known`}),`. A request carrying no\nvirtual key escapes every scoped rule and is covered only by the unscoped ones.`]}),_jsxs(_components.p,{children:[`That is safe when `,_jsx(_components.code,{children:`client.enforce_auth_on_inference`}),` is set, because there is\nthen no such thing as a request without a virtual key. With it unset, an\nanonymous caller was already reaching the model with no governance at all.`]}),_jsx(_components.p,{children:`The alternative — applying scoped rules when identity is unknown — sounds safer\nand is worse: one team’s rule would start blocking every other team’s traffic the\nmoment identity resolution failed.`})]}),`\n`,_jsx(Heading,{level:`2`,id:`redaction`,children:`Redaction`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`action: \"redact\"`}),` masks the matched span instead of refusing the exchange.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer-pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"both\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"redact\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"categories\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"phone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The provider receives `,_jsx(_components.code,{children:`[CUSTOMER PII REDACTED]`}),` in place of the address; the rest\nof the message is untouched.`]}),`\n`,_jsx(_components.p,{children:`This exists because blocking alone is blunt in the way that gets a rule\ndisabled: a support transcript containing one customer email is refused\nentirely, so the team switches the PII rule off and ends with no coverage rather\nthan partial coverage. A rule people leave on is worth more than a stricter one\nthey turn off.`}),`\n`,_jsx(_components.p,{children:`The mask is a fixed marker, not a same-length run of asterisks: preserving the\nlength leaks how long the secret was, which narrows a search for a credential and\nis most of the information for a phone number.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`redact`}),` is rejected at validation on `,_jsx(_components.code,{children:`llm`}),` and `,_jsx(_components.code,{children:`injection`}),` rules. Those judge the\nwhole text rather than locating a span, so redacting them would delete everything\nor nothing — and a policy that says “redact” while blocking is doing something\nother than what it says.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`prompt-injection-detection`,children:`Prompt-injection detection`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`injection`}),` type scores weighted signals — instruction override, role\nhijack, named jailbreaks, policy subversion, system-prompt extraction, chat\ndelimiter injection — and blocks when they pass a threshold.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"injection\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Prompt injection\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"injection\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"input\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It normalises before matching, so zero-width characters, full-width forms and\nbase64-encoded payloads do not evade it. It also inspects tool results, since\n`,_jsx(_components.code,{children:`extract`}),` walks every message regardless of role — which is the MCP attack where\na malicious server returns instructions rather than data.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This is a detector, not a solution. Prompt injection is not solvable by pattern\nmatching: an attacker who knows the rules can phrase around them. It catches the\nlarge majority of real attempts — copied jailbreak prompts, encoded payloads,\ninjected tool results — and raises the cost of the rest. It does not remove the\nneed for least privilege on tools, or the rule that model output is never\nauthorization.`})}),`\n`,_jsxs(_components.p,{children:[`Signals are calibrated in two classes. `,_jsx(_components.strong,{children:`Conclusive`}),` signals block alone —\nphrasings with no legitimate use, like “ignore all previous instructions”.\n`,_jsx(_components.strong,{children:`Ambiguous`}),` signals need corroboration, because they occur in ordinary traffic:\na line beginning `,_jsx(_components.code,{children:`system:`}),` is how people paste a transcript. A test suite of 24\nlegitimate messages that talk `,_jsx(_components.em,{children:`about`}),` instructions, roles and prompts guards the\nfalse-positive rate, and a held-out corpus checks that it generalises.`]}),`\n`,_jsx(Heading,{level:`2`,id:`a-full-example`,children:`A full example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`42`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`42`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"$schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://schema.vikat.ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"plugins\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"guardrails\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"blocked_keywords\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"project-atlas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"block_message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This request was blocked by the content policy.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"both\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"providers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"outbound-pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Outbound PII\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"categories\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ssn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"credit_card\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The response was withheld because it contained personal data.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"secret-shapes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Credential shapes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"regex\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"both\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patterns\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AKIA[0-9A-Z]{16}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sk-[A-Za-z0-9]{20,}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"judge\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Model judge\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"llm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apply_to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"endpoint\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http://127.0.0.1:8080/v1/chat/completions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-4o-mini\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`validation`,children:`Validation`}),`\n`,_jsxs(_components.p,{children:[`A policy the gateway could not fully enforce is `,_jsx(_components.strong,{children:`rejected`}),` rather than saved:\nan invalid RE2 pattern, an unknown PII category, a rule left with nothing to\nmatch, an `,_jsx(_components.code,{children:`llm`}),` rule missing its endpoint or model, or an unrecognised\n`,_jsx(_components.code,{children:`apply_to`}),`. Over the API that is a 400; at startup the affected element is\ndropped, the rest of the policy runs, and the plugin reports status `,_jsx(_components.code,{children:`degraded`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/enterprise/guardrails`,children:`Guardrails`}),` — what the policy does, what it covers,\nand what it does not do.`]}),`\n`]})]})}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":{"config":{},"pageMetadata":{"title":"Guardrails","description":"Configure the content policy declaratively in config.json, through the plugins array.","icon":"shield-halved","href":"/deployment-guides/config-json/guardrails"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Where guardrails are configured","slug":"where-guardrails-are-configured","depth":2,"children":[]},{"title":"Fields","slug":"fields","depth":2,"children":[{"title":"Top level","slug":"top-level","depth":3,"children":[]},{"title":"A provider","slug":"a-provider","depth":3,"children":[]}]},{"title":"Scoping a rule","slug":"scoping-a-rule","depth":2,"children":[]},{"title":"Redaction","slug":"redaction","depth":2,"children":[]},{"title":"Prompt-injection detection","slug":"prompt-injection-detection","depth":2,"children":[]},{"title":"A full example","slug":"a-full-example","depth":2,"children":[]},{"title":"Validation","slug":"validation","depth":2,"children":[]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/vikat-ai/75ed5d49c5b6d441/baseUrlSwitcher.js","/_mintlify/custom/vikat-ai/d8c2d2af23ad55cd/jsonLd.js","/_mintlify/custom/vikat-ai/c6dc09a69a0e6891/supportWidget.js","/_mintlify/custom/vikat-ai/aa532cead633d329/tally-embed.js"],"subdomain":"vikat-ai","siteName":"Vikat","title":"Guardrails - Vikat","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-09T20:32:32.236Z","originalFileLocation":"deployment-guides/config-json/guardrails.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=\"system\"}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=\"Configure the content policy declaratively in config.json, through the plugins array.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vikat\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_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/vikat-ai/emJQBbmxc0Co5JmP/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Guardrails - Vikat\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configure the content policy declaratively in config.json, through the plugins array.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vikat\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vikat.ai/deployment-guides/config-json/guardrails\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vikat-ai.mintlify.site/_mintlify/api/og/v2?division=config.json\u0026amp;title=Guardrails\u0026amp;description=Configure+the+content+policy+declaratively+in+config.json%2C+through+the+plugins+array.\u0026amp;theme=06807847904dd7332c4171c0\u0026amp;signature=96853fdf12a2807716607d39339a3a3c0aac34d38935edfcb11f18e731bc626e\">\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=\"Guardrails - Vikat\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configure the content policy declaratively in config.json, through the plugins array.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vikat-ai.mintlify.site/_mintlify/api/og/v2?division=config.json\u0026amp;title=Guardrails\u0026amp;description=Configure+the+content+policy+declaratively+in+config.json%2C+through+the+plugins+array.\u0026amp;theme=06807847904dd7332c4171c0\u0026amp;signature=96853fdf12a2807716607d39339a3a3c0aac34d38935edfcb11f18e731bc626e\">\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/vikat-ai/emJQBbmxc0Co5JmP/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vikat\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0C3B43\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vikat.ai/deployment-guides/config-json/guardrails\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/deployment-guides/config-json/guardrails.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vikat.ai/#organization\",\"name\":\"Vikat\",\"url\":\"https://docs.vikat.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vikat-ai/Xw_qzY8whhWmfPh3/media/vikat-logo.png?fit=max\u0026auto=format\u0026n=Xw_qzY8whhWmfPh3\u0026q=85\u0026s=1bce49f93b955ed9b64346a96466adfd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vikat.ai#website\",\"name\":\"Vikat\",\"url\":\"https://docs.vikat.ai\",\"publisher\":{\"@id\":\"https://docs.vikat.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails#webpage\",\"url\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails\",\"name\":\"Guardrails\",\"description\":\"Configure the content policy declaratively in config.json, through the plugins array.\",\"dateModified\":\"2026-09-09T20:32:32.236Z\",\"isPartOf\":{\"@id\":\"https://docs.vikat.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Config as Code\",\"item\":\"https://docs.vikat.ai/deployment-guides/helm\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"config.json\",\"item\":\"https://docs.vikat.ai/deployment-guides/config-json\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Guardrails\",\"item\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails#article\",\"headline\":\"Guardrails\",\"name\":\"Guardrails\",\"description\":\"Configure the content policy declaratively in config.json, through the plugins array.\",\"url\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vikat.ai/deployment-guides/config-json/guardrails#webpage\"},\"dateModified\":\"2026-09-09T20:32:32.236Z\",\"publisher\":{\"@id\":\"https://docs.vikat.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vikat.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vikat\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Vikat","nav":{"global":{"anchors":[]},"tabs":[{"tab":"OSS","icon":"book-open-cover","pages":[{"title":"OSS","href":"/overview"}]},{"tab":"Enterprise","icon":"building","pages":[{"title":"Enterprise","href":"/enterprise/overview"}]},{"tab":"Edge","icon":"globe","groups":[{"group":"Overview","pages":[]},{"group":"Governance \u0026 Control","icon":"shield-halved","pages":[]},{"group":"Admin controls","icon":"sliders","pages":[]},{"group":"Deployment","icon":"cloud-arrow-up","pages":[]},{"group":"Reference","icon":"list","pages":[]}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/cli-agents/overview"}]},{"tab":"Deployment Guides","icon":"server","pages":[{"group":"Platform specific guides","icon":"swatchbook","pages":[{"title":"Terraform + k8s","icon":"cloud","href":"/deployment-guides/k8s"},{"title":"ECS","icon":"aws","href":"/deployment-guides/ecs"},{"title":"fly.io","icon":"fly","href":"/deployment-guides/fly"}]},{"group":"Config as Code","icon":"code","pages":[{"group":"Helm","icon":"helicopter-symbol","pages":[{"title":"Quick Start","icon":"server","href":"/deployment-guides/helm"},{"title":"Values Reference","icon":"sliders","href":"/deployment-guides/helm/values"},{"title":"Client Configuration","icon":"gear","href":"/deployment-guides/helm/client"},{"title":"Provider Setup","icon":"plug","href":"/deployment-guides/helm/providers"},{"title":"Storage","icon":"database","href":"/deployment-guides/helm/storage"},{"title":"Plugins","icon":"puzzle-piece","href":"/deployment-guides/helm/plugins"},{"title":"Governance","icon":"shield","href":"/deployment-guides/helm/governance"},{"title":"Guardrails","icon":"shield-halved","href":"/deployment-guides/helm/guardrails"},{"title":"Secret Management","icon":"vault","href":"/deployment-guides/helm/secret-management"},{"title":"Cluster Mode \u0026 HA","icon":"network-wired","href":"/deployment-guides/helm/cluster"},{"title":"Troubleshooting","icon":"wrench","href":"/deployment-guides/helm/troubleshooting"}]},{"group":"config.json","icon":"file-code","pages":[{"title":"Quick Start","icon":"file-code","href":"/deployment-guides/config-json"},{"title":"Source of Truth \u0026 Reconciliation","icon":"shuffle","href":"/deployment-guides/config-json/source-of-truth"},{"title":"Schema Reference","icon":"brackets-curly","href":"/deployment-guides/config-json/schema-reference"},{"title":"Client Configuration","icon":"gear","href":"/deployment-guides/config-json/client"},{"title":"Provider Setup","icon":"plug","href":"/deployment-guides/config-json/providers"},{"title":"Storage","icon":"database","href":"/deployment-guides/config-json/storage"},{"title":"Plugins","icon":"puzzle-piece","href":"/deployment-guides/config-json/plugins"},{"title":"Governance","icon":"shield-check","href":"/deployment-guides/config-json/governance"},{"title":"Cluster","description":"Configure enterprise cluster mode in config.json using peers or automatic discovery","icon":"circle-nodes","href":"/deployment-guides/config-json/cluster"},{"title":"Guardrails","icon":"shield-halved","href":"/deployment-guides/config-json/guardrails"},{"title":"Secret Management","description":"Configure AWS Secrets Manager, GCP Secret Manager, or HashiCorp Vault in config.json using config_store.vault_store","icon":"vault","href":"/deployment-guides/config-json/secret-management"}]}]},{"group":"Enterprise Deployment","icon":"building","pages":[{"title":"Overview","icon":"info-circle","href":"/deployment-guides/enterprise/overview"},{"title":"AWS Deployment","icon":"aws","href":"/deployment-guides/enterprise/aws"},{"title":"GCP Deployment","icon":"google","href":"/deployment-guides/enterprise/gcp"},{"title":"Azure Deployment","icon":"microsoft","href":"/deployment-guides/enterprise/azure"},{"title":"On-Premise Deployment","icon":"server","href":"/deployment-guides/enterprise/on-premise"}]},{"group":"Common setup instructions","icon":"book","pages":[{"title":"Install make command","icon":"compact-disc","href":"/deployment-guides/how-to/install-make"},{"title":"Multinode Deployment","icon":"layer-group","href":"/deployment-guides/how-to/multinode"},{"title":"Nginx reverse proxy","icon":"shuffle","href":"/deployment-guides/how-to/nginx-reverse-proxy"},{"title":"Security best practices","icon":"shield-halved","href":"/deployment-guides/how-to/security-best-practices"},{"title":"Air-Gapped Deployment","icon":"wifi-slash","href":"/deployment-guides/how-to/airgapped"},{"title":"Docker Performance Tuning","icon":"docker","href":"/deployment-guides/docker-tuning"}]}]},{"tab":"API","icon":"code","pages":[{"title":"API","href":"/api-reference/models/list-available-models"}]},{"tab":"Contributing","icon":"code-pull-request","pages":[{"title":"Contributing","href":"/contributing/setting-up-repo"}]},{"tab":"Benchmarks","icon":"chart-line","pages":[{"title":"Benchmarks","href":"/benchmarking/getting-started"}]}]},"basePath":"","title":"Guardrails - Vikat","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":[],"chunks":[]}