Per-tool-call guardrails miss combined leaks: the case for session-level agent security

Former-Economy404 · reddit · 2026-10-29

Most agent security checks one tool call at a time, but that misses combinations of individually-allowed calls that leak data together:

This is Willison's lethal trifecta (untrusted input + private data + outward channel) / Meta's rule of two; per-call rules can't distinguish queries inside a generic SQL tool.

Mitigations: human approval before anything leaves the org (client prompt, open-source gateway like hush security, custom hooks); never run as servicerole (bypasses RLS), prefer read-only (Supabase MCP now has a readonly flag), fresh sessions on trust-level changes, narrow egress — Claude Code's sandbox docs even warn broad allows like github.com open exfil paths.

Session-level options remain thin: CaMeL and FIDES track data flow properly but are research-stage; the author asks for real-world gateway experience.

Original post →

More from coding & agent

coding & agent channel →