Skip to content

Add prompt injection and guardrails security guide#1113

Draft
veltson-vapi wants to merge 1 commit into
mainfrom
docs/prompt-injection-and-guardrails
Draft

Add prompt injection and guardrails security guide#1113
veltson-vapi wants to merge 1 commit into
mainfrom
docs/prompt-injection-and-guardrails

Conversation

@veltson-vapi

@veltson-vapi veltson-vapi commented Jul 21, 2026

Copy link
Copy Markdown

Description

Adds a new Prompt injection and guardrails guide under Security and privacy. It covers the layers available to protect an assistant against prompt injection and data exposure.

  • New page: fern/security-and-privacy/prompt-injection-and-guardrails.mdx
  • Nav entry under Security and privacy (after JWT authentication) in fern/docs.yml
  • Sections: system prompt handling, then server messages + Live Call Control, then the Security Filter Plan (compliancePlan.securityFilterPlan), then keeping sensitive data out of context (the return-a-status pattern, stored credentials, and tool argument encryption)
  • All claims verified against the codebase (securityFilterUtil.ts, security.types.ts) and the existing tool-argument-encryption guide

Open questions for review

  1. sanitize vs replace filter modes. In securityFilterUtil.ts these run identical code (both substitute the matched phrase with replacementText). The doc currently documents sanitize and notes that replace behaves identically. Is that the intended behavior, or should sanitize strip to empty while replace substitutes? The original author (Adi) has left, so this needs a second opinion before we commit to the wording.
  2. Publishing the raw regex patterns. The "How it works" section lists the literal prompt-injection regexes. That is useful for honest users, but it also tells an attacker exactly how to word around the filter. Keep them, or describe the categories and link the API reference instead?

Testing Steps

  • Run the app locally using fern docs dev or navigate to preview deployment
  • Ensure that the changed pages and code snippets work

@veltson-vapi
veltson-vapi force-pushed the docs/prompt-injection-and-guardrails branch from 404a00e to 42e3327 Compare July 21, 2026 23:15
@github-actions

Copy link
Copy Markdown
Contributor

@veltson-vapi
veltson-vapi force-pushed the docs/prompt-injection-and-guardrails branch from 42e3327 to 9efd059 Compare July 21, 2026 23:35
@github-actions

Copy link
Copy Markdown
Contributor

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@veltson-vapi
veltson-vapi force-pushed the docs/prompt-injection-and-guardrails branch from 9efd059 to db030ff Compare July 21, 2026 23:50
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants