Seven-Layer Security Pipeline
Every request passes through eight processing stages -- from authorization to MCP tool verification -- before and after reaching the LLM. Zero trust, defense in depth.
Defense in Depth for AI
ForgeGuard is not a single firewall sitting at the edge. It is a pipeline of eight distinct security stages, each targeting a different attack vector. Prompt injection, PII leakage, memory poisoning, tool supply chain attacks, credential theft, and adversarial model manipulation are each handled by purpose-built defenses. The pipeline runs on every request, for every tenant, with no opt-out for critical stages.
The ForgeGuard Pipeline
Requests flow through each stage sequentially. A failure at any stage stops processing and returns a detailed error to the caller. Each stage is independently configurable per tenant.
Authorization (SpiceDB + OPA)
Before any request enters the security pipeline, SpiceDB enforces Zanzibar-style relationship-based access control in under 5ms. OPA evaluates Rego policies compiled to WASM in under 2ms. Together they determine whether the caller has permission to use the requested model, access the target memory namespace, and invoke specific tools. Unauthorized requests are rejected before consuming any compute.
Gate + Agent-Vault
The API gate validates authentication tokens, enforces rate limits, and checks quota availability. Agent-Vault provides a secure credential store for agent-held secrets like API keys and OAuth tokens, ensuring that credentials never appear in prompts or logs. All credentials are encrypted at rest with AES-256-GCM and decrypted only at the moment of use.
Input Scan
Every user message passes through five defense layers before reaching an LLM. LlamaFirewall is the primary defense, orchestrating multiple classifiers in a single pass. DeBERTa-v3 performs deep semantic analysis to detect sophisticated social engineering. LLM Guard scans for over 30 attack categories. Presidio identifies and optionally redacts PII like names, emails, phone numbers, and financial data. PromptGuard 2 runs within LlamaFirewall specifically to detect prompt injection and jailbreak attempts.
Vector Protection
Protects the memory layer from poisoning attacks. When content is written to vector storage, it is scanned for adversarial embeddings designed to manipulate retrieval results. Namespace isolation ensures that one tenant's memory cannot influence another's search results. Write integrity verification detects anomalous embedding patterns that deviate from expected distributions.
Secure Route
Before the request is forwarded to an LLM provider, the secure routing layer strips sensitive metadata, applies data residency rules (ensuring EU data stays in EU regions), and verifies that the selected provider meets the tenant's compliance requirements. Provider credentials are injected at the last moment and never travel with the request object.
Output Scan
LLM responses are scanned before delivery to the caller. LLM Guard checks for leaked training data, harmful content, and policy violations. Presidio scans outputs for unintended PII exposure. Output scanning catches cases where the model itself generates sensitive information, even when the input was clean.
Audit (Augustus Probes)
Augustus continuously probes the system with adversarial inputs to verify that security layers are functioning correctly. These synthetic attack simulations run on a configurable schedule and test each security layer independently. If a probe bypasses a layer it shouldn't, Augustus raises an alert and can automatically increase the security posture for affected tenants.
MCP Security (mcp-scan)
Scans Model Context Protocol tools before they are loaded into agent workflows. mcp-scan verifies tool provenance, checks for known vulnerabilities, and validates that tool capabilities match their declared permissions. This prevents supply chain attacks where compromised MCP tools could exfiltrate data or execute unauthorized actions.
OWASP Agentic Top 10 Coverage
Forge Shield maps every OWASP Agentic Top 10 risk to a concrete mitigation within the ForgeGuard pipeline. This is not a checklist exercise -- each mitigation is a running system component with continuous monitoring.
Goal Hijacking
Behavioral drift detector monitors output divergence from declared agent goals in real-time
Tool Misuse
Tool capability bounds with sandboxed execution and per-tool permission scoping via SpiceDB
Identity & Privilege Abuse
Per-agent privilege scoping with escalation detection and automatic session termination
Supply Chain Attacks
MCP tool provenance validation, cryptographic signing, and SBOM generation via Forge Vault
Code Execution
Sandboxed execution in Forge Compute ephemeral machines with resource limits and network isolation
Memory Poisoning
Memory write integrity verification with embedding anomaly detection in the Vector Protection layer
Prompt Injection
LlamaFirewall + PromptGuard 2 + DeBERTa-v3 triple-layer defense in the S2 Input Scan stage
Data Leakage
Presidio PII detection on both input and output, plus metadata stripping in Secure Route
Lack of Monitoring
Full Langfuse tracing on every request, Augustus probes, and configurable alerting thresholds
Insufficient Access Control
SpiceDB Zanzibar permissions + OPA Rego policies + CASL UI abilities for defense-in-depth
Configurable Security Posture
Not every workload needs maximum security. Forge lets you configure the security level per request, per agent, or per tenant to balance protection with performance.
Standard
Authentication, rate limiting, and basic input/output scanning. Suitable for internal tools and development environments where speed matters more than deep inspection.
Strict
Full pipeline with all eight stages active. Deep semantic analysis, PII detection and optional redaction, vector protection, and audit probes. Recommended for production customer-facing workloads.
Maximum
Everything in Strict, plus mandatory PII redaction, blocked tool execution unless explicitly allow-listed, and real-time Augustus adversarial probing on every request. For regulated industries and high-security environments.
Ship AI with confidence
ForgeGuard runs on every request by default. Set "security": "strict" for full pipeline protection with zero additional code.