Download README.md from byte-vortex/agent-security-gateway-report: direct link, hf CLI and curl.
- Browser
- Download file 3.02 kB
-
https://huggingface.co/spaces/byte-vortex/agent-security-gateway-report/resolve/main/README.md
- Command line
-
hf download hf://spaces/byte-vortex/agent-security-gateway-report/README.md
-
curl -L -o README.md https://huggingface.co/spaces/byte-vortex/agent-security-gateway-report/resolve/main/README.md
title: Agent Security Gateway Report
emoji: ⚔️
colorFrom: green
colorTo: gray
sdk: static
pinned: false
license: apache-2.0
short_description: AI Agent Security Gateway & Evaluation Harness
🛡️ Autonomous Agent Security Gateway & Evaluation Harness
An enterprise-grade, defense-in-depth runtime security gateway designed to protect LLM-powered autonomous agents against Indirect Prompt Injection (IPI) and Server-Side Request Forgery (SSRF).
🚀 Project Overview & Purpose
Autonomous agents frequently consume untrusted data from external sources (such as emails, file attachments, and web pages). Attackers can embed adversarial instructions within this data to hijack control flow, execute unauthorized tool calls, or exfiltrate sensitive data.
This project implements an empirical evaluation harness and deterministic security control plane that shifts trust away from brittle system prompts and locks down execution at the code level.
🏗️ Core Defense-in-Depth Architecture
- Layer 1 (Structural Sanitization): The
DefensiveSanitizerstrips zero-width spaces, BOM markers, and BiDi directional override characters while wrapping untrusted external data inside strict<untrusted_data_boundary>tags accompanied by explicit system warnings. - Layer 2 (Deterministic Policy Gateway): The
ToolExecutionGatewayperforms RFC-compliant address parsing (email.utils.parseaddr), neutralizes local-part domain spoofing tricks, and enforces strict domain whitelisting independent of model outputs. - Network SSRF Safeguards: Implements DNS pre-resolution, private/metadata IP range blocking (such as loopback, RFC 1918 ranges, and cloud metadata endpoints like
169.254.169.254), anti-TOCTOU socket pinning viaSocketPinnedAdapter, and manual redirect re-validation. - Layer 3 (Stateful Taint Tracking): Utilizes Redis (
RedisMemoryTaintManager) to persist session taint state atomically across multi-turn trajectories underagent:session:{session_id}keys, elevating policy strictness whenever memory is corrupted by untrusted data. - SOC-Ready Observability: Employs
SIEMJsonFormatterto emit Elastic Common Schema (ECS) and Datadog-compliant structured JSON audit logs complete withtrace_idcorrelation, timestamps, and violation codes.
📊 Key Experimental Findings
- Zero Attack Success Rate (ASR): Achieved a verified 0.0% ASR across single-turn and multi-turn latent injection test suites.
- Resolving the Evaluator Trap: Demonstrated why naive string-matching evaluators fail by mistaking model warning prose for successful exploits, resolving false positives via AST/JSON-based tool extraction (
RobustToolExtractor).
📂 Explore the Full Technical Notebook
You can examine the complete code implementation, test suites, and empirical benchmarks directly in this repository: