Audit Gate Endpoint: POST /v1/firewall/inspect MCP Tool: firewall_inspect Zero Payload Retention & Zero Training-Data Resale $0 Charged on HTTP 402 / 403 Blocks

Prevent AI Agent SSRF and Secret Leaks With Deterministic Audit Gates

Stop autonomous agents from querying 169.254.169.254 cloud metadata, internal RFC1918 networks, or leaking AWS keys, JWTs, and PII in tool calls. Pure deterministic Stage 1 Audit Gate blocks SSRF at HTTP 403 ($0 charged) and scrubs >= 15 secret classes bidirectionally.

Target Role: Application Security & Cloud Infrastructure Engineer · Primary Keyword: prevent AI agent SSRF and secret leaks · Pipeline Stage: Stage 1 — Audit Gate (SSRF, Secret/PII & Injection)

Zero Payload Retention & Zero Training-Data Resale Pledge: Enterprise-Trust-Firewall runs on 100% pure Python 3 stdlib + SQLite WAL. Raw customer payloads, prompts, headers, and secrets are never persisted to disk, never logged in plaintext, and never sold or reused for model training. Audit receipts store redacted SHA-256 digests only.
Launch 5-Second Zero-Signup Try-Now Console Read Agent Skill Spec (REST + MCP + Treg Hub) Browse All 24 Guides

1. Threat Surface & Deterministic Firewall Controls

Any AI agent allowed to fetch URLs or call HTTP webhooks becomes an interactive SSRF vector the moment untrusted web content reaches its context window. Worse, agents routinely paste environment variables, bearer headers, or database strings into third-party tool payloads—and receive sensitive PII back from partner APIs. Enterprise-Trust-Firewall pairs strict network-layer SSRF blocking with bidirectional secret/PII redaction in a single sub-3ms pass.

How Enterprise-Trust-Firewall Enforces This Boundary

  1. Parses scheme, host, port, and DNS resolution targets to reject file://, gopher://, loopback (127.0.0.0/8, ::1), RFC1918 (10/8, 172.16/12, 192.168/16), link-local (169.254/16, fe80::/10), ULA (fc00::/7), and IPv4-mapped IPv6 (::ffff:127.0.0.1).
  2. Blocks cloud metadata endpoints including AWS IMDS (169.254.169.254), ECS task metadata (169.254.170.2), and metadata.google.internal before any socket opens.
  3. Applies >= 15 deterministic regex and Luhn validators on outbound tool arguments and inbound HTTP responses to mask cloud keys, payment tokens, JWTs, PEM blocks, SSNs, and cards.
  4. Issues a redacted SHA-256 TrustAuditReceipt documenting blocked vectors without persisting the sensitive string.

2. Concrete Benchmark & Threshold Metrics

Control / Benchmark Metric Enforced Threshold & Guarantee
Deterministic inspection latency (P95)< 2.8 ms inline (pure stdlib regex + ipaddress CIDR checks)
Blocked SSRF CIDR & metadata targets15 IPv4 + 11 IPv6 CIDRs & 21 blocked hostnames (169.254.169.254, 169.254.170.2, metadata.google.internal, RFC1918, ::1, ::ffff:127.0.0.1, fc00::/7, fe80::/10)
Bidirectional secret & PII redactors>= 20 deterministic detectors (cloud keys, Stripe/Creem/GitHub/Slack/Google/Twilio/SendGrid, JWT, PEM, SSN, Luhn cards, IBAN mod-97, phone/email)
Blocked call billing guarantee$0 (charged_micros == 0) on HTTP 403 policy/SSRF/injection blocks

3. Working REST (cURL) & MCP JSON-RPC 2.0 Examples

REST API Invocation (POST https://trustwall.fastmesh.dev/v1/firewall/inspect)

curl -sS -X POST https://trustwall.fastmesh.dev/v1/firewall/inspect \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ${TRUSTWALL_API_KEY}" \
  -d '{"tenant_id":"cloud_sec_team","tool_name":"http_fetch_document","target_url":"http://169.254.169.254/latest/meta-data/iam/security-credentials/","method":"GET","headers":{},"payload":{}}'

Structured Request Payload

{
  "tenant_id": "cloud_sec_team",
  "tool_name": "http_fetch_document",
  "target_url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/",
  "method": "GET",
  "headers": {},
  "payload": {}
}

Native Streamable MCP Invocation (POST https://trustwall.fastmesh.dev/mcp)

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "firewall_inspect",
    "arguments": {
      "tenant_id": "cloud_sec_team",
      "tool_name": "http_fetch_document",
      "target_url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/",
      "method": "GET",
      "headers": {},
      "payload": {}
    }
  }
}

Run via cURL against /mcp:

curl -sS -X POST https://trustwall.fastmesh.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"firewall_inspect","arguments":{"tenant_id":"cloud_sec_team","tool_name":"http_fetch_document","target_url":"http://169.254.169.254/latest/meta-data/iam/security-credentials/","method":"GET","headers":{},"payload":{}}}}'

Expected Deterministic Firewall Response

{
  "verdict": "DENY",
  "http_status": 403,
  "charged_micros": 0,
  "ssrf_blocked": true,
  "block_reason": "cloud_metadata_link_local_169_254",
  "zero_payload_retention": true
}

4. Tamper-Evident SHA-256 TrustAuditReceipt (Zero Payload Retention)

Every request produces a canonical 64-hex SHA-256 TrustAuditReceipt stored in SQLite WAL using redacted payload digests only. Verify any receipt free ($0) via GET /v1/firewall/receipt/tr_1865c8da8637a565, MCP tool firewall_verify_receipt, or offline Python 3 stdlib SHA-256 hashing:

{
  "receipt_id": "tr_1865c8da8637a565",
  "service": "enterprise-trust-firewall",
  "version": "1.0.0",
  "action": "inspect",
  "tenant_hash": "2d7baaa0d008",
  "target_host": "169.254.169.254",
  "verdict": "BLOCKED",
  "decision": "deny",
  "http_status": 403,
  "charged_micros": 0,
  "zero_bill_reason": "blocked_or_unbilled_blocked",
  "input_sha256": "9a1dd7d117ce4c4ef9188e18dc518b5d95dad08a1159252e95cf9e705bb3f80b",
  "output_sha256": "5f3615d719c1acc6d9d0f60dc9f740f3859d2f7aaeefbb021730d3a537140ec1",
  "redaction_count": 0,
  "redacted_categories": [],
  "policy_checks": [
    {
      "stage": "stage1_audit_gate",
      "endpoint": "/v1/firewall/inspect",
      "verdict": "BLOCKED"
    }
  ],
  "stage_summary": {
    "primary_stage": "stage1_audit_gate",
    "mcp_tool": "firewall_inspect"
  },
  "sla_cert_id": null,
  "zero_payload_retention": true,
  "issued_at_utc": "2026-12-02T05:30:00Z",
  "receipt_sha256": "0e88f3a990eceebf3ac380e04bed8383110ee2e30264896df07662393aba006f",
  "sha256_attestation": "0e88f3a990eceebf3ac380e04bed8383110ee2e30264896df07662393aba006f"
}

5. Architecture & Capability Benchmark Comparison

Solution Pricing & Billing Model Agent Runtime Defense Audit & Data Retention Operational Outcome
Enterprise-Trust-FirewallPrepaid Creem ($149/$399/$999) + $0 on blocked callsDeterministic Stage 1 SSRF, 15+ bidirectional secret redactors, OWASP LLM01 injection, TLS header scoringSHA-256 TrustAuditReceipt + Zero Payload RetentionNative REST, /mcp JSON-RPC 2.0, Treg Hub
Traditional Layer-7 WAF$200-$2,500/mo fixed tiersInbound HTTP signatures only; blind to MCP tool arguments and outbound agent SSRFRaw HTTP access logs (often retains payloads)No native MCP tool schema awareness
Probabilistic LLM GuardrailPer-token variable billing + 300-900 ms added latencyNon-deterministic classifier misses IPv6-mapped SSRF and Luhn-valid cardsOften sends sensitive prompts to third-party inference APIsNo SQLite WAL micro-USD escrow breaker
DIY Regex Wrapper ScriptsHidden engineering maintenance costMisses DNS rebinding, URL-encoded octets, bidirectional response leaksNo tamper-evident receipts or 4D policy stateFragile glue code across agent frameworks

6. Transparent Creem Plans ($0 on Blocked Calls)

Start immediately in the 5-second zero-signup Try-Now Console, then activate prepaid Creem tiers with HMAC-SHA256 idempotent credit settlement:

Team Gateway $149

$149.00 non-expiring prepaid credits (149,000,000 micros, ~7,450 headline ops at $0.02), zero seat tax, all 4 firewall stages, SHA-256 receipts, and $0 on blocked calls.

SKU: sku_trustwall_team_gateway_149 · Creem Checkout

Security Pro $399

$450.00 non-expiring prepaid credits (+$51.00 bonus, 450,000,000 micros, ~22,500 headline ops), multi-tenant SQLite WAL escrow pools, 10% repeat ArchiveCache tier, and 24h SLA certificates.

SKU: sku_trustwall_security_pro_399 · Creem Checkout

Enterprise Firewall $999

$1,250.00 non-expiring prepaid credits (+$251.00 bonus, 1,250,000,000 micros, ~62,500 headline ops), unlimited agents, custom policy packs, replay-safe Creem webhook auto-topup, and Zero Payload Retention attestation.

SKU: sku_trustwall_enterprise_firewall_999 · Creem Checkout

7. Frequently Asked Questions

Can an attacker bypass the SSRF filter using IPv6-mapped IPv4 addresses?

No. Stage 1 normalizes IPv4-mapped IPv6 addresses (such as ::ffff:127.0.0.1 and ::ffff:169.254.169.254) using Python ipaddress inspection and rejects any loopback, private, reserved, or link-local address.

Does redaction run on both requests and responses?

Yes. Bidirectional redaction scrubs secrets and PII before outbound transmission and scrubs sensitive response fields before they return to the agent's context window.

How are local integration tests supported without weakening SSRF security?

Production defaults strictly block 127.0.0.1 and ::1. Only server-side constructor configuration (trusted_test_hosts)—never controllable from HTTP request payloads—can permit local test mocks.

8. Related Enterprise-Trust-Firewall Guides

Try Live Firewall Console → · Explore All 24 Security & GEO Guides →