Automated security analysis of agent workflowsAutomated Safety Analysis for Agentic Workflows
Quick read
Based on the paper's full text (AI-generated); refer to the original
Researchers from UC San Diego and other institutions propose Apsis, a security analyzer that statically detects logic flaws in agent workflows before deployment. The paper points out that such flaws stem from workflow wiring design rather than prompt injection, and have caused incidents such as the coding agent Devin looping and exhausting its budget and the Cursor agent deleting a company's production database. Apsis lifts framework code into an intermediate representation with behavioral annotations and uses declarative pattern matching across 12 detectors, covering six categories of flaws including runaway loops, lost concurrent writes, and role privilege escalation; built on an annotated corpus from 861 defect reports across 13 frameworks and 135 reproducible benchmarks, it achieves 91% precision and 84% recall, with a median analysis time of 0.7 seconds per run, while all defect benchmarks pass the frameworks' own validation. In real projects, Apsis found 36 previously unknown defects across 21 repositories, including NVIDIA NeMo Agent Toolkit and LangChain, of which 33 have been fixed by maintainers.
- LLM applications are increasingly deployed as agentic workflows, and defects in their control and coordination logic (workflow bugs) can cause real-world harm, such as runaway loops exhausting budgets or unauthorized operations deleting data. Existing tools cannot statically verify such logic across frameworks before deployment.
- The authors propose Apsis: lifting each framework's workflow code into a unified intermediate representation (IR), modeling the workflow as a semantic graph with behavioral annotations (steps, data dependencies, shared state, reducers, roles, etc.), then using a custom bug description language (BDL) to write each class of failure as Horn clause patterns, matching them on the IR and locating the faulty step.
- From 861 issues across 13 frameworks, a taxonomy of workflow bugs and the first annotated corpus were compiled, and 135 reproducible benchmarks were constructed. Apsis achieves 91% precision and 84% recall (F1=0.87), at about 0.7 seconds per workflow, 0.18 F1 higher than the strongest baseline; ablation shows that behavioral checks detect 46 more bugs that pure structural checks miss; in real projects, 36 previously unknown bugs were newly found (33 fixed, 3 confirmed).
- Validity threats listed by the authors include: frameworks evolve rapidly and engine semantics drift across versions; currently the drift is still within what the IR can express, and the benchmarks are pinned by version; new frameworks keep appearing, requiring a separate frontend for each framework. The material gives no other limitations or future directions.
The paper shows that all 135 flawed workflows passed the framework's built-in validation, and Apsis locates the flawed steps before deployment with 91% precision, with a median of 0.7 seconds per analysis.
Related events and news
1 events · 0 news mentions
- This event's paper
Apsis静态分析器检测智能体工作流逻辑缺陷