International Symposium on Leveraging Applications of Formal Methods, Verification, and Validation • Kos, Greece
Time: Thursday, 29.10
Room: Room 2
Authors: George Granberry, Wolfgang Ahrendt, Andy Gordon, Moa Johansson
Abstract: Symbolic execution, in tools such as CrossHair for Python, is a powerful technique for finding bugs, but two barriers hinder its adoption: the human effort of annotating code with assertions, and the need to model the execution environment outside Python, such as an external database. To overcome both, we design a crosshair-bugs skill for an AI agent. Without human intervention, it instruments a repository with assertions, synthesizes a constraint-aware symbolic environment for the database, runs symbolic execution, and constructs a concrete test as evidence for each candidate bug. We evaluate the skill on 1,156,044 lines of Python code over 11 popular open-source Python web applications (Zulip, NetBox, Apache Superset, and others). Environment synthesis lifts the share of contracted functions CrossHair can analyse from 9% to 81% (a 9× increase). Since frontier models already find bugs autonomously, we compare against a baseline audit skill that prompts the LLM to find bugs directly; it finds 759 candidate bugs. Augmenting this baseline with our skill finds 60 additional confirmed bugs, an 8% increase. The bugs found by our agent are largely disjoint from the baseline's findings, and different in nature. One type of bug we find is input validaton defects, where unexpected external input is not caught by input validation checks. Another type is integrity-constraint violations at the database boundary that are found thanks to the symbolic model of the database environment. Surprisingly, bugs found by our agent divide almost evenly between those found while the LLM writes specifications, before CrossHair runs, and those found by running it.