Open-sourced guardrail-middleware puts deterministic policy checkpoints between agents and their tools
MidnightHeavy3064 · reddit · 2026-11-18
The author open-sourced guardrail-middleware (pip install guardrail-middleware) to address the core agent risk: the agent is authorized but the instruction is not — a poisoned email or tool output can trigger payments, deletes, or sends with nothing checking who approved it. Every proposed tool call passes a policy checkpoint with four verdicts: approve, approve with conditions, escalate to human, block. All checks are deterministic, no LLM judge:
- Injection pattern detection in untrusted content (overrides, role hijack, secret extraction, bypass phrasing)
- Role-by-operation-class authorization with per-class financial limits and a hard ceiling; payments without verifiable amounts escalate
- Bulk thresholds (conditions above 50 records, escalation above 500)
- Taint tracking: PII/secrets flowing externally block; secrets in parameters block anywhere
- Destructive ops require backup/confirmation markers; targetless deletes escalate
- Money movement, deletes, or sends triggered by untrusted content always escalate
Decisions go to a SHA-256 hash-chained JSONL audit log (tamper-evident). Honest limits: regex-class detection misses novel phrasings, the checkpoint judges permission not wisdom, and sequence attacks (many small transfers under limits) need plan-level validation, coming next along with a 42-scenario adversarial benchmark.
More from coding & agent
- 27 vibe-coded Finder clones appeared in a month, most already dead — KaKi_87 · 2026-11-18
- HF adapts Qwen for pi coding agent with RL+LoRA: SWE-bench Pro Hard jumps 29.4%→62.7% — art_zucker · 2026-11-18
- Forrest PKnight Ranks Programming Languages by How Well AI Writes Them — Dan_Jeffries1 · 2026-11-18
- Claude Plus Unreal Engine 5.9 MCP Builds a Game Prototype in One Day — TomLikesRobots · 2026-11-18
- The most indispensable agent is the boring one that renames your invoices daily — Winterocean812 · 2026-11-18
- ZeroIDE-MCP lets browser-based AI agents remotely control multiple Windows PCs over MCP — Danywalery · 2026-11-18