Skip to main content
04 · Defend Runtime100% Apache-2.0 · <1 ms p99

7-Language In-App RASP & Native LLM/MCP Runtime Firewall

Embed deterministic exploit blocking directly at database, shell, filesystem, socket, and AI agent boundaries. Zero AGPL-3.0 legal blockers, zero remote proxy hops on the hot path, and fail-open ring-buffered telemetry.

Compare Guard & Arcjet Pricing
RookPhase Guard sovereign in-process runtime shield and isolated boundary prism
In-process sink validation backed by Ed25519-signed PolicyBundles and zero-PII ring buffers
p99 local blocking overhead
<1 ms

~550 µs typical across hot path

Apache-2.0 runtime SDKs
7 Languages

Node, Python, Go, Java, .NET, PHP, Ruby

Cloud wait on request block
0 Hops

Local Ed25519 PolicyBundle verify

AI agent burst rate
$29 / 1M

42% under Arcjet $50/1M; $29/10M web

Interactive Runtime Blocker

Test sink-level blocking across web exploits, prompt injection, and MCP tools.

Trigger SQLi, SSRF DNS rebinding, path traversal, indirect prompt injection, or unauthorized MCP tool calls and inspect the deterministic local evaluation trace across all 7 languages.

Apache-2.0 In-Process RASP · Zero Cloud Hop

Interactive Sink Payload Tester & 7-Language SDK

0.38 ms local block · #1 blocked

1. Fire Live Attack Payload Into App Sink

OWASP · DB SinkSink: pg.Pool.query / database/sql
Intercepted Payload
status=paid' UNION SELECT api_token,email FROM identities--
403 Forbidden (GuardBlockedError)0.38 ms

DFA SQL lexer confirmed tainted HTTP parameter crossed single-quote string literal boundary into UNION keyword token.

RP-RASP-SQLI-TAINT-BOUNDARYCH: guard_security_events
sink_taint_hits > 0 -> Forces L3_RUNTIME_EXPLOITED (Score >= 95, SLA 3DF)

2. Select Runtime SDK (100% Apache-2.0)

server.tsEd25519 PolicyBundle · Fail-Open Ring Buffer
import { rookGuardMiddleware } from '@rookphase/guard/hono'

// Zero cloud hop (<1 ms local sink blocking); Apache-2.0
app.use('*', rookGuardMiddleware({
  ingestKey: process.env.ROOKPHASE_GUARD_KEY, // write-only rk_guard_...
  mode: 'block',
  llm: { promptInjection: 'block', piiRedact: true, mcpAllowlist: ['search_docs'] },
}))
Internals: Rust rookguard-core (napi-rs) + diagnostics_channel + AsyncLocalStorage
Zero AGPL-3.0 legal friction500-event lock-free zstd flush

In-Process Defense Mechanics

Deterministic blocking at execution sinks, never brittle perimeter regexes.

WAFs sit blind to parsed SQL ASTs, resolved socket IPs, and LLM tool arguments. RookPhase Guard evaluates untrusted taint directly at the driver and SDK boundary.

01 · Sink Context~550 µs p99

DFA SQLi, Exec, Path & Zero-TOCTOU Socket SSRF

<0.05%False positive rate on 5k corpus

Evaluates untrusted input at the actual execution sink rather than blind HTTP edge regexes—testing whether tainted request strings cross SQL token boundaries or resolve to private IPs.

  • SQL DFA lexer detects tautologies, $$ dollar-quoting, and stacked queries
  • Socket-level IP inspection blocks 169.254.169.254, ::ffff:169.254.169.254 & DNS rebinding
  • RE2 / Rust finite automata guarantees O(n) execution with zero ReDoS stalls
rookguard-core (Rust)Pure GoPure JVMRE2 DFA
02 · Fail-Open TelemetryZero Cloud Dependency

Lock-Free Ring Buffer & >99% Edge Compression

370×Row reduction into ClickHouse

Explicitly separates GuardBlockedError from GuardInternalError. Cloud blackouts, signature failures, or internal panics fail open at 0.0 ms while batching scrubbed ZSTD events.

  • Drops oldest events in <1 µs on saturation—never OOMs or blocks event loops
  • Client-side redaction strips Authorization, Cookie, JWTs, and query values
  • Write-only rk_guard_ tokens export to POST /api/v1/guard/ingest or OTLP :4317
Lock-Free RingBufZSTD BatchWrite-Only rk_guard_
03 · Virtual PatchingKMS Ed25519

Ed25519-Signed PolicyBundles in Under 30 Seconds

<30sFleet virtual patch rollout

Deploy instant sink and header virtual patches across running fleets without container rebuilds or pod restarts, verified locally by each SDK via asymmetric Ed25519 keys.

  • Stops CVEs (e.g. x-middleware-subrequest bypasses) while code fixes ship
  • Transitions matching findings to triaged_mitigated (score capped <= 30)
  • Mirrors to local disk cache and air-gapped S3 buckets for zero-cold-start boots
Ed25519 VerifyETag + SSE PushOffline Mmap Cache

7-Language Runtime Matrix

Engineered for native language idioms—zero cgo traps, zero TracePoint slowdowns.

Each SDK runs our shared rookguard-core Rust engine or specification-verified Pure Go / Pure JVM engines under 100% Apache-2.0 licensing, avoiding AGPL-3.0 procurement blockers.

1,500+ shared OWASP RASP & DNS rebinding conformance vectors
100% Apache-2.0 Core & SDKs
LanguageRolloutPrimary Hook MechanicsRule Engine BackendAsync Context Carrier
Node.js / TypeScriptPhase 3adiagnostics_channel (undici, pg, mysql2), RITM/IITM (--import), Express, Fastify, Next.js, Hono, NestJSRust rookguard-core (napi-rs) + <500 KB Wasm edge build (workerd)AsyncLocalStorage (Node 20/22/24 AsyncContextFrame)
PythonPhase 3asys.meta_path + wrapt.wrap_function_wrapper, FastAPI, Django, Flask, Starlette + os.register_at_forkRust rookguard-core via PyO3 / Maturin wheelscontextvars.ContextVar (ASGI + WSGI fork-safe)
GoPhase 3b3-Tier: HTTP middleware + wrapped net.Dialer.Control, guardsql/pgx, guardexec, Go 1.24 os.Root + optional -toolexecPure Go port (CGO_ENABLED=0, zero uprobes/symbol-strip issues)context.Context
Java / KotlinPhase 3b-javaagent ByteBuddy premain weaving (Spring MVC/WebFlux, Jakarta, JDBC, ProcessBuilder, Files, SocketImpl)Pure JVM bytecode engine (zero JNI .so, ReentrantLock Loom-safe)ThreadLocal + JDK 21+ ScopedValue + Reactor Context
.NETPhase 3cAspNetCore middleware, DOTNET_STARTUP_HOOKS, EF Core DbCommandInterceptor, SocketsHttpHandler.ConnectCallbackPure C# Span<char> / SIMD SearchValues (+ optional ICorProfiler)AsyncLocal<GuardContext>
PHPPhase 3cext-rookphase (zend_observer_fcall_register + zend_execute_internal) + Composer PSR-15 / Laravel / SymfonyRust rookguard-core inside ext-rookphase.so (ext-php-rs)Zend TLS + PHP_RINIT / RSHUTDOWN wipe (FrankenPHP/Swoole safe)
RubyPhase 3cTargeted Module#prepend (Rack, Rails, Sinatra, ActiveRecord, PG, Mysql2, Open3, Net::HTTP) — zero global TracePointRust rookguard-core via magnus / rb-sys native gemRuby 3.2+ Fiber[:rookphase_ctx] (Puma & Falcon safe)

Native AI & MCP Security

Protect production LLM pipelines and MCP servers in the same <1 ms SDK.

Instead of bolting on a separate $50/1M proxy gateway, RookPhase Guard instruments model clients and MCP servers inline with token budgets, PII redaction, prompt-injection barriers, and schema pinning.

Prompt & Tool-Output Defense

Unicode Normalization + Aho-Corasick + Sink Argument Checks

Strips zero-width (U+200B) and tag-smuggling (U+E0001) characters, runs deterministic Tier-1 prompt-injection detection in <350 µs, taints external RAG/MCP tool outputs, and validates tool arguments at file/socket sinks.

DLP & Tenant Budgets

Reversible PII/Secret Redaction & Token/USD Ceilings

Detects CREDIT_CARD (Luhn), SSN, AWS_KEY, OPENAI_KEY, GITHUB_TOKEN, and EMAIL via linear-time RE2 before model egress while enforcing per-tenant daily USD and token caps across OpenAI, Anthropic, Gemini, Bedrock, and Vercel AI SDK.

MCP Server Firewall

Schema Pinning & Explicit Tool Allowlists

Wraps @modelcontextprotocol/sdk and Python mcp/FastMCP via guardMcpServer to pin initial tool JSON Schemas (blocking mid-session rug pulls) and deny dangerous tools like bash_exec or raw_sql_write.

Latency budget: 80 µs middleware radix/Roaring check + 70 µs taint context + 350 µs sink or AI/MCP scan + 50 µs OpenAPI/reachability LRU = ~550 µs p99.

typescript
1// ESM startup: node --import @rookphase/guard/register server.js2import express from 'express'3import { rookGuard, guardProtect, guardMcpServer } from '@rookphase/guard'45const app = express()6app.use(rookGuard({7  token: process.env.ROOKPHASE_GUARD_TOKEN,8  mode: process.env.NODE_ENV === 'production' ? 'block' : 'monitor',9  getTenant: (req) => ({ tenantId: req.auth?.orgId, userId: req.auth?.sub }),10}))1112app.get('/api/invoices/:id', guardProtect({13  rateLimit: { capacity: 60, refillPerSec: 1 },14  authorize: async (ctx, req) => {15    const inv = await db.invoices.findById(req.params.id)16    return ctx.assertOwner(inv?.tenantId)17  },18}), handler)1920const safeMcp = guardMcpServer(mcpServer, {21  allowedTools: ['search_docs', 'get_order_status'],22  pinSchemas: true,23})

Code-to-Runtime Feedback Loop

Runtime Reachability Asymmetry Law + Dynamic OpenAPI Shadow Discovery.

Guard closes the loop with Phase 1 static reachability and Phase 3.1 offensive testing through ClickHouse materialized views—promoting live risk while refusing to blind static L2/L3 debt.

Runtime Asymmetry Law (1.2 ↔ 3.2)

Telemetry SignalControl-Plane Action
symbol_executions > 0

guard_symbol_telemetry_1h (15-min rollup)

Promotes finding to L3_RUNTIME_CONFIRMED (1.15x boost) & reopens triaged_fp
sink_taint_hits > 0

Direct tainted input reaching runtime sink

Enforces hard severity floor S >= 95 (Critical) & attaches runtime occurrence
VirtualPatchRule active

Signed Ed25519 PolicyBundle enforcement == block

Sets triaged_mitigated (capped <= 30) & emits protected_at_runtime VEX proof
0 runtime hits (30d)

observational_dormant_30d (>100k reqs on asset)

NEVER auto-suppresses statically reachable L2/L3 code—advisory context only

Parallel ClickHouse stream guard_openapi_samples aggregates structural JSON shapes into runtime_api_catalog within 60s, feeding RookPhase Attack Shadow & Zombie API detection without logging PII values.

Included Guard Quotas & Burst Packs

Local Block Never Fails

Local in-process blocking never degrades when telemetry quotas saturate. Burst packs add $29/mo per +10M web requests or $29/mo per +1M AI agent checks (42% under Arcjet's $50/1M agent pricing).

Developer Free ($0)
500K reqs / mo · 25K agent / mo
Team ($249/mo)
2M reqs / mo · 100K agent / mo
Growth ($599/mo)
15M reqs / mo · 500K agent / mo
Scale ($1,299/mo)
50M reqs / mo · 2M agent / mo
Enterprise ($28k+/yr)
Custom / Unlimited local · Custom / Air-gap mirror

Runtime Early Access

Ship <1 ms Apache-2.0 RASP and MCP guardrails in one line.

Join the Design Partner waitlist for early access to Node.js, Python, Go, Java, .NET, PHP, and Ruby Guard SDKs.

Request RookPhase Guard Access

Includes 500K free monthly web checks, 25K AI agent inspections, and signed PolicyBundle distribution.

No contributor-seat taxes. Free developer tier includes 3 Active Builders, 15 private repos, and Apache-2.0 CLI.

Need sovereign VPC or air-gapped PolicyBundle mirrors? See Enterprise BYOC