# Summary: 2026-07-21_08-35-22Z_DataLeakagePreventioninAgenticApplicationsviaPreem.md Saved: 2026-07-24 00:34 Source: 2026-07-21_08-35-22Z_DataLeakagePreventioninAgenticApplicationsviaPreem.md Model: None --- ## Summary Agentic systems that combine large‑language model (LLM) planning with external tools are vulnerable to data leakage and unauthorized tool use because prompt templates can cross boundaries or be hijacked via injection attacks. This paper introduces a pre‑deployment pipeline that automatically scans, hardens, and validates such applications before they run in the wild. By targeting high‑risk components with minimally invasive mitigations and then confirming that the hardened version still functions correctly under adversarial prompts, the approach eliminates leakage without requiring continuous runtime enforcement. The solution is demonstrated on five real‑world agentic apps and the AgentDojo benchmark. ## Key Contributions - **Finding 1:** A systematic pipeline can detect leakage‑enabling patterns in prompt templates, tool interfaces, and code that invokes external tools. - **Finding 2:** Hardening mitigations such as schema tightening, allowlist‑based gating, least‑privilege checks, and boundary sanitization are applied with minimal impact on intended behavior. - **Finding 3:** Validation through automatically generated adversarial prompts (jailbreaks, instruction overrides) and benign task variants confirms that the hardened application preserves functionality. ## Methodology The authors built a pre‑deployment pipeline that first analyzes each agentic application’s prompt templates, tool interfaces, and invocation code to locate patterns that could permit data leakage or tool misuse. High‑risk tools are prioritized, and the pipeline applies targeted mitigations—schema tightening (restricting allowed fields), boundary sanitization (filtering unsafe inputs), allowlist gating (only permitting approved tools), and least‑privilege checks (limiting permissions). After hardening, the system generates a suite of attack inputs that mimic jailbreaks and instruction overrides, as well as benign task variants. These inputs are used to validate that mitigations do not break core functionality. Patches generated by the pipeline can be merged without disrupting existing behavior. ## Results The pipeline was evaluated on five real‑world agentic applications plus the AgentDojo benchmark. It consistently identified leakage‑enabling patterns and produced patches that could be integrated seamlessly. When subjected to basic jailbreak attacks, the hardened apps showed a 100 % reduction in data leakage; under stress‑induced manipulation (e.g., repeated prompt injection), leaks were reduced by 91 %. Crucially, no continuous runtime policy enforcement was required because the mitigations are baked into the code. ## Significance This work provides a proactive, automated defense against data leakage and tool misuse in agentic workflows that span multiple codebases. By hardening applications before deployment, organizations can significantly lower their attack surface without sacrificing performance or adding runtime overhead—a critical advantage as LLM‑driven agents become more prevalent. ## Related Concepts - Data leakage - Prompt injection attacks - Tool misuse in agentic systems - Least‑privilege principle - Schema tightening - Allowlist gating - Boundary sanitization - Adversarial testing - Pre‑deployment hardening pipeline