ForgeGuard Security

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.

8
Processing Stages
<5ms
SpiceDB Auth
<2ms
OPA Policy Eval
10
OWASP Risks Covered

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.

Pre-Gate

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.

SpiceDBOPA + Rego (WASM)OPAL real-time policy distribution
S1

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.

API key validationJWT verificationAgent-Vault credential storeRate limiting
S2

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.

LlamaFirewall (primary)DeBERTa-v3 (semantic)LLM GuardPresidio PIIPromptGuard 2
S3

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.

Embedding anomaly detectionNamespace isolationWrite integrity verification
S4

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.

Metadata strippingData residency enforcementProvider compliance checks
S5

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.

LLM Guard output scanPresidio output PII detectionContent policy enforcement
S6

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.

Augustus adversarial probingSecurity layer health checksAutomated posture escalation
S7

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.

mcp-scan tool verificationTool provenance validationCapability bounds enforcement

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.

A1

Goal Hijacking

Behavioral drift detector monitors output divergence from declared agent goals in real-time

A2

Tool Misuse

Tool capability bounds with sandboxed execution and per-tool permission scoping via SpiceDB

A3

Identity & Privilege Abuse

Per-agent privilege scoping with escalation detection and automatic session termination

A4

Supply Chain Attacks

MCP tool provenance validation, cryptographic signing, and SBOM generation via Forge Vault

A5

Code Execution

Sandboxed execution in Forge Compute ephemeral machines with resource limits and network isolation

A6

Memory Poisoning

Memory write integrity verification with embedding anomaly detection in the Vector Protection layer

A7

Prompt Injection

LlamaFirewall + PromptGuard 2 + DeBERTa-v3 triple-layer defense in the S2 Input Scan stage

A8

Data Leakage

Presidio PII detection on both input and output, plus metadata stripping in Secure Route

A9

Lack of Monitoring

Full Langfuse tracing on every request, Augustus probes, and configurable alerting thresholds

A10

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.

Pre-Gate auth
S1 Gate
S2 Basic scan
S5 Output check

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.

All Standard stages
S2 Deep scan (all 5 tools)
S3 Vector protection
S4 Data residency
S6 Audit probes
S7 MCP scan

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.

All Strict stages
Mandatory PII redaction
Tool allow-list enforcement
Real-time adversarial probing
Full audit trail

Ship AI with confidence

ForgeGuard runs on every request by default. Set "security": "strict" for full pipeline protection with zero additional code.