Inspiration

Autonomous AI agents routinely invoke shell commands, SQL queries, filesystem reads/writes, HTTP requests, and outbound emails while processing untrusted external inputs such as web pages, tickets, and documents. A single indirect prompt injection or overly permissive tool call can lead to credential exfiltration, path traversal, or destructive system mutations.

What it does

AgentWall is a deterministic AI agent tool-call firewall and prompt-injection policy sandbox built around src/engine/firewall.ts. Every proposed tool call is evaluated deterministically before execution against 47 least-privilege policy rules:

  • Multi-Tool Inspection: Inspects shell, sql, filesystem, http, and email tool invocations.
  • Prompt-Injection & Obfuscation Detection: Detects indirect prompt injection including zero-width characters, Unicode-tag smuggling, homoglyphs, and base64-encoded payloads.
  • Path, Network & Command Guardrails: Blocks path traversal, suspicious exfiltration URLs, and destructive SQL/shell operations.
  • Actionable Verdicts & Threat Citations: Returns deterministic ALLOW, SANITIZE, or BLOCK verdicts annotated with CWE, OWASP, and MITRE ATT&CK citations.
  • Interactive Sandbox & Audit Trail: Includes 3 attack-replay presets, a live payload tester, and redacted JSON/Markdown audit export for security review.

How we built it

  • Architecture & Stack: Built with Kiro CLI, TypeScript, React, and Vite, keeping policy evaluation 100% deterministic, zero-latency, and free of external LLM dependencies.
  • Verification: Verified by a comprehensive Vitest suite with 73/73 Vitest tests passing, covering all 47 security rules, Unicode smuggling detectors, sanitization pipelines, and redacted audit exports.

Challenges we ran into

Designing deterministic sanitization and canonicalization rules that normalize homoglyphs, zero-width characters, Unicode tag blocks, and nested base64 payloads without breaking legitimate developer commands or SQL queries required careful layered decoding and strict rule precedence.

What we learned & What's next

Deterministic policy enforcement before tool execution provides predictable, auditable safety guarantees that probabilistic LLM guardrails alone cannot match. Next, we plan to add MCP/OpenAI tool-schema adapters, SARIF audit export, and custom organization policy packs.

Built With

Share this project:

Updates

Submission history