Skip to main content
reopt Handbook
reopt Handbook
AI Security and Compliance Operations

Strategy and Governance

Risk GovernanceData ProtectionSecure Architecture

Security Controls

Prompt Injection DefenseAccess Control and SecretsAudit Readiness

Operations and Leadership

Incident ResponseBoard Reporting

Appendix

GlossaryVerificationUpdates
Handbook›AI Security and Compliance›Prompt Injection Defense
한국어English

Prompt Injection Defense

Defend AI systems against malicious instructions in user input, retrieved content, and tool output.

Key takeaways

  • Prompt injection is a system design problem that appears when untrusted text can override policy, change tool behavior, or extract sensitive information.
  • Defend across five surfaces: user input, retrieved documents, tool output, persistent memory, and multi-agent handoff.
  • Apply the core defense pattern: separate instructions from data, label untrusted content, restrict tools by user and risk, and require approval for side effects.
  • Validate outputs before execution or disclosure, and log suspicious input and blocked actions.
  • Use concrete test cases, such as whether a document can make the model reveal system prompts or retrieved text can override tenant permissions.

Prompt injection is a system design problem. It appears when untrusted text can override policy, change tool behavior, or extract sensitive information.

Attack Surfaces

SurfaceExample riskControl
User inputDirect instruction to ignore policySystem policy and input validation
Retrieved documentsMalicious text inside knowledge baseSource trust and content sanitization
Tool outputWeb page or API response injects instructionsTool result boundaries
MemoryStored poisoned instruction persistsMemory review and deletion
Multi-agent handoffOne agent passes unsafe instructions to anotherStructured handoff schema

Defense Pattern

  1. Separate instructions from data.
  2. Label untrusted content explicitly.
  3. Restrict tools by user, task, and risk.
  4. Require approval for side effects.
  5. Validate outputs before execution or disclosure.
  6. Log suspicious input and blocked actions.

Test Cases

  • Can a document tell the model to reveal system prompts?
  • Can a user make the agent call a privileged tool?
  • Can retrieved text override tenant permissions?
  • Can tool output create a hidden instruction for the next step?

Related docs

Secure Architecture

Design AI systems with policy boundaries, isolation, logging, and safe tool access.

Agent Documentation Security

Agentic Documentation · Reduce prompt injection, MCP tool poisoning, Plugin supply chain risk, and excessive agency.

Cmd. /memory

Claude Code Command Master · Manages CLAUDE.md and auto memory. Saved project instructions can affect later sessions.

Glossary

Shared terminology for AI security and compliance operations.

Sandbox Tool Runtime

Vercel Enterprise AI Platform · Isolate code, file, browser, and shell execution for AI agents.

Secure Architecture

Design AI systems with policy boundaries, isolation, logging, and safe tool access.

Access Control and Secrets

Govern human, service, and agent permissions with least privilege and rotation.

On this page

Attack SurfacesDefense PatternTest Cases