Flowsh: An Information Flow-Controlled Shell for AI Agents
Juhee Kim, Leon Trampert, Boris Köpf, Aashish Kolluri, Shruti Tople, Santiago Zanella-Béguelin
Abstract
The shell empowers AI agents with filesystem, network, and code execution capabilities. However, these capabilities also create significant risks of file corruption or data leakage, for example, through prompt injection attacks or goal pressure. To mitigate these risks, agents typically request approvals by humans or AI models, both of which are prone to mistakes. The alternative is static sandboxing, which either limits utility or fails to provide strong security. Information-flow control (IFC) is a promising approach to reduce approval requests while at the same time providing deterministic guarantees. For example, IFC ensures that consequential actions are not influenced by untrusted data (preventing prompt injection) or that data never flows to unauthorized readers (preventing exfiltration and oversharing), and it only blocks or triggers approval requests when this cannot be guaranteed. In this paper, we show how to extend IFC to the shell: We design Flowsh, a shell with a new dynamic runtime monitor that observes access to diverse resources, tracks IFC metadata across command execution and persistent files, and enforces policies on the effects of shell commands. Flowsh achieves this using eBPF and OverlayFS for filesystem monitoring and a man-in-the-middle proxy for network monitoring, and by maintaining an information-flow label for the context and updating it with the labels of observed inputs. We evaluate Flowsh within an IFC-enabled agent on Terminal-Bench and a curated set of realistic scenarios. Our results show that Flowsh reduces approval requests by 5-23x compared with sandboxes, while preserving utility and ensuring that approval is requested for every unsafe action.
Create a lesson
Related papers
Controlled Autonomy for Agentic AI: A Layer-by-Layer Evaluation of Policy Enforcement, Cryptographic Identity and Isolation
Shared title terminologycs.CRHisham Ali, Vasileios Mavroeidis, Nikolaos Pitropakis et al.
Measuring the Belief-Claim Gap: Disentangling Autonomous-Agent Beliefs from Security Certification
Shared title terminologycs.CRYoussef Hamdi Zafan Ibrahim, Mohammed Khalaf Salama
DiffuVader: Validity-Constrained Discrete Diffusion for Flow-Level NIDS Red Teaming
Shared title terminologycs.CRHamed Fard, Ilya Komarov, Gerhard Wunder
The Refusal Loop: When Enforcement Undermines Authorization in LLM Agent
Shared title terminologycs.CRDuo Zhou
Refusal Steering Creates Capable and Dangerous Agents
Shared title terminologycs.CRVincent Siu, Vlad Pavlovich, Glenn Grant-Richards et al.
A Persuaded Agent Cannot Persuade the Checker: Verified Differential Privacy Configuration by LLM Agents under Malicious Requesters
Shared title terminologycs.CRWenjun Yang, Eyhab Al-Masri, Tianhao Wang